After starting Emacs I see in messages buffer
Ignoring unknown mode ‘org-mode-mode’
Where can I find the culprit ? I think you should just use "org" instead of "org-mode" somewhere. But where?
(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.
'(ansi-color-faces-vector
[default default default italic underline success warning error])
'(ansi-color-names-vector
["#242424" "#e5786d" "#95e454" "#cae682" "#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"])
'(cua-mode t nil (cua-base))
'(custom-enabled-themes '(deeper-blue))
'(desktop-load-locked-desktop t)
'(desktop-path '("~/.emacs.d/"))
'(package-selected-packages '(org)))
(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.
'(org-document-title ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif" :height 1.6 :underline nil))))
'(org-level-1 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif" :height 1.3))))
'(org-level-2 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif" :height 1.2))))
'(org-level-3 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif" :height 1.1))))
'(org-level-4 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif"))))
'(org-level-5 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif"))))
'(org-level-6 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif"))))
'(org-level-7 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif"))))
'(org-level-8 ((t (:inherit default :weight bold :foreground "gray80" :family "Sans Serif")))))
;; Begin from https://github.com/james-stoup/emacs-org-mode-tutorial:
;; Must do this so the agenda knows where to look for my files
(setq org-agenda-files '("~/Org"))
;; When a TODO is set to a done state, record a timestamp
(setq org-log-done 'time)
;; Follow the links
(setq org-return-follows-link t)
;; Associate all org files with org mode
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
;; Make the indentation look nicer
(add-hook 'org-mode-hook 'org-indent-mode)
;; Shortcuts for storing links, viewing the agenda, and starting a capture
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(define-key global-map "\C-cc" 'org-capture)
;; Wrap the lines in org mode so that things are easier to read
(add-hook 'org-mode-hook 'visual-line-mode)
(let* ((variable-tuple
(cond ((x-list-fonts "ETBembo") '(:font "ETBembo"))
((x-list-fonts "Source Sans Pro") '(:font "Source Sans Pro"))
((x-list-fonts "Lucida Grande") '(:font "Lucida Grande"))
((x-list-fonts "Verdana") '(:font "Verdana"))
((x-family-fonts "Sans Serif") '(:family "Sans Serif"))
(nil (warn "Cannot find a Sans Serif Font. Install Source Sans Pro."))))
(base-font-color (face-foreground 'default nil 'default))
(headline `(:inherit default :weight bold :foreground ,base-font-color)))
(custom-theme-set-faces
'user
`(org-level-8 ((t (,@headline ,@variable-tuple))))
`(org-level-7 ((t (,@headline ,@variable-tuple))))
`(org-level-6 ((t (,@headline ,@variable-tuple))))
`(org-level-5 ((t (,@headline ,@variable-tuple))))
`(org-level-4 ((t (,@headline ,@variable-tuple))))
`(org-level-3 ((t (,@headline ,@variable-tuple :height 1.1))))
`(org-level-2 ((t (,@headline ,@variable-tuple :height 1.2))))
`(org-level-1 ((t (,@headline ,@variable-tuple :height 1.3))))
`(org-document-title ((t (,@headline ,@variable-tuple :height 1.4 :underline nil))))))
;; Remember last session
(desktop-save-mode 1)
;;(save-place-mode 1)
;; Automatically save buffer on focus out
(defun full-auto-save ()
(interactive)
(save-excursion
(dolist (buf (buffer-list))
(set-buffer buf)
(if (and (buffer-file-name) (buffer-modified-p))
(basic-save-buffer)))))
;;(add-hook 'auto-save-hook 'full-auto-save)
(add-hook 'focus-out-hook 'full-auto-save)
;; Adding drawer on Headline insert
(require 'org-id)
(defadvice org-insert-heading (after add-id-stuff activate)
(template-myid))
(defun template-myid ()
(save-excursion
(insert "\n:PROPERTIES:\n:CREATED: "
(format-time-string "[%Y-%m-%d %a %H:%M]")
"\n:ID: "
(org-id-uuid)
"\n:END:")))
;; Collapse lists by default
(setq org-cycle-include-plain-lists 'integrate)
;; https://stackoverflow.com/questions/22200312/refile-from-one-file-to-other
;;(setq org-refile-use-outline-path 'file) ; Top level refiles
(setq org-refile-targets '((nil :maxlevel . 9)
(org-agenda-files :maxlevel . 9)))
(setq org-outline-path-complete-in-steps nil) ; Refile in a single go
(setq org-refile-use-outline-path t) ; Show full paths for refiling
;; Delay restoring the desktop in daemon mode until the first client connects
(add-hook 'server-after-make-frame-hook
(lambda ()
"Functions to apply until the first client connects"
(desktop-read)))
--debug-init
flag?mode
variable, either at the top of the file or at the end..org
file in buffer list contained-*- mode: org-mode -*-
instead of-*- mode: org -*-
. SOLVED !auto-mode-alist
contains an entry assigningorg-mode
to files whose names have an.org
suffix (as it does by default), then you don't need to specify the mode as a file local variable: you can delete that line if that's the only variable specified.