From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Typo in 'org-without-partial-completion' Date: Tue, 28 Jun 2011 18:48:24 +0200 Message-ID: <87ei2d7vhj.fsf@gnu.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:40686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbbSB-0001LR-7r for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 12:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QbbS9-0002t5-CZ for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 12:47:58 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:38435) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QbbS9-0002su-19 for emacs-orgmode@gnu.org; Tue, 28 Jun 2011 12:47:57 -0400 Received: by wwf22 with SMTP id 22so325555wwf.30 for ; Tue, 28 Jun 2011 09:47:55 -0700 (PDT) In-Reply-To: (Paul Sexton's message of "Wed, 22 Jun 2011 21:08:45 +0000 (UTC)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Paul Sexton Cc: emacs-orgmode@gnu.org Hi Paul, Paul Sexton writes: > I think there's an error in 'org-without-partial-completion' in org-macs.el. > The variable pc-mode gets bound to the value of partial-completion-mode - but > this is a VARIABLE (t if that mode is enabled). Funcalling the value of > the variable produces an error, unsurprisingly. This breaks insertion of > properties with 'org-set-property'. > > Fixing it involves quoting the the symbol as shown below: > > > (defmacro org-without-partial-completion (&rest body) > `(let ((pc-mode (and (boundp 'partial-completion-mode) > 'partial-completion-mode))) ; <-- quote added > (unwind-protect > (progn > (when pc-mode (funcall pc-mode -1)) > ,@body) > (when pc-mode (funcall pc-mode 1))))) You're right -- thanks for spotting this, and for the clear analysis. I've committed a patch. -- Bastien