emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] orgstruct-mode error


From: Carsten Dominik
Subject: Re: [Orgmode] orgstruct-mode error
Date: Mon, 27 Aug 2007 05:16:26 +0200

Fixed, thanks.

- Carsten

On Aug 26, 2007, at 0:48, David O'Toole wrote:


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/


_______________________________________________
Emacs-orgmode mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477





reply via email to

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