emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Simple Tasks, new TODO category


From: Drew Adams
Subject: RE: Simple Tasks, new TODO category
Date: Fri, 25 Jan 2008 09:29:48 -0800

> >>> A non-printable seems very obscure, though. I'd think using a (seldom)
> >>> printable (with a way to escape it, of course) might be more friendly.
> >>> Why not use underscore, as GTK does (and translate
> >>> appropriately to the target platform)?
> >>>
> >> XEmacs uses %_, which is even less likely to be used in a menu item
> >> name, and has the benefit of not appearing in any key binding so we
> >> wouldn't have to do any escaping of key bindings that are
> >> automatically added to the menu.
> >
> > Sorry to chime in once more, but I again get the impression
> > that you are speaking about giving a special interpretation to a
> > displayable character that might appear in a menu item, and that
> > you are trying to find a character or string that is "less likely
> > to be used in a menu item name".
>
> GUI toolkits do this already. If the character(s) used are rare enough
> that it is unlikely to break existing code, and the special purpose is
> well documented, I don't see where the harm is. Fixing the problem for
> any cases that do break will be simple, and using the characters already
> used by XEmacs for 5 years will make it likely that any such problems
> have already been dealt with.

Well, I don't really want to argue about it. I'll just go on record as
saying that it is a (classic) mistake. We should at least provide an escape
syntax for such a "special" character.

IIRC, Lennart long ago treated `&' as such a special char for just this
purpose in some of his code. I had a menu item that used `&' to abbreviate
`and', and bingo - busted. I even use a pilcro (the "rare" paragraph symbol)
to abbreviate "Paragraph" in some menus. Someone might even have a menu to
let you insert special characters that are difficult to type in some
contexts. It's a mistake to assume that menu items will not include some
"rare" character.

Don't forget too that there are menu items that are constructed dynamically.
They include Imenu items, buffer names, and frame names. And someone might
use :keys for a key description that includes a "special" char. Do you
really think that we won't encounter "special" chars or strings in someone's
variable name or buffer name or key description or (heaven forbid)
special-character menu?

This sounds like a bad idea to me, and an unnecessary one AFAICT. But do as
you like.

(FWIW, I haven't seen the reason for going this route instead of using a
non-printable character, but I haven't followed the thread closely.)







reply via email to

[Prev in Thread] Current Thread [Next in Thread]