From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eddward DeVilla" Subject: link bug Date: Mon, 6 Nov 2006 11:44:27 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gh8WR-0006Zo-9x for emacs-orgmode@gnu.org; Mon, 06 Nov 2006 12:44:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gh8WM-0006W9-4K for emacs-orgmode@gnu.org; Mon, 06 Nov 2006 12:44:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gh8WL-0006W6-W6 for emacs-orgmode@gnu.org; Mon, 06 Nov 2006 12:44:30 -0500 Received: from [66.249.92.168] (helo=ug-out-1314.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gh8WL-0001di-Ue for emacs-orgmode@gnu.org; Mon, 06 Nov 2006 12:44:30 -0500 Received: by ug-out-1314.google.com with SMTP id j3so1010592ugf for ; Mon, 06 Nov 2006 09:44:28 -0800 (PST) Content-Disposition: inline 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: emacs-orgmode Hi, I'm not on the latest version yet and it will be a few day until I can get there. However, I found a bug in 4.51 when trying to store a link using C-c C-l. I believe that's org-insert-link. In any case org-insert-link gets called in there somewhere and dies calling (file-truename buffer-file-name) to determine if the link is in the same file as the org buffer. This is invalid when the buffer doesn't have a file behind it. There needs to be a check to make sure buffer-file-name is not nil. (Or org has to not allow file-less buffers). The reason for the file-less buffer was that I've started creating small outlines with links when I want to throw together a quick code review. I'm not sure what the right answer is. may you just skip the case if there is not file behind the buffer since links into file-less buffer would seem to be impossible. On the other hand, You may want to allow links back to the same buffer just in case the user decides to save it to a file later. For now, I'm going to hack mine by wrapping the "(if (equal ..." inside an "(if (buffer-file-name) ..." Edd