From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: [PATCH] Fix org-goto when no file exists for a buffer Date: Thu, 10 Dec 2009 09:15:59 +0100 Message-ID: References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NIehl-0005fR-EI for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NIehg-0005Y5-9V for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:56 -0500 Received: from [199.232.76.173] (port=35855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NIehf-0005Xt-Td for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:51 -0500 Received: from mail-ew0-f224.google.com ([209.85.219.224]:42884) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NIehf-0000qy-Fv for emacs-orgmode@gnu.org; Thu, 10 Dec 2009 03:48:51 -0500 Received: by mail-ew0-f224.google.com with SMTP id 24so8984965ewy.26 for ; Thu, 10 Dec 2009 00:48:51 -0800 (PST) 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: Paul Griepentrog Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Dec 10, 2009, at 12:13 AM, Paul Griepentrog wrote: > Thanks for Org-mode! > > Every once in a while I use org-mode in a buffer that is not > associated with a file... and then org-goto gets confused. To repeat: > > BUFFER-NO-FILE > --------------- > * One > - a > * Two > - b > --------------- > > M-x org-mode > C-c C-j > org-get-refile-targets: Wrong type argument: stringp, nil > > ;; Environment & Settings > Org-mode version 6.33trans > "GNU Emacs 23.1.1 (i386-mingw-nt5.1.2600) > of 2009-07-29 on SOFT-MJASON" > > ;; Org keybinding preferences > (setq > org-M-RET-may-split-line nil > org-completion-use-ido t > org-fast-tag-selection-single-key 'expert > org-goto-interface 'outline-path-completion > org-outline-path-complete-in-steps nil ; use iDo when > jumping > org-refile-targets '((nil :maxlevel . 2)) > ; Search current buffer, > upto depth=2 > org-special-ctrl-a/e t > org-special-ctrl-k t) > > This patch fixes it: > > --- c:/cygwin/home/pgriepentrog/rc.git/emacs/download/org-mode.git/ > lisp/org.el 2009-12-09 > 13:45:42.031250000 -0800 > +++ c:/cygwin/home/pgriepentrog/Local/share/emacs/site-lisp/org.el > 2009-12-09 > 14:17:57.203125000 -0800 > @@ -8986,9 +8986,9 @@ > (with-current-buffer > (if (bufferp f) f (org-get-agenda-file-buffer f)) > (if (bufferp f) (setq f (buffer-file-name (buffer-base-buffer > f)))) > - (setq f (expand-file-name f)) > (if (eq org-refile-use-outline-path 'file) > - (push (list (file-name-nondirectory f) f nil nil) targets)) > + (progn (setq f (expand-file-name f)) > + (push (list (file-name-nondirectory f) f nil > nil) targets))) > (save-excursion > (save-restriction > (widen) > > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten