emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] orgstruct-mode error


From: David O'Toole
Subject: [Orgmode] orgstruct-mode error
Date: Sat, 25 Aug 2007 18:48:18 -0400
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1.50 (gnu/linux)

I am using org 5.05 and get this error when doing org-cycle in an
emacs-lisp-mode buffer (with Orgstruct mode on)

> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   re-search-forward(nil 6690 t)
>   org-cycle-hide-drawers(contents)
>   run-hook-with-args(org-cycle-hide-drawers contents)
>   org-cycle(t)
>   org-cycle-global()
>   call-interactively(org-cycle-global)
>   recursive-edit()
>   byte-code("Æ        @Ç=!ÈÉÊ\"ËÉ!A@)¢Ì=!ÈÍÊ\"Î!Ï Ð 
> !\fcÑed\"VWebÒ¥y`dbÒ¥Zy`|)ÓcebÔÕÖ \"× ÔØ!ÙÊÔØ!ŠÚ +Ù" [unread-command-char 
> debugger-args x debugger-buffer noninteractive debugger-batch-max-lines -1 
> debug backtrace-debug 4 t backtrace-frame lambda 5 pop-to-buffer 
> debugger-mode debugger-setup-buffer count-lines 2 "...\n" message "%s" 
> buffer-string kill-emacs "" nil recursive-edit middlestart buffer-read-only 
> standard-output] 4)
>   debug(error (wrong-type-argument stringp nil))
>   re-search-forward(nil 6690 t)
>   org-cycle-hide-drawers(contents)
>   run-hook-with-args(org-cycle-hide-drawers contents)
>   org-cycle(t)
>   org-cycle-global()
>   call-interactively(org-cycle-global)

Here is the code I use to set up the buffer:


;; global consistent org cycling keys

(defun org-cycle-global ()
  (interactive)
  (org-cycle t))

(defun org-cycle-local ()
  (interactive)
  (save-excursion
    (move-beginning-of-line nil)
    (org-cycle)))

(global-set-key (kbd "M-[") 'org-cycle-global)
(global-set-key (kbd "M-]") 'org-cycle-local)

(add-hook 'emacs-lisp-mode-hook #'orgstruct-mode)

;;;; Fontifying todo items outside of org-mode

(defface todo-comment-face '((t (:background "red" :foreground "yellow" :weight 
bold :bold t))) "Face for TODO in code buffers.")
(defvar todo-comment-face 'todo-comment-face)
(defun fontify-todo () 
  (font-lock-add-keywords nil '(("\\<\\(TODO\\)\\>" 
                                 (1 todo-comment-face t)))))

(add-hook 'emacs-lisp-mode-hook #'fontify-todo)


(defface headline-face '((t (:foreground "white" :underline "white" :background 
"navyblue"))) "Face for headlines.")
(defvar headline-face 'headline-face)

(defun fontify-headline () 
  (font-lock-add-keywords nil '(("^;;;;* \\(.*\\)\\>" 
                                 (1 headline-face t)))))


(add-hook 'emacs-lisp-mode-hook #'fontify-headline)




-- 
David O'Toole 
address@hidden
http://dto.freeshell.org/notebook/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]