From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Buffer local alias? Date: Tue, 14 Jan 2014 14:39:39 -0500 Message-ID: <87a9ey5p50.fsf@alphaville.bos.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W39qB-0007yG-Cn for emacs-orgmode@gnu.org; Tue, 14 Jan 2014 14:40:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W39q5-0007sP-8r for emacs-orgmode@gnu.org; Tue, 14 Jan 2014 14:39:59 -0500 Received: from plane.gmane.org ([80.91.229.3]:39578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W39q5-0007sB-2M for emacs-orgmode@gnu.org; Tue, 14 Jan 2014 14:39:53 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W39q3-0002OD-CZ for emacs-orgmode@gnu.org; Tue, 14 Jan 2014 20:39:51 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jan 2014 20:39:51 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 14 Jan 2014 20:39:51 +0100 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: emacs-orgmode@gnu.org tsd@tsdye.com (Thomas S. Dye) writes: > Aloha all, > > My evolving reproducible research documents make use of Dan Davison's > idea recently re-introduced by Seb Vauban: > > * Local variables :noexport: > > # Local Variables: > # eval: (org-sbe "setup-common-lisp") > # End: > > Here, the source code block named `setup-common-lisp' is defined > elsewhere in the file. > > The problem from the point of view of reproducible research is that > org-sbe used to be named sbe, so for the research to be reproducible > across that recent change I need to be able to configure things so the > command that happens to be on the user's computer is used. > > I read about defalias and saw that this should be used at the > point that the original definition is made, so I followed the pointer to > fset and naively tried this in the local variables: > > # eval: (and (boundp 'org-sbe) (not (boundp 'sbe)) (fset 'sbe 'org-sbe)) > # eval: (sbe "setup-common-lisp) > > But this gets me the following error: > > File local-variables error: (void-function sbe) > > Can someone offer a suggestion? > Use fboundp, instead of boundp: the latter checks the variable binding slot, whereas the former checks the function binding slot. Nick