From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arik Mitschang Subject: Bug: org-capture - org-vm store link requires buffer file not always present [7.4] Date: Wed, 09 Feb 2011 14:35:20 +1100 Message-ID: <41zqc6bp2l518n.fsf@mq.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=51107 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pn0pz-0007mE-Vi for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 22:35:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pn0pz-0001w6-1j for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 22:35:27 -0500 Received: from netdnsprod2.mq.edu.au ([137.111.226.228]:33274) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pn0py-0001vv-Ab for emacs-orgmode@gnu.org; Tue, 08 Feb 2011 22:35:27 -0500 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@gnu.org In VM if you have created a virtual folder, the buffer is not associated with any file. However, during org-capture a function called org-vm-store-link requires that the buffer (the vm folder in this case) be associated with a file causing a type-mismatch error. I can fix the problem with the following patch: ---------------------------------- diff -U3 /usr/local/share/emacs/23.2/site-lisp/org-vm.el /var/folders/Qm/Qm3iuPk7E18cewjBO5PgL5AVPiY/-Tmp-/buffer-content-66395kXL --- /usr/local/share/emacs/23.2/site-lisp/org-vm.el 2010-12-11 00:16:33.000000000 +1100 +++ /var/folders/Qm/Qm3iuPk7E18cewjBO5PgL5AVPiY/-Tmp-/buffer-content-66395kXL 2011-02-09 14:27:35.000000000 +1100 @@ -54,8 +54,12 @@ ;; Implementation (defun org-vm-store-link () "Store a link to a VM folder or message." - (when (or (eq major-mode 'vm-summary-mode) + (when (and (or (eq major-mode 'vm-summary-mode) (eq major-mode 'vm-presentation-mode)) + (save-excursion (vm-select-folder-buffer) + (eq (type-of buffer-file-name) + 'string))) (and (eq major-mode 'vm-presentation-mode) (vm-summarize)) (vm-follow-summary-cursor) (save-excursion ---------------------------------- Thanks Arik Emacs : GNU Emacs 23.2.1 (x86_64-apple-darwin10.5.0, X toolkit) of 2011-01-14 on IT-4064.local Package: Org-mode version 7.4