From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Bug: org-capture - org-vm store link requires buffer file not always present [7.4] Date: Wed, 09 Feb 2011 17:19:08 +0100 Message-ID: <878vxpnptv.fsf@gnu.org> References: <41zqc6bp2l518n.fsf@mq.edu.au> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=40301 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnClC-00081f-3h for emacs-orgmode@gnu.org; Wed, 09 Feb 2011 11:19:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnCl8-0002qE-U2 for emacs-orgmode@gnu.org; Wed, 09 Feb 2011 11:19:17 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:36569) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnCl8-0002q0-Ns for emacs-orgmode@gnu.org; Wed, 09 Feb 2011 11:19:14 -0500 Received: by wwb17 with SMTP id 17so335350wwb.30 for ; Wed, 09 Feb 2011 08:19:13 -0800 (PST) In-Reply-To: <41zqc6bp2l518n.fsf@mq.edu.au> (Arik Mitschang's message of "Wed, 09 Feb 2011 14:35:20 +1100") 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: Arik Mitschang Cc: emacs-orgmode@gnu.org Hi Arik, Arik Mitschang writes: > 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: This looks fine to me, but I'm not using VM. Can some VM user double-check this? > ---------------------------------- > 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))) (Better use (stringp buffer-file-name) instead of type-of.) -- Bastien