From: vincent.belaiche@gmail.com (Vincent Belaïche)
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Cc: "Vincent Belaïche" <vincent.belaiche@gmail.com>
Subject: RE: SES local variables to define printers
Date: Thu, 30 May 2013 17:36:12 +0200 [thread overview]
Message-ID: <8061y0o4yb.fsf@gmail.com> (raw)
> From: monnier@iro.umontreal.ca
> To: vincent.b.1@hotmail.fr
> CC: emacs-devel@gnu.org
> Subject: Re: SES local variables to define printers
> Date: Thu, 30 May 2013 09:20:13 -0400
>
> > Ok you means _after_ the ses-cell declaration, just before those general
> > declarations (taken from examples.ses):
>
> For example. I don't think it matters much whether they come after or
> before the ses-cell calls.
>
I think it does if ses counts lines to access the ses-cell rows --- TBC.
[...]
>
> Elisp doesn't have buffer-local functions, indeed.
>
OK, good to know...
[...]
>
> Actually, you don't need to use the symbol at all.
I need the symbol, because for instance if the symbol is ses-dashfill or
math-format-value, then I would directly call the corresponding
symbol-function rather than indexing the hash map.
So I need some trick to know whether the symbol is a function name or a
printer function. One simple trick would be to set the symbol value slot
to some fixed value, e.g. to symbol :ses-printer. Another way would be
to try the hash-map first and then check whether it is a function as a
fallback, or the other way round. I could also set some property to the
symbol...
My preference would be to set the symbol value to some specific
indicator, I feel that the execution time would be faster this way.
But maybe I should not care too much about this: one could improve speed
by caching all printer functions directly in the cell object for faster
access, and keeping printer definitions in a cell property.
> In ses-cell, just check if the printer's name is found in your hash-map
> and if so, use the function you found there instead.
>
> This way, the user can give local names without having to worry about
> affecting other packages which might accidentally be using the
> same names.
>
>
> Stefan
BR,
Vincent.
next reply other threads:[~2013-05-30 15:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 15:36 Vincent Belaïche [this message]
2013-05-30 17:15 ` SES local variables to define printers Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2013-05-30 7:24 Vincent Belaïche
2013-05-30 5:50 Vincent Belaïche
2013-05-30 13:20 ` Stefan Monnier
2013-05-28 4:38 Vincent Belaïche
2013-05-28 4:57 ` Stefan Monnier
2013-05-26 20:25 Vincent Belaïche
2013-05-27 1:35 ` Stefan Monnier
2013-05-26 7:16 Vincent Belaïche
2013-05-26 18:02 ` Stefan Monnier
2013-05-25 20:43 Vincent Belaïche
2013-05-26 1:17 ` Stefan Monnier
2013-05-24 5:53 Vincent Belaïche
2013-05-24 5:46 Vincent Belaïche
2013-05-24 5:45 Vincent Belaïche
2013-05-24 13:28 ` Stefan Monnier
2013-05-23 20:52 Vincent Belaïche
2013-05-23 21:35 ` Davis Herring
2013-05-24 1:06 ` Glenn Morris
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=8061y0o4yb.fsf@gmail.com \
--to=vincent.belaiche@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.