【发布时间】:2024-01-14 14:48:01
【问题描述】:
我的 ~/.emacs 文件有问题。我已将内容粘贴到我的 ~/.emacs 文件中,该文件看起来非常通用。
;; -*- mode: elisp -*-
;; Disable the splash screen (to enable it agin, replace the t with 0)
(setq inhibit-splash-screen t)
;; Enable transient mark mode
(transient-mark-mode 1)
;; org-mode configuration
;; Enable org-mode
(require 'org)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
;; don't create backupfiles
(setq make-backup-files nil)
但是,每次我:
来源 ~/.emacs
我收到以下错误。似乎有一个链接问题。但是,我不确定发生了什么。我对 emacs 和编程非常陌生,因此我将不胜感激。
-bash: /Users/coltsfan/.emacs: 第 1 行:意外标记 `;;' 附近的语法错误
-bash: /Users/coltsfan/.emacs: 第 1 行:`;; -- 模式:elisp --'
【问题讨论】:
-
呃,你是从哪里想到这样做的??
-
另外,
-*- mode: elisp -*-必须是-*- mode: emacs-lisp -*-(没有elisp-mode;只有emacs-lisp-mode)。在这个特定的例子中,这只是一个脚注,但无论如何它都是要修复的。 -
你运行的是哪个版本的 emacs?,因为这种方法仍然有效,所以建议用户使用更新的符号,比如在 ~/.emacs.d/init.el 中设置配置文件,而不是仅仅〜/ .emacs。但是,第一行适用于 carbon emacs 24.5.1。
标签: bash shell emacs command-line org-mode