Myles English <mylesengl...@gmail.com> wrote: > > Hi, > > Can anyone see what I am doing wrong here? I just want to open a file > ~/tmp/gtd.org and goto the heading "* My workflow". So, starting like > this: > > emacs -Q -l ~/tmp/gtd > > with ~/tmp/gtd: > > (add-to-list 'load-path > "~/.emacs.d/plugins/org-mode/lisp") > (require 'org-install) ;; to use the emacs-org-mode rather than the one > ;; installed with emacs > > (defun gtd() > (interactive) > (find-file "~/tmp/gtd.org") > (goto-char (point-min)) > (setq wf "My workflow") > (org-goto-local-search-headings wf nil nil) > ) > > and ~/tmp/gtd.org: > > * My workflow > > then I do: > > M-x gtd > > and get the message: > > byte-code: Search failed: "My workflow" >
Works for me: the cursor is placed at the end of the headline. I tried both with just the one headline and also with half a dozen. Maybe M-x toggle-debug-on-error and try again to get a backtrace? Or add (setq debug-on-error t) to your initialization file. Nick