From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Buffer local alias?
Date: Tue, 14 Jan 2014 14:39:39 -0500 [thread overview]
Message-ID: <87a9ey5p50.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: m1iotmxub5.fsf@poto.myhome.westell.com
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
next prev parent reply other threads:[~2014-01-14 19:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 19:00 Buffer local alias? Thomas S. Dye
2014-01-14 19:39 ` Nick Dokos [this message]
2014-01-14 19:44 ` Bastien
2014-01-14 20:12 ` Thomas S. Dye
2014-01-14 21:49 ` Andreas Leha
2014-01-15 0:05 ` Thomas S. Dye
2014-01-15 8:41 ` Andreas Leha
2014-01-15 8:51 ` Eric S Fraga
2014-01-15 9:33 ` Sebastien Vauban
2014-01-15 9:50 ` Andreas Leha
2014-01-15 19:59 ` Achim Gratz
2014-01-15 20:40 ` Andreas Leha
2014-01-16 16:44 ` Achim Gratz
2014-01-16 16:54 ` Rick Frankel
2014-01-16 17:51 ` Thomas S. Dye
2014-01-15 9:30 ` Sebastien Vauban
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a9ey5p50.fsf@alphaville.bos.redhat.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.