From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Bug (?) adding attachment to note in remember buffer Date: Tue, 18 Nov 2008 10:08:03 +0100 Message-ID: References: <492199C1.4040002@sift.info> Mime-Version: 1.0 (Apple Message framework v929.2) 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 1L2MZ6-0007cZ-IP for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 04:08:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L2MZ5-0007c9-Vq for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 04:08:08 -0500 Received: from [199.232.76.173] (port=42433 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L2MZ5-0007c4-QP for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 04:08:07 -0500 Received: from ug-out-1314.google.com ([66.249.92.173]:63354) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L2MZ5-0003m6-CN for emacs-orgmode@gnu.org; Tue, 18 Nov 2008 04:08:07 -0500 Received: by ug-out-1314.google.com with SMTP id 36so166243uga.17 for ; Tue, 18 Nov 2008 01:08:05 -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: Robert Goldman Cc: org-mode Org-Mode I forgot to say: If you really want to create attachments from remember buffers, you need to set org-attach-directory to an absolute path, because the default directory for a remember buffer may vary. - Carsten On Nov 18, 2008, at 8:59 AM, Carsten Dominik wrote: > Fixed, thank for the report. > > - Carsten > > On Nov 17, 2008, at 5:20 PM, Robert Goldman wrote: > >> When I try to add an attachment to a note in the remember buffer, I >> get >> an error that looks like this: >> >> Debugger entered--Lisp error: (wrong-type-argument arrayp nil) >> file-truename(nil) >> byte-code(xxxxx [org-id-locations list locs file id nil file-truename >> throw exit t] 3) >> org-id-add-location("xvsc3fr01ge0@sift.info" nil) >> org-id-get(353 t) >> org-attach-dir(t) >> org-attach-attach("~/Desktop/hold-notification.eml" nil) >> call-interactively(org-attach-attach) >> org-attach() >> call-interactively(org-attach) >> >> [sorry about the byte-code-garble] >> >> This is on the latest version, pulled from git this morning. >> >> Clearly what's wrong is the call to org-id-add-location with NIL as >> the >> FILE argument. That's the proximal cause. The root cause seems to >> be >> that when we call (buffer-file-name (buffer-base-buffer)) inside a >> buffer created by org-remember, it returns nil (buffer-base-buffer >> is nil). >> >> This suggests that the org-attachment code needs a special way of >> handling attachment placement when it's invoked inside remember. >> >> A short-term fix might be to use advice to intercept calls to org- >> attach >> when invoked inside a remember buffer and have it raise an error and >> tell you to wait until the remember note has been filed before >> adding an >> attachment. >> >> [as an aside, this whole mess is caused because I have no way to >> create >> an org link to an email from Thunderbird, so I have to handle all my >> email-related tasks through attachments. Grrrr....] >> >> An alternative would be to have org-id-get handle remember buffers >> specially. org-remember has some default location for putting its >> new >> item, and that could presumably be looked up. However, given that >> one >> has the possibility of changing the destination of the note, this >> would >> have to be handled carefully. If (a) org-refile handles relocating >> attachments correctly and (b) the code in org-remember for handling, >> e.g., C-1 C-c C-c. uses the org-refile code; then this should be >> relatively easy to handle. >> >> Best, >> Robert >> >