all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Interactive hat.
@ 2009-03-27  0:20 naesten
  0 siblings, 0 replies; 33+ messages in thread
From: naesten @ 2009-03-27  0:20 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Alan Mackenzie, emacs-devel, Juanma Barranquero

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

On Thu, Mar 26, 2009 at 5:18 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
> As explained in my message of a couple days ago, it should always
> be easy to turn an interactive string into the corresponding lisp form.

Perhaps there should be a function (and command?) to do just that? It might help people to remember not to add anything to the string without providing a corresponding lisp function/macro. (Not that that is likely to happen very often or anything...)

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread
* bug#2760: CUA-like stuff spuriously enables transient-mark-mode.
@ 2009-03-23 22:37 Alan Mackenzie
  2009-03-24  0:46 ` Stefan Monnier
  0 siblings, 1 reply; 33+ messages in thread
From: Alan Mackenzie @ 2009-03-23 22:37 UTC (permalink / raw)
  To: bug-gnu-emacs

Hi, Richard, Eli and Emacs!

Start the CVS head "emacs -Q", and evaluate this:

    (global-set-key [ &\C-\M-\S-m ] 'forward-char)
    (transient-mark-mode -1)

In some buffer, invoke 'forward-char by the above binding.  This enables
transient-mark-mode as a side effect.  This shouldn't happen.  It happens
both in a Linux Virtual terminal (with the requisite enhancements to the
keyboard handling) and in X-Windows.

ANALYSIS:
---------
The "^" in the interactive string causes `handle-shift-selection' to be
invoked by the command loop.  The function and friends abuse the user
option variable `transient-mark-mode' by additionally storing some sort
of state in it.  h-s-s writes the value '(only) into the variable
transient-mark-mode, thus enabling the mode.  A sensible fix would surely
involve leaving `transient-mark-mode' severely alone (only the user
should set this) and creating another variable (or several) to hold the
state currently mashed into t-m-m.

COMMENT:
--------
It is now no longer true that "But Emacs does not assign meanings to keys
directly" (Emacs manual, page "Commands") - Emacs directly assigns a
meaning to the shift key.  This is surely a Bad Thing.

Why, why, why is this thing implemented by hard-coding in the command
loop, where it interferes with users' ability to chose key bindings?
Surely this feature with the shift key should have been implemented by
defining defuns such as `forward-char-with-marking', and putting these
commands in some suitable keymap?  OK, it's more work, but not _that_
much more.

It's practically 100% certain that somebody, somewhere, will want to use
the hyper- or alt- keys instead of <shift> to get this visible region
feature, or possibly might want to use separate bindings entirely.

It's near 100% certain that somebody, somewhere, perhaps with a name like
Xah Lee, will want to use C-f as "find" (i.e. bind it to
`isearch-forward') and use C-S-f for `forward-char'.

-- 
Alan Mackenzie (Nuremberg, Germany).







^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2009-03-29  2:02 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27  0:20 Interactive hat naesten
  -- strict thread matches above, loose matches on Subject: below --
2009-03-23 22:37 bug#2760: CUA-like stuff spuriously enables transient-mark-mode Alan Mackenzie
2009-03-24  0:46 ` Stefan Monnier
2009-03-24 13:52   ` Alan Mackenzie
2009-03-25  1:38     ` Stefan Monnier
2009-03-25 10:16       ` Interactive hat. [Was: CUA-like stuff spuriously enables transient-mark-mode] Alan Mackenzie
2009-03-25 10:30         ` Interactive hat Miles Bader
2009-03-25 10:53           ` Alan Mackenzie
2009-03-25 11:03             ` Lennart Borgman
2009-03-25 14:24               ` Alan Mackenzie
2009-03-26 11:29               ` Alan Mackenzie
2009-03-25 14:59             ` Miles Bader
2009-03-26 11:51               ` Alan Mackenzie
2009-03-26 12:14                 ` David Kastrup
2009-03-26 12:51                   ` Alan Mackenzie
2009-03-26 13:48                 ` Stefan Monnier
2009-03-26 14:33                   ` Alan Mackenzie
2009-03-26 16:30                     ` Stefan Monnier
2009-03-26 16:45                       ` Alan Mackenzie
2009-03-26 18:57                         ` Stefan Monnier
2009-03-29  0:44                           ` Kim F. Storm
2009-03-29  1:40                             ` Miles Bader
2009-03-29  2:02                               ` Lennart Borgman
2009-03-26 14:47                   ` Stephen J. Turnbull
2009-03-26 15:23                     ` Miles Bader
2009-03-26 17:43                       ` Stephen J. Turnbull
2009-03-25 16:18           ` Stefan Monnier
2009-03-25 11:26         ` Interactive hat. [Was: CUA-like stuff spuriously enables transient-mark-mode] Juanma Barranquero
2009-03-25 13:20           ` Interactive hat Chong Yidong
2009-03-25 14:19           ` Interactive hat. [Was: CUA-like stuff spuriously enables transient-mark-mode] Alan Mackenzie
2009-03-25 16:41             ` Juanma Barranquero
2009-03-26 12:44               ` Alan Mackenzie
2009-03-26 13:50                 ` Interactive hat Stefan Monnier
2009-03-26 15:27                   ` Alan Mackenzie
2009-03-26 17:09                     ` Stefan Monnier
2009-03-26 19:06                       ` Alan Mackenzie
2009-03-26 21:18                         ` Stefan Monnier
2009-03-26 22:32                           ` Johan Bockgård
2009-03-26 23:34                             ` Alan Mackenzie
2009-03-26 23:32                           ` Alan Mackenzie
2009-03-27  2:50                             ` Stefan Monnier
2009-03-27 11:15                               ` Alan Mackenzie

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.