From: David Kastrup <dak@gnu.org>
To: "Stephen J. Turnbull" <stephen@xemacs.org>
Cc: lekktu@gmail.com, emacs-devel@gnu.org,
Stefan Monnier <monnier@iro.umontreal.ca>,
rms@gnu.org
Subject: Re: frame-local variables weirdness
Date: Wed, 17 Oct 2007 23:03:28 +0200 [thread overview]
Message-ID: <85fy09e9nj.fsf@lola.goethe.zz> (raw)
In-Reply-To: <2bfd4e060710171029g30a62313naf31c5363d85d6ca@mail.gmail.com> (Stephen J. Turnbull's message of "Wed\, 17 Oct 2007 10\:29\:15 -0700")
"Stephen J. Turnbull" <stephen@xemacs.org> writes:
> FWIW, let me remind you that XEmacs has specifiers, which allow
> rather flexible mix and match of buffer-local, window-local, and
> frame-local properties. The point is that specifiers have a
> separate API, no unmarked magic.
And terminal-local and other stuff.
> This has been a workable compromise for me in those cases where I
> want to use it (eg, faces, where specifiers implement flexibility
> very similar to Emacs's defface; XEmacs's faces are implemented as a
> wrapper around a set of specifiers containing display properties).
> There are a few other cases where I've enjoyed the flexibility
> (usually controlling behavior of functions associated with active
> regions in a display, and in controlling display elements such as
> toolbars, tabs, and scrollbars).
>
> David Kastrup may have an informative opinion, since he found
> XEmacs's glyph (~ Emacs image) API, uh, "annoying" (and even its
> author admits it's probably excessively complex and detailed). But
> I'm not sure whether he objects to the idea of such an API, or
> merely to XEmacs's implementation in glyphs.
You should use quote marks only around things you actually quote. I
don't think I called them "annoying". I certainly was quite annoyed
when I fought with understanding them, but my annoyance was more
directed against their creators. "incomprehensible" would more likely
be a word I would have used to describe them.
My main problem with specifiers and locales and instantiators was (I
am using the past tense here not because I have by now understood
them, but because I have stopped investing any more time into them)
that they more or less magically change from one form to another, and
it is rather incomprehensible when they do which. I hear that the
documentation is supposed to be more comprehensive by now, but the
point is that the documentation needs to be (and is) all over the
place. In contrast, the *-local variables of Emacs need just a single
place in the manual to explain, giving all the _additional_ story
while working like a normal bindings otherwise. And that is something
which can be used and understood by non-magicians.
It may be considered sort of amusing that the opaque frame/terminal
variable mechanisms are used in the
we-don't-want-opaque-data-structures Emacs and the all-internals-open
specifiers in XEmacs. But the main problem in my book with the open
XEmacs data structures actually is that there is no reasonably
complete and actually employed API for accessing them. So one needs
to acquire an understanding of the internal structure of them if one
hopes to understand existing code, and mostly also for writing code of
one's own.
We have in preview-latex code like the following for XEmacs:
;;; [Courtesy Stephen J. Turnbull, with some modifications
;;; Message-ID: <87el9fglsj.fsf@tleepslib.sk.tsukuba.ac.jp>
;;; I could not have figured this out for the world]
;;; Hm, there really ought to be a way to get the spec that would be
;;; instantiated in a given domain
(when preview-tb-icon
(let ((tb (cdadar (or (specifier-spec-list default-toolbar (current-buffer))
(specifier-spec-list default-toolbar 'global)))))
(unless (member preview-tb-icon tb)
(set-specifier default-toolbar
(append tb (list preview-tb-icon))
(current-buffer)))))
There were actually quite a few more ugly examples with regard to
images in earlier times, but I have rewritten the general
functionality/API for the Emacs parts in order to make the worst
XEmacs counterparts be cleaner.
So basically my opinion is that one needs too many complex details in
order to write or understand code involving specifiers. While the
state of the documentation might have improved to a point where this
information is no longer generally lacking or distributed across a
maze of by-the-way entries, the main problem of the unavoidable
complexity one needs to understand for doing simple tasks remains.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
next prev parent reply other threads:[~2007-10-17 21:03 UTC|newest]
Thread overview: 67+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-05 13:41 frame-local variables weirdness Juanma Barranquero
2006-12-08 2:28 ` Juanma Barranquero
2006-12-09 1:26 ` Richard Stallman
2006-12-09 14:11 ` Juanma Barranquero
2006-12-10 4:24 ` Richard Stallman
2006-12-10 12:58 ` Juanma Barranquero
2007-10-11 9:42 ` Juanma Barranquero
2007-10-11 14:21 ` Stefan Monnier
2007-10-11 14:37 ` Juanma Barranquero
2007-10-11 17:33 ` Stefan Monnier
2007-10-11 19:00 ` Juanma Barranquero
2007-10-12 15:59 ` Richard Stallman
2007-10-12 16:33 ` Stefan Monnier
2007-10-14 16:29 ` Richard Stallman
2007-10-14 17:13 ` Juanma Barranquero
2007-10-14 17:51 ` David Kastrup
2007-10-15 16:04 ` Richard Stallman
2007-10-15 17:50 ` Stefan Monnier
2007-10-17 17:29 ` Stephen J. Turnbull
2007-10-17 18:05 ` Stefan Monnier
2007-10-18 5:03 ` Richard Stallman
2007-10-18 13:53 ` Stefan Monnier
2007-10-19 5:40 ` Richard Stallman
2007-10-19 13:56 ` Stefan Monnier
2007-10-20 3:30 ` Richard Stallman
2007-10-20 13:15 ` Stefan Monnier
2007-10-21 7:25 ` Richard Stallman
2007-10-21 14:24 ` Stefan Monnier
2007-10-21 14:56 ` Miles Bader
2007-10-21 19:20 ` Stefan Monnier
2007-10-22 2:26 ` Miles Bader
2007-10-22 9:01 ` Richard Stallman
2007-10-17 21:03 ` David Kastrup [this message]
2007-10-19 1:57 ` Stephen J. Turnbull
2007-10-17 23:53 ` Stefan Monnier
2007-10-18 12:45 ` Juanma Barranquero
2007-10-18 13:38 ` Stefan Monnier
2007-10-18 13:45 ` Juanma Barranquero
2007-10-18 14:10 ` Johan Bockgård
2007-10-18 16:40 ` Stefan Monnier
2007-10-19 17:42 ` Richard Stallman
2007-10-19 18:56 ` Stefan Monnier
2007-10-20 14:57 ` Richard Stallman
2007-10-21 2:03 ` Stefan Monnier
2007-10-22 9:00 ` Richard Stallman
2007-10-22 15:28 ` Stefan Monnier
2007-10-22 15:47 ` Juanma Barranquero
2007-10-22 16:01 ` Stefan Monnier
2007-10-22 16:17 ` Juanma Barranquero
2007-10-23 10:38 ` Richard Stallman
2007-10-23 20:31 ` Stefan Monnier
2007-10-24 8:33 ` Richard Stallman
2007-10-24 8:54 ` Johan Bockgård
2007-11-06 4:31 ` Chong Yidong
2007-11-06 8:37 ` Stefan Monnier
2007-11-06 10:48 ` Juanma Barranquero
2007-10-12 16:41 ` Juanma Barranquero
2007-10-13 6:41 ` Richard Stallman
2007-10-13 23:06 ` Juanma Barranquero
2007-10-18 12:44 ` Juanma Barranquero
2007-10-21 16:26 ` Richard Stallman
2007-10-21 16:33 ` Juanma Barranquero
2006-12-09 14:24 ` Juanma Barranquero
2006-12-09 15:26 ` Stefan Monnier
2006-12-09 17:59 ` Juanma Barranquero
2006-12-11 14:59 ` Richard Stallman
2006-12-11 15:57 ` Juanma Barranquero
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=85fy09e9nj.fsf@lola.goethe.zz \
--to=dak@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lekktu@gmail.com \
--cc=monnier@iro.umontreal.ca \
--cc=rms@gnu.org \
--cc=stephen@xemacs.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.