From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: orgstruct-mode error Date: Mon, 27 Aug 2007 05:16:26 +0200 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IPV5Z-0003j1-9g for emacs-orgmode@gnu.org; Sun, 26 Aug 2007 23:16:29 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IPV5Y-0003hX-Jn for emacs-orgmode@gnu.org; Sun, 26 Aug 2007 23:16:28 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IPV5Y-0003hA-7G for emacs-orgmode@gnu.org; Sun, 26 Aug 2007 23:16:28 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IPV5X-0001rq-T4 for emacs-orgmode@gnu.org; Sun, 26 Aug 2007 23:16:28 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David O'Toole Cc: emacs-orgmode@gnu.org 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("=C6 @=C7=3D!=C8=C9=CA\"=CB=C9!=1AA@)=A2=CC=3D!=C8=CD=CA= \"=CE=0B!=CF=20 >> =D0 !\fc=D1ed\"VWeb=D2=A5y`=1Bdb=D2=A5Zy=0E`|)=D3ceb=D4=D5=D6 \"=D7 = =D4=D8!=D9=CA=1C=1D=D4=D8!=8A=DA +=D9"=20 >> [unread-command-char debugger-args x debugger-buffer noninteractive=20= >> debugger-batch-max-lines -1 debug backtrace-debug 4 t backtrace-frame=20= >> lambda 5 pop-to-buffer debugger-mode debugger-setup-buffer=20 >> count-lines 2 "...\n" message "%s" buffer-string kill-emacs "" nil=20 >> 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=20 > "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"=20 > :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) > > > > > --=20 > David O'Toole > dto@gnu.org > http://dto.freeshell.org/notebook/ > > > _______________________________________________ > Emacs-orgmode mailing list > Emacs-orgmode@gnu.org > 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