[Top][All Lists]

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

Re: What does 'run' do in cperl-mode?

From: Xah
Subject: Re: What does 'run' do in cperl-mode?
Date: Wed, 30 Jul 2008 10:32:12 -0700 (PDT)
User-agent: G2/1.0

On Jul 30, 8:15 am, Alan Mackenzie <address@hidden> wrote:
> Hi,Xah!
> This has got up to nearly 500 lines.  I'm going to be doing some serious
> pruning.
> On Tue, Jul 29, 2008 at 03:50:53PM -0700,Xahwrote:
> > On Jul 29, 11:27 am, Alan Mackenzie <address@hidden> wrote:
> > Let's get clear on exactly what is the proposed change.
> > (1) change all notations of M-key and C-key in emacs manual to Alt+key
> > and Ctrl+key notation. Just to be more precise, the source of emacs
> > manual is the texinfo source code, which are plain file. It generates
> > the info files.
> > (2) change somewhere in elisp source code, so that menu show shortcuts
> > with the Alt+ and Ctrl+ notation.
> > Note that elisp keymacro isn't in the proposed change, nor that elisp
> > function such as ???kbd???.
> Ah, right.  Yes, I had automatically assumed that part of your change
> would be using "A-" instead of "M-" in key sequences.  You've made clear
> that I had misunderstood.

Sure thing! Thank you.

> Let me suggest that telling somebody "to bind an ALT-key comination, use
> the \M- prefix; don't use \A-, because this will instead create a
> keybinding for what used to be called the ALT-key, but isn't...." will
> cause much more confusion than we have at the moment.  The great thing
> about "Meta" is that there's no key called that on a PC keyboard, so it's
> just a matter of saying "Use the alt key".

I don't think this is a problem.

The Alt- notation makes emacs easy to use for beginners.

For any programers or elite user who wants to do emacs customization
or key rebinding, they can easily understand that the syntax “M-” is
stands for Meta and is by default mapped to the Alt key.

(to quip the hardcore geeker: if one find this confusing, perhaps he
isn't fit to code elisp.)

Lisp itself has lots of unfixable baggage in the key macro syntax. For
example, there's also Hyper, Super, with syntax “H-” and “s-”. These
keys doesn't exist today (but one can bind them just like Meta, of
course). Further, there are quite a lot variations of the keyboard
macro syntax. I have written a essay on this, about 2700 words,
available at:

The Confusion of Emacs's Keystroke Representation

Here's is one excerpt on lisp code to rebind the Enter key:

 ; equivalent code for a named special key: Enter
 (global-set-key "\r" 'func-name)
 (global-set-key [?\r] 'func-name)
 (global-set-key [13] 'func-name)
 (global-set-key [(13)] 'func-name)
 (global-set-key [return] 'func-name)
 (global-set-key [?\^M] 'func-name)
 (global-set-key [?\^m] 'func-name)
 (global-set-key [?\C-M] 'func-name)
 (global-set-key [?\C-m] 'func-name)
 (global-set-key [(?\C-m)] 'func-name)
 (global-set-key (kbd "RET") 'func-name)
 (global-set-key (kbd "<return>") 'func-name)

I dare say that half of emacs developers, can't explain fully every
variation above in exacting detail.

There's also some syntax that compile but no effect:

 (global-set-key (kbd "M-S-b") 'forward-word) ; compile but no effect

In summary, if we adopt Alt+key notation in manuals and menus, i do
not think it introduces any confusion when it comes to the elisp
coding or emacs customization related to keybindings. I think it
actually makes it simpler. The logic is like this:

* There is a Meta key. (due to emacs history)
* The Meta is mapped to Alt key on PC keyboards.
* The keyboard macro syntax for the Meta key is "M-".

> [ .... ]
> > > > Further, i'm not an experienced elisp coder as most of them are.
> > > I would recommend you to get experienced.  Like Emacs, elisp is
> > > supremely easy to use, but unlike Emacs, it's also very easy to
> > > learn (compared with monstrosities like C++ or Java).
> > Alan, don't start, ok? :)
> > (I'm no newbie and you knew. I started computer programing in ~1993,
> > started paid programing job in 1995...)
> I'm unsure how much elisp programming you've done.  You're not exactly
> being helpful in clarifying this.
> [ .... ]
> > As of now, i'm not sure i want to initiate the processing of actually
> > sending in code to GNU org for many social reasons. I don't mean to be
> > superficially mysterious... but for one thing, some (or perhaps
> > several) people don't necessarily like me due to my newsgroup posts.
> In free software development, personal like/dislike barely exists.  You
> ARE your contributions.  The person who was calling you bad names last
> week will warmly thank you for your new and useful contribution next
> week.

Ideally, every one loves every one else in the FreeSoftware community.
In reality, hardly.

In fact, factions that don't get alone are rather the norm. vi vs
emacs, emacs vs xemacs, KDE vs Gnome, OpenSource vs FreeSoftware,
(open source) Common Lisps vs (open source) Schemes, ... etc. These
are rather just a few large scale examples. Personal level examples
and forking are less public but easy to find.

For example, to this day, there are few people i know online, who has
written elisp packages, will simply refuse, explicitly, any effort to
have their package be part of GNU emacs. And slurs towards RMS are all
over the place among programing project's online forums.

You may know, that there's also SXemacs, which is another emacs fork
(from Xemacs root) in as recent as 2004.

Among all the forked projects in OpenSource or Freesoftware, i think
you might agree, that there's rather not that much mutual loving.

> > Also, i'm not sure i want to be part of FSF or GNU. Sure i support
> > their ideas in general, but the OpenSource or FreeSoftware fervor
> > sometimes i cannot take as good to society.
> That you have in common with lots of free software developers, including
> quite a few in the Emacs project.
> [ .... ]
> > > >
> > > With all due respect, that article is a bit superficial.  It ignores
> > > the work which would be needed to change, and it fails to argue that
> > > the change is important enough to be worth even a small amount of
> > > work.  It seems more to be arguing that if we were starting from
> > > scratch, the term "alt" would be the better one.  I agree with that.
> > well as mentioned before... i'm just thinking about the change in the
> > manual, and the change in shortcut notation that shows up in menus. No
> > change proposed for macros or any elisp function. I think that's more
> > of what you are thinking.
> Yes, it was.  As already said, I think changing the manual to "Alt", but
> leaving the key name as "meta" or "\M-" in the lisp would cause much
> worse confusion than changing both consistently.
> > I do think the change is important, because it makes emacs easier to
> > use. The difficulty to start using emacs is one of the most cited
> > criticism of emacs.
> I think this difficulty is essential to Emacs.  If you "simplified"
> (i.e. dumbed down) Emacs to the point where newbies would find it easy,
> what you would be left with wouldn't be Emacs, but some pale shadow of
> it.

Egad, i'm surprised you would put it that way explicitly.

Seems you just find "difficult to use" for the sake of itself

> [ .... ]
> > The thing is, as i learned more in responding to people in this thread,
> > that some issue you just have to talk it out in detail. There are a lot
> > misunderstandings.
> One of the reasons we have address@hidden
> [ .... ]
> > > > The reason i gave, about why ... is better, is summarized like this:
> > > > Universally understood
> > > > Notation Same as Key Label
> > > > Meta is Alt in practice
> > > > Keyboards don't have Meta key today
> > > > Can you point out, if any of these points are wrong, or other reasons
> > > > this change is just bad?
> > In last post, you mentioned some side effect of breaking customization
> > lisp codes. But i hope to clarify here, that no lisp code change is
> > proposed other than getting menus to display the new notation.
> > I think that's your main point, but i couldn't think of other major
> > points you are arguing against?
> The incompatibility between calling the key "Alt" in the manual, but
> "meta" or "\M-" in the code would be horrible.  Which convention would
> the doc-strings follow?  Inevitably, some would say "alt", some would say
> "meta".  It would be ghastly.

Function or variable's doc-string are parsed before they are
displayed. So, just like in menus, M- will be shown as Alt+.

> > > repeat myself: it would be far too much work to be worthwhile, and it
> > > wouldn't solve a problem, because nobody gets confused more than
> > > momentarily by the term "meta" anyway.
> > I think it's rather major confusion.
> How many Emacs users do you know who, beyond their first day or two of
> Emacs use, have difficulty with the term "meta"?  I know of none, and I
> think I only know one person who is irritated by it (yourself, of
> course).

There are stories we sometimes see here, that people say how they
loves emacs once they got over the initial hurdle.

But we can look at the situation from the other way. For each such
people, there are perhaps one hundred or one thousand times more of
people, who simply looked at emacs for 5 minutes, and refused to look
at emacs again for the rest of their programing career.

I know a lot people like that. In fact, perhaps 95% of programers i
know in my life refuse to have anything to do with emacs.

This fact can be easily checked online too. You can simply do polls in
any particular programing community of the thousands that are online.
Unless the community you picked is emacs or lisp related, it's likely
that less that 1% of professional programers use emacs.

If we poll for opinion why didn't they use emacs. It has so many great
features, a whole embeded language, so flexible, so powerful, but why
didn't they use it??? The first thing they tell you, is difficult to
use and crazy key combinations.

Is it really difficult to use? No, if you ask me or you. But where the
difficult to use senses came from? That's due to the million little
things like weird notations M- C- and weird terminologies (reversal of
Windows/Frame), non-standard shortcuts, weird names for copy/paste
like kill-ring yank kill-ring-save ...etc.

Can emacs fix these problems? Yes, absolutely, to some degree. Most of
these are historical. Nobody is to say kill-ring or yank is worse or
better term than copy/cut/paste. When emacs was around, there is
little or no other apps. Emacs was there first. But that attitude is
not practical in solving things. Computer indusry moves by various
forces, and today we have Copy/Cut/Paste as the standard, unirversally
understood terms, and XCV are the standard shortcuts.

Emacs can fix most of these usability problems at the user level.

The terms used in elisp and its function is rather hard to change, but
no change there is necessary. For those who are into writing elisp, he
is into the realm of programing, no longer a simple user.

> I think also that you picture two distinct categories of Emacs users:
> Emacs developers, and "ordinary" users, and your change is for the
> benefit of the latter.  The project's view is that their is no rigid
> distinction between "users" and "implementors" - there is a continuous
> spectrum of elisp capability, and every user should be encouraged to
> develop her lisp skills to customize her own Emacs optimally.
> > we have to look at in a social way. Sure, tech geeker may say that any
> > who can't understand a name alias is a idiot and not fit to use emacs.
> > That's rather a bad attitude and most of the time not seriously said.
> I think a worse attitude is to patronise users, to write software for
> people "not as clever as yourself".

I don't think that's a good philosophy.

For example, should one advocate slide-rule or abacus than the dumb-
down hand-held calculators?

Things improve and progress in society. Whenever new tech is invented,
throughout history, in general there's resistance by old timers,
calling it dumb down, for kids, novelty, often to the degree of being
insulted if suggested to use it. Examples include hand-held
calculator, symbolic math software, mechanical type-writter, credit
card, arabic numeral (as opposed to Roman Numerals). These few i
actually know a bit of their history.

from another way of looking at it... we can look at the success of
Microsoft. Sure, some tech geeker thinks because they break the law.
But that's not very fair. Microsoft rose to success and dorminate the
market in the early 1990s mostly due to its high quality/price ratio.
You may argue that this is not true... but even today, most people
simply choose Microsoft products such as its VisualStudio, including
many hard-core professional programers at our level.

For another example, consider Apple's Xcode. If would be silly, if the
Xcode designers say to themselves: No, we need to make it hard to use,
so that dumb people won't be able to use it.

> > software needs to be easy to use. Those not easy to use just become
> > less and less popular and eventually obsolete. Emacs has dwindling
> > user base.
> Software needs to be easy to use; Emacs is supremely easy to use - it's
> just difficult to learn.  I don't think you've ever really thought
> through the difference between "easy to use" and "easy to learn".

I agree actually that emacs is easy to use. In fact i agree it is even
easy to learn. Perhaps it is more correct to say, that emacs is more
difficult to learn in comparison to other editors. However, when we
compare what the software/editor is capable of, then emacs's time-to-
learn/power-and-capability is far less then other editors.

However, emacs still can use many improvements. In my opinion,
adopting the Alt+ and Ctrl+ notation for keyboard shortcut, is one of

It will make emacs even more easier to learn. With this adoption,
users no longer needs to read in the slapsh screen that C means
Control and M means Meta which is Alt. So, one step of learning is

> If the Emacs user base is dwindling (I think it is), it is because other
> products have caught up to a large extent with Emacs's features.  But for
> those seeking the ultimate in ease of use and customisability, I haven't
> seen anything else even close to Emacs.
> Most software aims for the "easy to learn" user base.  "Why, just hold
> down the <shift> key and move the cursor to "select" (i.e. mark) some
> text.  What could be easier?"  Actually, almost any other way of marking
> text is easier and better, just it takes more effort to learn.

No argument from me here. Some standard practice, such as holding down
shift then press arrow key to select, is in my opinion very
inefficient. Emacs's way is much better.

> [ .... ]
> > > Let me try again.  This change, even if it could be achieved in a few
> > > hours' hacking would cause incompatibilities in existing code,
> > Note that no change in elisp code is involved, other than the one to
> > make the menu show the new notation.
> > All existing elisp code should behave as is.
> The incompatibilities between the documentation "alt" and lisp "meta"
> would make Elisp coding more difficult, more frustrating.
> [ .... ]
> > the bottom line is, for anyone who actually gets down to reading or
> > wrtiing lisp , as the tech geeker would say: If you can't tell that M-
> > is just a syntax notation for the Alt key, then you perhaps shouldn't
> > code lisp.
> But "A-" is currently the syntax notation for the (current Emacs) Alt key
> (which isn't present on most keyboards).  One of the participants in this
> thread, Andreas Eder, has a keyboard with an Emacs alt key, and he
> wouldn't want his keyboard to be dumbed down, just to become compatible
> with a PC keyboard.

He is perhaps unusual. People who customize their own keyboard is
rather few, perhaps less than 1% among professional programers. Those
who customize, or buy non-standard keyboards, are rather on their own.

I use Dvorak keyboard. Some software, especially games, assumes a
qwerty keyboard and have the WASD keys hardwired as navigation keys. I
can bitch about it, but basically using a “non-standard” keymapping i
take for granted some inconveniences due to my choice of something
that's not widely adapted.

> > Ideally, we would like to change the macro... but due to existing code
> > it's rather too much work. (that's what you are thinking) Also, the
> > issue gets complex since emacs already has the alt key idea from the
> > lisp machine keyboard's Alt Mode key... represented in kbd macro as
> > "A-", but isn't used today...
> Andreas Eder uses it.  There're probably lots of people who've
> configured one of the "spare" keys on the PC keyboard to act as "alt".
> [ .... ]
> > > > I mentioned, there's another thing is changing how the shortcut ....
> > > Correction: "key sequence".
> > note i'm aware that "key sequence" is preferred emacs term for
> > keyboard combination or sequential pressing of keys to invoke a
> > command.
> Your native language isn't English.  In English, "shortcut" carries
> derogatory connotations, such as trespassing and sloppy workmanship;
> "shortcut" is never the natural regular way of doing anything.  I put
> this into the Wikipedia entry for shortcut last night.

For better or worse, keyboard shortcut has become the standard term
for denoting what we call keybinding. It is adopted by MS Windows, Mac
OSX, Linuxes. Together they account perhaps 99% of market share.

I think emacs should adopt it to...

> I believe (although I have no evidence) that the term "shortcut" was
> associated with key sequences either by a mouse manufacturer or a GUI
> software maker (Microsoft?) as part of a marketing exercise, subtly
> creating the notion that using the keyboard was somehow "not done by
> decent people".

LOL. What crazy idea you have. Where did you get that from?

If i were to guess, "shortcut" became the term simply because it was a
_short_ _cut_. For example, instead of using the mouse to pull a menu
command, you _short_ _cut_ the task by pressing a key. It's _short_
because it's faster, and _cut_ away more labor.

I don't think "keyboard shortcut" is a more quality term then
keybinding. However, many English terms are illogical.

I presume that people liked the term "keyboard shortcut" much better
and therefore it became the dorminant term, because it conveys the
idea of using keyboard to shortcut the labor. The term "keybinding"
necessarily entails the technical concept of key and commands. Most
people are not familiar with computer science concepts.

> Be aware that each time you say "keyboard shortcut" you're insinuating
> that using the keyboard is somehow illegitimate.

You wish.

> [ .... ]
> > > The notation "alt-", of itself, is fine.  The notation "meta-" is
> > > marginally less fine.  Your desire to change from "meta-" to "alt-"
> > > posits dumb users for whom dumbing down is necessary or, at best,
> > > very helpful.
> > That's a bad way to look at things. Software needs to be easy to use.
> > As a metric to judge this quality, the more dumber people who can use
> > it, the better is the ease of use quality of the software.
> That's just a metric of how easy it is for dumb people to use software.
> Emacs isn't intended for the room temperature IQ segment of the
> population.
> I think the way to judge ease of use is to judge ease of use.  The
> questions to ask are things like:
> (i) How many keystrokes/mouse ambages (weighted according to ease of
>   pressing) does it take to do X?
> (ii) How easy is it to make mistakes in doing X?  How easy is it to
>   recover from these mistakes?
> (iii) How many annoying distractions does the product impose on the
>   user?  How seriously does it get in the way?
> (iv) How configurable is the product?

Perhaps it is surprise, but i don't disagree on these points.

> > > > Is it your opinion, that emacs should remain difficult to use for
> > > > the sake of difficult to use?
> > > My opinion is that emacs is supremely easy to use and should remain
> > > so; that emacs acheives this ease of use partly at the cost of being
> > > difficult to learn, and that this is a good tradeoff; that changing
> > > from "meta" to "alt" would achieve a vanishingly small increase in
> > > ease of learning, no increase in ease of use, and a massive amount
> > > of pain for those forced to switch usage.
> > Alright, i guess we disagree.
> > You might know already, that i also think emacs is the best text
> > editor and much more, despite some usabilitie issues on outset. If i
> > didn't think emacs is so great, i wouldn't have spent so much energy
> > arguing here.
> I think you have spuriously conflated ease of use with ease of learning.
> > Also, i wrote a emacs and elisp tutorial from a practical user's point
> > of view. Many people liked my tutorial. For exmaple, it is linked in
> > blogs, e.g.
> > Just to be sure, i also think emacs has great consistency, most clear
> > and comprehensive doc, far more so than most any software apps...
> > one example related i like to cite, is the usability of linux. In your
> > stance, perhaps you think KDE/Gnome or Lindows is dumbing down? The
> > very notion and phrase of dumbing down is bad Alan.
> I disagree; it's useful and eloquent.  It means making things easier to
> use/learn by dumber people than could otherwise manage, and carries the
> connotions of making things less useful for the less dumb.
> I have Gnome on my current Gnu/Linux installation, but I only really use
> it for starting Firefox or viewing graphical stuff (e.g. pdf documents).
> Most of my work is on text, so I use the Linux tty's, which are
> optimised for text handling.

Yes but most people are not like you or me. Most people want graphics,
youtube, flash, cookies.

Emacs can be made, such that it will please these people reasonably,
yet sacrifize  absolute Z E R O  in any degree for computer scientists
or programers like us. I emphasize, sacrifise absolutly nothing of its
power, flexibility, consistency.

I'm a efficiency nerd. I'm also a extreme functional nerd. (and a math
nerd) I ABSOLUTELY do not care any bit about fluff and prettiness.  In
is my opinion, that for any tool, functionality, efficiency of
operation, power must come first. Prettiness and fluff good, but they
must come AFTER functionality, efficiency of operation, power. Easy
learning is important too. But in general it should come after the
functionality etc criterions.


Sorry for shouting, but that's how i feel and prefer things to be. It
is consistent with regards to the above, that i think the notation Alt
+ and Ctrl+ for emacs's manuals and menu, is a good thing.

> > > > > Yes,Xah, that garbage is what your squiggles look like on a
> > > > > terminal which isn't equipped with squiggle filters.  "Feel
> > > > > free" to stop dumping such garbage on English language fora,
> > > > > please.
> > > > Hum? You don't have the right font installed or something? My post
> > > > should be in unicode with utf8 encoding.
> > > It might well be.  And I'm not wasting my time with stupid
> > > international character codes any more than I'm going to waste my
> > > time with MS-Word for reading files.doc.  UTF has its place, but
> > > it's suboptimal in the extreme for representing monolingual English.
> > > If you want to piss off as many people as possible, just carry on
> > > putting stupid multibyte characters into your posts.  Nobody would
> > > have any objection to your UTF8 if you restricted yourself to those
> > > characters also in ASCII.
> > I don't think you are being reasonable. today, even hardcore tech
> > geekers prefers unicode.
> Which hardcore tech geekers?  And exactly how do they "prefer" unicode?
> > Even in plain English, ascii is not as good since it doesn't have
> > curly quotes and other symbols such as lambda.
> 10 years ago, you would have said that Usenets posts were better in
> HTML, because you could specify the font and colours, and so on.  It's
> basically the same argument.
> The fact is, fonts, colours, and curly quotes aren't essential or even
> necessary for a plain English post.  Lambda would only be very
> occasionally necessary, such as when discussing maths.  You could leave
> out your curly quotes without changing the essence of your post in the
> slightest.

Curly quotes are perhaps not essential but very useful. They function
as a matching pair, so that one can syntactically determine which is
opening and closing. The straight quote "" doesn't have this property,
so for example, one practical problem you see is that many source code
got syntax colored wrong because odd numbre of straight quotes.

Another example, in emac's manual, it adopts the convention of using `
and ' for opening and cloning quotes, which is basically just a ascii
hack for the curly left single quote and right quote.

The ` and ' are rather ugly, and in meddles with lisp code...

Unicode is these days are universal. It's in many web standards such
as XML and programing lang spec such as Java, Haskell, Scheme 6... get
over it Alan. Install a new newsreader or something.

> [ .... ]
> > > > .... notation changes. So, it shouldn't effect people's exiting
> > > > customization.
> > > Do you mean customisation on the way out, or do you mean "exciting"
> > > customisation, such as is done by me?  ;-)
> > (^_^) ... not sure i got the joke.
> "Exiting" means "going out".  "Exciting" means it gets you breathing
> heavily.  You probably meant "exiSting".  :-)

Lol. all the trouble for a typo.

> [ .... ]
> > The need to change kbd macro syntax so that it become consistent with
> > the suggestion, is good. But that gets hairy, as you explained. So the
> > issue now, is wheher this change creates inconsistecy. In my opinion,
> > no, because to be strict, emacs is already inconsistant by keep using
> > a key name on lisp machine's keyboards that practically didn't exist
> > anymore.
> It would create an inconsistency which didn't previously exist.  You're
> saying that this inconsistency would be less bad than the existing one,
> calling the "alt" key "meta.  I disagree.
> > One interesting point is that, on lisp machine's keyboard, it also has
> > a Alt key, labeled ALT MODE. In emacs's keyboard macro syntax, this is
> > written as "A-". So, when lisp keyboard went out and PC keyboard in,
> > emacs possibly might have made a better fix by changing using this Alt
> > key instead of Meta, instead of just mapping Meta to PC kbd's Alt.
> This was a gradual change.  It didn't happen overnight.
> [ .... ]
> >  Xah
> --
> Alan Mackenzie (Nuremberg, Germany).


reply via email to

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