Renato Pontefice writes:

> Bruno,
> With the common you told me I reach che 972 /M-g c 972) and I found this:
>
> ;;;;;;Org mode configuration
>  Enable Org mode
> (require ‘org)
>
> Could be this the error?
>
> Now I’ve erased the two ;; save init.el and restart emacs, but now I obtain:
> -------------------------------------------------------------
> Warning (initialization): An error occurred while loading 
> ‘/Users/renatopontefice/.emacs.d/init.el’:
>
> Symbol's value as variable is void: Enable
>
> To ensure normal operation, you should investigate and remove the
> cause of the error in your initialization file.  Start Emacs with
> the ‘--debug-init’ option to view a complete error backtrace. Disable showing 
> Disable logging
> ———————————————————————————————
>
> What’s now…

Renato, adding to what Tomas and Bruno have explained to you very well,
you have another case in the init that you sent me by mail. Notice the
third line here:

------------------
;; Make Org mode work with files ending in .org
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
The above is the default in recent emacsen
(require 'org)
(setq org-log-done t)
------------------

Emacs will understand The line that begins "The above is the..." as
code, and it is not code but a comment to the code. Therefore, you must
protect that line with an escape character, which in Elisp is (at least)
one ";" (as Tomas explained to you):

;; Make Org mode work with files ending in .org
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
;; The above is the default in recent emacsen
(require 'org)
(setq org-log-done t)

And you also have another case, towards the end:

---------------------
(custom-set-variables
 ;;custom-set-variables was added by Custom.
 ;;If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
;; '(package-selected-packages '(org-contacts frame-tabs ebdb)))
::(custom-set-faces
;;  custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
;;)
--------------------

The first line (custom-set-variables) is the beginning of a code that is
commented out (= protected, so that Emacs doesn't read it). This line
should also be commented out (protected), with ;. Otherwise Emacs will
run into a code that starts but doesn't have a resolution.

If you fix that and the line that starts with "Enable", you should no
longer have errors in your init.

Best regards,

Juan Manuel 

Reply via email to