all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Proposal: "C-z <letter>" reserved for users
       [not found] <1973673328.2493716.1612740554692.ref@mail.yahoo.com>
@ 2021-02-07 23:29 ` S Boucher via Users list for the GNU Emacs text editor
  2021-02-07 23:46   ` Emanuel Berg via Users list for the GNU Emacs text editor
                     ` (3 more replies)
  0 siblings, 4 replies; 44+ messages in thread
From: S Boucher via Users list for the GNU Emacs text editor @ 2021-02-07 23:29 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

C-z is bound to a low frequency use function (suspend-frame)... and speaking for myself, I probably can count on one hand the number of times I've used it in the last 25years :-)

I would suggest:1) move suspend-frame to "C-c C-z" (that is still a quick shortcut)
2) reserve C-z <letter> for users
That still leaves a whole lot with C-z C-... C-z M-...


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-07 23:29 ` S Boucher via Users list for the GNU Emacs text editor
@ 2021-02-07 23:46   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-08  2:06   ` Howard Melman
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-07 23:46 UTC (permalink / raw)
  To: help-gnu-emacs

S Boucher via Users list for the GNU Emacs text editor wrote:

> C-z is bound to a low frequency use function
> (suspend-frame)... and speaking for myself, I probably can
> count on one hand the number of times I've used it in the
> last 25years :-)
>
> I would suggest:1) move suspend-frame to "C-c C-z" (that is
> still a quick shortcut) 2) reserve C-z <letter> for users
> That still leaves a whole lot with C-z C-... C-z M-...

ikr?

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-07 23:29 ` S Boucher via Users list for the GNU Emacs text editor
  2021-02-07 23:46   ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-08  2:06   ` Howard Melman
  2021-02-11  1:37     ` Christopher Miles
  2021-02-08  3:31   ` Eli Zaretskii
  2021-02-08 10:03   ` Colin Baxter
  3 siblings, 1 reply; 44+ messages in thread
From: Howard Melman @ 2021-02-08  2:06 UTC (permalink / raw)
  To: help-gnu-emacs

S Boucher via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> writes:

> C-z is bound to a low frequency use function (suspend-frame)... and
> speaking for myself, I probably can count on one hand the number of
> times I've used it in the last 25years :-)
>
> I would suggest:1) move suspend-frame to "C-c C-z" (that
> is still a quick shortcut) 2) reserve C-z <letter> for users
> That still leaves a whole lot with C-z C-... C-z M-...

FWIW I used to bind the ctl-x-5-map to C-z add was happier
typing C-z f than C-x 5 f.  I shifted to this frame oriented
transient on C-z for a while now and have been happy.  I'm
sure it could be improved but as a first attempt it's been
pretty good for me.

;;; frame commands from ctl-x-5-map
(define-transient-command hrm-frame-transient ()
  "Frame commands mirroring ctl-x-5-map"
  ["Configure Frames"
   ["Manage"
    ("2" "New" make-frame-command)
    ("0" "Delete" delete-frame)
    ("k" "Kill Frame & Buffer" kill-buffer-and-frame)
    ("1" "Delete others" delete-other-frames)
    ]
   ["Select"
    ("o" "Other" other-frame)
    ("n" "Next" other-frame)
    ("p" "Previous" select-previous-frame)
    ]
   ["Display"
    ("-" "Fixed Width" variable-pitch-mode)
    ("l" "Lower" lower-frame)
    ("=" "Maximize" toggle-frame-maximized)
    ("i" "Iconify" iconify-frame)
    ]
   ["Move"
    ("<" "Left" move-frame-left :transient t)
    (">" "Right" move-frame-right :transient t)
    ]
   ]
  ["Open in other Frame"
   ["Files"
    ("b" "Buffer" switch-to-buffer-other-frame)
    ("C-o" "Buffer other frame" display-buffer-other-frame)
    ("C-f" "File" find-file-other-frame)
    ("f" "File" find-file-other-frame)
    ("r" "File Read-Only" find-file-read-only-other-frame)
    ]
   ["Apps"
    ("d" "Dired" dired-other-frame)
    ("." "Xref" xref-find-definitions-other-frame)
    ("m" "Compose Mail" compose-mail-other-frame)
    ]
   ["Help For"
    ("V" "Variable" find-variable-other-frame)
    ("F" "Function" find-function-other-frame)
    ("K" "Key" find-function-on-key-other-frame)
    ("L" "Library" find-library-other-frame)
    ]
   ]
  )
(global-set-key (kbd "C-z") 'hrm-frame-transient)


-- 

Howard




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-07 23:29 ` S Boucher via Users list for the GNU Emacs text editor
  2021-02-07 23:46   ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-08  2:06   ` Howard Melman
@ 2021-02-08  3:31   ` Eli Zaretskii
  2021-02-08 16:22     ` Francis Belliveau
  2021-02-08 10:03   ` Colin Baxter
  3 siblings, 1 reply; 44+ messages in thread
From: Eli Zaretskii @ 2021-02-08  3:31 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 7 Feb 2021 23:29:14 +0000 (UTC)
> From:  S Boucher via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
> 
> I would suggest:1) move suspend-frame to "C-c C-z" (that is still a quick shortcut)

It is already on "C-x C-z".



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-07 23:29 ` S Boucher via Users list for the GNU Emacs text editor
                     ` (2 preceding siblings ...)
  2021-02-08  3:31   ` Eli Zaretskii
@ 2021-02-08 10:03   ` Colin Baxter
  2021-02-08 20:20     ` Leo Butler
  2021-02-09  6:02     ` Marcin Borkowski
  3 siblings, 2 replies; 44+ messages in thread
From: Colin Baxter @ 2021-02-08 10:03 UTC (permalink / raw)
  To: help-gnu-emacs

>>>>> S Boucher via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

    > C-z is bound to a low frequency use function
    > (suspend-frame)... and speaking for myself, I probably can count
    > on one hand the number of times I've used it in the last 25years
    > :-)

    > I would suggest:1) move suspend-frame to "C-c C-z" (that is still
    > a quick shortcut) 2) reserve C-z <letter> for users That still
    > leaves a whole lot with C-z C-... C-z M-...

As way of an illustration of the legion of different emacs usages, I use
C-z to suspend the frame several times a day. This is because I have an
emacs always open in a terminal and C-z is a simple way of getting back
to the terminal - easier, I find, than opening a shell in the already
terminal-running emacs. C-c C-z is not as convenient.

Best wishes,




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-08  3:31   ` Eli Zaretskii
@ 2021-02-08 16:22     ` Francis Belliveau
  2021-02-08 21:19       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09  5:55       ` Marcin Borkowski
  0 siblings, 2 replies; 44+ messages in thread
From: Francis Belliveau @ 2021-02-08 16:22 UTC (permalink / raw)
  Cc: help-gnu-emacs

It would be nice for standard distro to not include a c-z binding, since it already exists on a key-sequence binding.

I have remapped c-z to my own key-map, but when I must use emacs without my personal bindings,  continually get messed up by accidental "suspend".

It is certainly a dangerous function to have mapped to such an easy key to hit, and my fingers are trained to hit that key a lot for other reasons. 
I can see where it was once very useful, but much less so in this day of GUI's.

Fran

> On Feb 7, 2021, at 22:31, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> Date: Sun, 7 Feb 2021 23:29:14 +0000 (UTC)
>> From:  S Boucher via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
>> 
>> I would suggest:1) move suspend-frame to "C-c C-z" (that is still a quick shortcut)
> 
> It is already on "C-x C-z".
> 




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-08 10:03   ` Colin Baxter
@ 2021-02-08 20:20     ` Leo Butler
  2021-02-09  6:02     ` Marcin Borkowski
  1 sibling, 0 replies; 44+ messages in thread
From: Leo Butler @ 2021-02-08 20:20 UTC (permalink / raw)
  To: help-gnu-emacs

Colin Baxter <m43cap@yandex.com> writes:

>>>>>> S Boucher via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:
>
>     > C-z is bound to a low frequency use function
>     > (suspend-frame)... and speaking for myself, I probably can count
>     > on one hand the number of times I've used it in the last 25years
>     > :-)
>
>     > I would suggest:1) move suspend-frame to "C-c C-z" (that is still
>     > a quick shortcut) 2) reserve C-z <letter> for users That still
>     > leaves a whole lot with C-z C-... C-z M-...
>
> As way of an illustration of the legion of different emacs usages, I use
> C-z to suspend the frame several times a day. This is because I have an
> emacs always open in a terminal and C-z is a simple way of getting back
> to the terminal - easier, I find, than opening a shell in the already
> terminal-running emacs. C-c C-z is not as convenient.
>
> Best wishes,

To pile on:

elscreen.el uses C-z 0, C-z 1, etc. for jumping to screen 0, 1,
etc. Since I use emacs -nw --daemon, I am happy to have C-z co-opted by
elscreen.el.

Leo



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-08 16:22     ` Francis Belliveau
@ 2021-02-08 21:19       ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09  0:52         ` Skip Montanaro
  2021-02-09  5:55       ` Marcin Borkowski
  1 sibling, 1 reply; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-08 21:19 UTC (permalink / raw)
  To: help-gnu-emacs

Francis Belliveau wrote:

> It is certainly a dangerous function to have mapped to such
> an easy key to hit

Agree 100%:

  (put 'suspend-frame 'disabled  t)
  (global-unset-key "\C-z")
  (global-unset-key "\C-x\C-z")
  
-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-08 21:19       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09  0:52         ` Skip Montanaro
  2021-02-09  1:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
                             ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Skip Montanaro @ 2021-02-09  0:52 UTC (permalink / raw)
  To: Emanuel Berg, Help GNU Emacs

>
> > It is certainly a dangerous function to have mapped to such
> > an easy key to hit
>
> Agree 100%:
>
>   (put 'suspend-frame 'disabled  t)
>   (global-unset-key "\C-z")
>   (global-unset-key "\C-x\C-z")
>

In what way is it dangerous? At least on the various Unix and Linux systems
I've used over the years, the worst that happens is that it hides/iconifies
the frame. Just reopen it.

It definitely should not be disabled in tty mode.

Skip


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09  0:52         ` Skip Montanaro
@ 2021-02-09  1:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09  5:58           ` Marcin Borkowski
  2021-02-11  0:52           ` Francis Belliveau
  2 siblings, 0 replies; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09  1:03 UTC (permalink / raw)
  To: help-gnu-emacs

Skip Montanaro wrote:

>>> It is certainly a dangerous function to have mapped to
>>> such an easy key to hit
>>
>> Agree 100%:
>>
>>   (put 'suspend-frame 'disabled  t)
>>   (global-unset-key "\C-z")
>>   (global-unset-key "\C-x\C-z")
>
> In what way is it dangerous? At least on the various Unix
> and Linux systems I've used over the years, the worst that
> happens is that it hides/iconifies the frame.
> Just reopen it.
>
> It definitely should not be disabled in tty mode.

There _is_ some problem with it, right now I don't remember
what it was but is was very annoying and frustrating.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-08 16:22     ` Francis Belliveau
  2021-02-08 21:19       ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09  5:55       ` Marcin Borkowski
  1 sibling, 0 replies; 44+ messages in thread
From: Marcin Borkowski @ 2021-02-09  5:55 UTC (permalink / raw)
  To: Francis Belliveau; +Cc: help-gnu-emacs


On 2021-02-08, at 17:22, Francis Belliveau <f.belliveau@comcast.net> wrote:

> It would be nice for standard distro to not include a c-z binding, since it already exists on a key-sequence binding.
>
> I have remapped c-z to my own key-map, but when I must use emacs without my personal bindings,  continually get messed up by accidental "suspend".

This!  Same here.

-- 
Marcin Borkowski
http://mbork.pl



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09  0:52         ` Skip Montanaro
  2021-02-09  1:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09  5:58           ` Marcin Borkowski
  2021-02-09 12:19             ` Skip Montanaro
  2021-02-11  0:52           ` Francis Belliveau
  2 siblings, 1 reply; 44+ messages in thread
From: Marcin Borkowski @ 2021-02-09  5:58 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: Help GNU Emacs, Emanuel Berg


On 2021-02-09, at 01:52, Skip Montanaro <skip.montanaro@gmail.com> wrote:

>>
>> > It is certainly a dangerous function to have mapped to such
>> > an easy key to hit
>>
>> Agree 100%:
>>
>>   (put 'suspend-frame 'disabled  t)
>>   (global-unset-key "\C-z")
>>   (global-unset-key "\C-x\C-z")
>>
>
> In what way is it dangerous? At least on the various Unix and Linux systems
> I've used over the years, the worst that happens is that it hides/iconifies
> the frame. Just reopen it.

It *is* dangerous.  Typing my `C-z whatever' keybinding w/o looking at
the screen and then typing more makes that "more" go to whatever
application the window manager decides to focus on.  In a worst-case
scenario one could be typing e.g. a password into a faceb**k message
(which would be a disaster, though arguably binding `C-z whatever' to
anything that requires subsequent typing of a password is asking for
trouble).

Best,

-- 
Marcin Borkowski
http://mbork.pl



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-08 10:03   ` Colin Baxter
  2021-02-08 20:20     ` Leo Butler
@ 2021-02-09  6:02     ` Marcin Borkowski
  2021-02-09 12:23       ` Dmitry Gutov
  1 sibling, 1 reply; 44+ messages in thread
From: Marcin Borkowski @ 2021-02-09  6:02 UTC (permalink / raw)
  To: Colin Baxter; +Cc: help-gnu-emacs


On 2021-02-08, at 11:03, Colin Baxter <m43cap@yandex.com> wrote:

>>>>>> S Boucher via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:
>
>     > C-z is bound to a low frequency use function
>     > (suspend-frame)... and speaking for myself, I probably can count
>     > on one hand the number of times I've used it in the last 25years
>     > :-)
>
>     > I would suggest:1) move suspend-frame to "C-c C-z" (that is still
>     > a quick shortcut) 2) reserve C-z <letter> for users That still
>     > leaves a whole lot with C-z C-... C-z M-...
>
> As way of an illustration of the legion of different emacs usages, I use
> C-z to suspend the frame several times a day. This is because I have an
> emacs always open in a terminal and C-z is a simple way of getting back
> to the terminal - easier, I find, than opening a shell in the already
> terminal-running emacs. C-c C-z is not as convenient.

But I think nobody is arguing to put anything to C-z by default - only
to make it unbound and free for the user to do whatever s/he wishes.
Many of us have bound C-z to our custom keymaps, nothing prevents you to
bind it to `suspend-frame' - at least if it is free.  Even if it were
not, you can still do it, of course.  (I have C-0 bound to something
else than the default - but if I accidentally hit it on someone else's
Emacs, nothing terrible happens, it's just a minor inconvenience then.)

The main argument here, I guess, is "people sometimes use other people's
Emacsen, and in such a case having C-z bound to `suspend-frame' is not
only inconvenient, but also dangerous".  I don't think anyone can argue
with that.

Best,

--
Marcin Borkowski
http://mbork.pl



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09  5:58           ` Marcin Borkowski
@ 2021-02-09 12:19             ` Skip Montanaro
  2021-02-09 13:44               ` Marcus Harnisch
  2021-02-09 16:48               ` Gregory Heytings
  0 siblings, 2 replies; 44+ messages in thread
From: Skip Montanaro @ 2021-02-09 12:19 UTC (permalink / raw)
  To: Marcin Borkowski; +Cc: Help GNU Emacs, Emanuel Berg

>
> It *is* dangerous.  Typing my `C-z whatever' keybinding ...


That, I believe, is on you. If you want to personalize your Emacs
environment, that's fine, but C-z is a perfectly fine keybinding as-is. I
agree it is low-use, but when you need it, you need it. I assume if you
encounter it in some context where it's a surprise, you are either typing
into someone else's Emacs instance (see below) or you ran Emacs with "-q".
If the latter, don't do that except in the rare cases where you are
debugging ELisp problems. If the former, get the other person to type. If
you are using Emacs in a context where you normally don't have your
personal setup available (say, as root on a machine for which you don't
have a login), be careful or use vi. If you do have a login, use "-u". (I
don't know how Emacs works on Windows. My only experience is with Unix,
Linux and MacOS, all of which support using Emacs from a terminal window,
where C-z is an absolute requirement.)

C-z has been there in every version of Emacs I have ever used (Gosling
Emacs, GNU Emacs, XEmacs, jed, microemacs, ...). In fact, while poking
around for a microemacs package on my laptop, I just encountered another
Emacs-like editor for the first time, mg, and installed it on my Raspberry
Pi. Yup, C-z works there as well. C-z is about as fundamental a keybinding
as C-a, C-e, C-f and C-b. If you run "emacs -nw" how do you pause it to get
back to your shell prompt? In fact, C-z works in vi (and less and tar and
rsync and ssh (sort of) ...) as well. There is a very good reason C-z is
bound to suspend-frame.

This thread reminded me of a situation I encountered way BITD when I was
working at GE R&D. We were early adopters of Sun's new fangled
workstations. One group got the ball rolling with Sun-1s (we went to see
it, but Sun hadn't even installed the operating system yet - still, it was
awesome), but most of us began our Unix love affair with the Sun-2 series.
(Before that we were VMS users and most of us software types either used
Gosling Emacs or DEC's screen-oriented editor whose name I've long ago
forgotten.) This incident probably occurred in the Sun-2/Sun-3 era (so,
according to Wikipedia, well before 1990). For some reason, a couple of us
needed to help out another guy we didn't know. (Maybe he was new and we
were helping him with site-specific configuration? I no longer recall.) We
needed to do something with Emacs. He was also an Emacs user, but had so
thoroughly remapped his keybindings that his Emacs instance was completely
unusable by anybody but him. I don't think he had remapped from QWERTY to
Dvorak, but essentially everything not bound to self-insert-command was
different. I don't know why "emacs -q" didn't come to mind. Maybe it was an
already running session? In any case, we had to dictate to him what to do,
because we were unable to use his editor.

Skip


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09  6:02     ` Marcin Borkowski
@ 2021-02-09 12:23       ` Dmitry Gutov
  2021-02-09 12:41         ` Gregory Heytings
  0 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2021-02-09 12:23 UTC (permalink / raw)
  To: Marcin Borkowski, Colin Baxter; +Cc: help-gnu-emacs

On 09.02.2021 08:02, Marcin Borkowski wrote:
> But I think nobody is arguing to put anything to C-z by default

We do: put 'undo' on it, so that we stop hiding that feature from new 
users who're just trying Emacs for the first time.

But making it unbound would be a good step either way: I will finally 
stop tripping over frame suspend in 'emacs -Q'.



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 12:23       ` Dmitry Gutov
@ 2021-02-09 12:41         ` Gregory Heytings
  2021-02-09 12:56           ` Dmitry Gutov
  0 siblings, 1 reply; 44+ messages in thread
From: Gregory Heytings @ 2021-02-09 12:41 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: help-gnu-emacs


[It is regrettable that this thread has hijacked the proposal under 
discussion in the "PROPOSAL: Repurpose one key..." thread.]

>
> We do: put 'undo' on [C-z], so that we stop hiding that feature from new 
> users who're just trying Emacs for the first time.
>

Users who are trying Emacs for the first time have a direct access to 
"Undo": it's in the tool bar, labeled "Undo".  If you put the mouse there, 
it says "Undo last edits (C-x u)".  Moreover the bindings for "undo" are 
not more exotic than those of copy (M-w), cut (C-w) and paste (C-y).



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 12:41         ` Gregory Heytings
@ 2021-02-09 12:56           ` Dmitry Gutov
  2021-02-09 13:04             ` Gregory Heytings
                               ` (2 more replies)
  0 siblings, 3 replies; 44+ messages in thread
From: Dmitry Gutov @ 2021-02-09 12:56 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: help-gnu-emacs

On 09.02.2021 14:41, Gregory Heytings wrote:
> Users who are trying Emacs for the first time have a direct access to 
> "Undo": it's in the tool bar, labeled "Undo".  If you put the mouse 
> there, it says "Undo last edits (C-x u)".

That still requires extra research on the part of the user. As well as 
subsequent adaptation.

> Moreover the bindings for 
> "undo" are not more exotic than those of copy (M-w), cut (C-w) and paste 
> (C-y).

True, even though it is a bit more exotic (the advertised binding is a 
whole key sequence rather than a plain modifier+key). But at least we 
have arrow keys for navigation.



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 12:56           ` Dmitry Gutov
@ 2021-02-09 13:04             ` Gregory Heytings
  2021-02-10 10:54               ` Jean Louis
  2021-02-09 13:05             ` Bastian Beranek
  2021-02-09 15:59             ` Skip Montanaro
  2 siblings, 1 reply; 44+ messages in thread
From: Gregory Heytings @ 2021-02-09 13:04 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: help-gnu-emacs


>
> That still requires extra research on the part of the user. As well as 
> subsequent adaptation.
>

I fear everything requires adaptation in Emacs ;-)

>> Moreover the bindings for "undo" are not more exotic than those of copy 
>> (M-w), cut (C-w) and paste (C-y).
>
> True, even though it is a bit more exotic (the advertised binding is a 
> whole key sequence rather than a plain modifier+key).
>

If you think this is a problem, I would suggest to change the advertised 
binding to "C-/" instead of "C-x u".



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 12:56           ` Dmitry Gutov
  2021-02-09 13:04             ` Gregory Heytings
@ 2021-02-09 13:05             ` Bastian Beranek
  2021-02-09 15:59             ` Skip Montanaro
  2 siblings, 0 replies; 44+ messages in thread
From: Bastian Beranek @ 2021-02-09 13:05 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Gregory Heytings, Help-Gnu-Emacs

On Tue, Feb 9, 2021 at 1:56 PM Dmitry Gutov <dgutov@yandex.ru> wrote:
>
> On 09.02.2021 14:41, Gregory Heytings wrote:
> > Users who are trying Emacs for the first time have a direct access to
> > "Undo": it's in the tool bar, labeled "Undo".  If you put the mouse
> > there, it says "Undo last edits (C-x u)".
>
> That still requires extra research on the part of the user. As well as
> subsequent adaptation.
>
> > Moreover the bindings for
> > "undo" are not more exotic than those of copy (M-w), cut (C-w) and paste
> > (C-y).
>
> True, even though it is a bit more exotic (the advertised binding is a
> whole key sequence rather than a plain modifier+key).

By the way, why doesn't the menu suggest C-/ or C-_ for undo? I use
the former, it is particularly easy to type on english keyboards. I
personally find C-x u inacceptable for undo because repeated
operations are painful with that binding (have to press and release
control in rhythm with x, but not with u).



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 12:19             ` Skip Montanaro
@ 2021-02-09 13:44               ` Marcus Harnisch
  2021-02-09 16:48               ` Gregory Heytings
  1 sibling, 0 replies; 44+ messages in thread
From: Marcus Harnisch @ 2021-02-09 13:44 UTC (permalink / raw)
  To: help-gnu-emacs

On 09/02/2021 13.19, Skip Montanaro wrote:
> C-z has been there in every version of Emacs I have ever used (Gosling
> Emacs, GNU Emacs, XEmacs, jed, microemacs, ...).

FWIW, XEmacs (21.5) changed that binding many years ago (2002, ) to 
#'zap-up-to-char when running in a GUI system. IMHO, this corresponds 
nicely with “M-z”, and was one of the first things that went into my 
init.el when jumping ship.

Kindly,
Marcus




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

* Re: Proposal: "C-z <letter>" reserved for users
@ 2021-02-09 15:29 Anders Munch
  0 siblings, 0 replies; 44+ messages in thread
From: Anders Munch @ 2021-02-09 15:29 UTC (permalink / raw)
  To: Help-Gnu-Emacs

Bastian Beranek wrote:
> By the way, why doesn't the menu suggest C-/ or C-_ for undo?

I don't know if this is the actual reason, but there is argument to be made for avoiding modifier+symbol key combinations, if an alternative exists: The combo may be untypable for people whose keyboard doesn't look like yours.  For example, I can't type C-\.   I can type C-/ and C-_, but there may be others who can't.  

regards, Anders


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

* Re: Proposal: "C-z <letter>" reserved for users
@ 2021-02-09 15:33 Anders Munch
  0 siblings, 0 replies; 44+ messages in thread
From: Anders Munch @ 2021-02-09 15:33 UTC (permalink / raw)
  To: Help GNU Emacs

Skip Montanaro wrote:
> C-z has been there in every version of Emacs I have ever used (Gosling Emacs, GNU Emacs, XEmacs, jed, microemacs, ...).

I guess you never tried jove then.  In jove, C-z did (scroll-up 1) and M-z did (scroll-down 1).

Accidentally doing a (scroll-up 1) was a lot less unnerving than an accidental (iconify-or-deiconify-frame).

regards, Anders


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 12:56           ` Dmitry Gutov
  2021-02-09 13:04             ` Gregory Heytings
  2021-02-09 13:05             ` Bastian Beranek
@ 2021-02-09 15:59             ` Skip Montanaro
  2021-02-09 16:11               ` Emanuel Berg via Users list for the GNU Emacs text editor
                                 ` (3 more replies)
  2 siblings, 4 replies; 44+ messages in thread
From: Skip Montanaro @ 2021-02-09 15:59 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: Gregory Heytings, Help GNU Emacs

On Tue, Feb 9, 2021 at 6:56 AM Dmitry Gutov <dgutov@yandex.ru> wrote:

> On 09.02.2021 14:41, Gregory Heytings wrote:
> > Users who are trying Emacs for the first time have a direct access to
> > "Undo": it's in the tool bar, labeled "Undo".  If you put the mouse
> > there, it says "Undo last edits (C-x u)".
>
> That still requires extra research on the part of the user. As well as
> subsequent adaptation.
>

(Apologies, a bit of a rant. I will shut up after this.)

New users are going to be comfortable with the menu bar concept, especially
the first two menus, File and Edit. They will want to undo something, go to
the Edit menu and select "Undo." They might well wonder what C-x u is, but
they will be able to undo without much drama. Maybe someday they will get
curious enough to poke Help in the menu bar and notice the "Emacs Tutorial"
entry.

I get there is a mismatch between the way Emacs operates and how largely
GUI systems like Windows and MacOS operate. Emacs is waaay older than
either of those systems, so it's reasonable that there not be a perfect
match. For a long while after Emacs began to grow GUI capabilities, I
actively disabled the menu bar. I leave it up now, but still don't use it
much. There are a bazillion other GUI-based editors and IDEs out there for
people who don't like the way Emacs operates or prefer the familiarity of
largely GUI-based systems. Some of them even have "Emacs key bindings." If
people want to harness Emacs's strengths, they should realize that it
differs a significant amount from current GUI system design and be willing
to work a bit to understand how to use it efficiently. I wish there was an
Emacs Biography entry in the Help menu. Maybe it's buried in there
somewhere or as a section in the Emacs documentation. Maybe a link to
Wikipedia named Emacs History <https://en.wikipedia.org/wiki/Emacs> would
be sufficient.

Not being a graphic artist, I never had a need to use Photoshop. I simply
don't understand its model of image editing. The most image editing I ever
did was with simple tools like early versions of MacPaint. While I have no
proof, I suspect a semi-competent Photoshop user could pick up the basics
of GIMP pretty quickly. Every once in a while I think, "I'll just fire up
GIMP for this one little thing." I stumble around for a while, accomplish
nothing and eventually run screaming out of the room. I then go back to
kolourpaint. It's not a big deal. If it was really that important I would
spend the time to figure out GIMP, read a book or find a tutorial. I don't
bitch that GIMP doesn't work like kolourpaint. I think Emacs is similar in
that respect. It has a ton of power. Users have to realize that and be
willing to spend some time learning. If all people want to do is enter some
text, they can run Notepad.

Skip


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 15:59             ` Skip Montanaro
@ 2021-02-09 16:11               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 16:19                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 20:14               ` Dmitry Gutov
                                 ` (2 subsequent siblings)
  3 siblings, 1 reply; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09 16:11 UTC (permalink / raw)
  To: help-gnu-emacs

Skip Montanaro wrote:

> (Apologies, a bit of a rant. I will shut up after this.)

No, no.

> Not being a graphic artist, I never had a need to use
> Photoshop. I simply don't understand its model of image
> editing. The most image editing I ever did was with simple
> tools like early versions of MacPaint. While I have no
> proof, I suspect a semi-competent Photoshop user could pick
> up the basics of GIMP pretty quickly. Every once in a while
> I think, "I'll just fire up GIMP for this one little thing."
> I stumble around for a while, accomplish nothing and
> eventually run screaming out of the room. I then go back
> to kolourpaint.

Thank you for mentioning MacPaint! 1984 software.

I have the exact same GIMP experience BTW, only I didn't know
of kolourpaint. So that is the equivalent of MacPaint? It is
in the Debian repos ... installing.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 16:11               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09 16:19                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09 16:19 UTC (permalink / raw)
  To: help-gnu-emacs

> I have the exact same GIMP experience BTW, only I didn't
> know of kolourpaint. So that is the equivalent of MacPaint?
> It is in the Debian repos ... installing.

But no man page! Not a good sign.

What about the hu-man pages?

Water (35 L), Carbon (20 kg), Ammonia (4 L), Lime (1.5 kg),
Phosphorus (800 g), Salt (250 g), Saltpeter (100 g), Sulfur
(80 g), Fluorine (7.5 g), Iron (5 g), Silicon (3 g) [1]

(I think my personality is mostly in the Phosphorus BTW.)

[1] https://fma.fandom.com/wiki/Human

also:

@book{human-pages-unix-desk-reference,
  author     = {Peter Dyson},
  title      = {The human Pages: The Unix Desk Reference},
  publisher  = {SYBEX},
  year       = {1996},
  isbn       = {0-7821-1658-2}
}

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 12:19             ` Skip Montanaro
  2021-02-09 13:44               ` Marcus Harnisch
@ 2021-02-09 16:48               ` Gregory Heytings
  2021-02-09 16:53                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 17:24                 ` Skip Montanaro
  1 sibling, 2 replies; 44+ messages in thread
From: Gregory Heytings @ 2021-02-09 16:48 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: help-gnu-emacs


>
> C-z is about as fundamental a keybinding as C-a, C-e, C-f and C-b. If 
> you run "emacs -nw" how do you pause it to get back to your shell 
> prompt? In fact, C-z works in vi (and less and tar and rsync and ssh 
> (sort of) ...) as well. There is a very good reason C-z is bound to 
> suspend-frame.
>

Which is why the proposal in the "PROPOSAL: Repurpose one key..." thread 
mentions that C-z C-z would be bound by default to suspend-frame.



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 16:48               ` Gregory Heytings
@ 2021-02-09 16:53                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 17:24                   ` Skip Montanaro
  2021-02-10 10:49                   ` Jean Louis
  2021-02-09 17:24                 ` Skip Montanaro
  1 sibling, 2 replies; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09 16:53 UTC (permalink / raw)
  To: help-gnu-emacs

Gregory Heytings wrote:

>> C-z is about as fundamental a keybinding as C-a, C-e, C-f
>> and C-b. If you run "emacs -nw" how do you pause it to get
>> back to your shell prompt?

Right, that was what happened!

But if you do that, how do you return to Emacs?

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 16:53                 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09 17:24                   ` Skip Montanaro
  2021-02-09 17:33                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 17:35                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-10 10:49                   ` Jean Louis
  1 sibling, 2 replies; 44+ messages in thread
From: Skip Montanaro @ 2021-02-09 17:24 UTC (permalink / raw)
  To: Emanuel Berg, Help GNU Emacs

>
> Gregory Heytings wrote:
>
> >> C-z is about as fundamental a keybinding as C-a, C-e, C-f
> >> and C-b. If you run "emacs -nw" how do you pause it to get
> >> back to your shell prompt?
>
> Right, that was what happened!
>
> But if you do that, how do you return to Emacs?
>

On Unix-like systems, the fg built-in command does the trick. Try "man
bash" then search for "^SHELL BUILTIN" or "man fg" (at least on some
systems).

Skip

>


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 16:48               ` Gregory Heytings
  2021-02-09 16:53                 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09 17:24                 ` Skip Montanaro
  1 sibling, 0 replies; 44+ messages in thread
From: Skip Montanaro @ 2021-02-09 17:24 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: Help GNU Emacs

>
> Which is why the proposal in the "PROPOSAL: Repurpose one key..." thread
> mentions that C-z C-z would be bound by default to suspend-frame.
>

Sorry, missed that in my haste I guess.


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 17:24                   ` Skip Montanaro
@ 2021-02-09 17:33                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 17:43                       ` Skip Montanaro
  2021-02-09 17:35                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  1 sibling, 1 reply; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09 17:33 UTC (permalink / raw)
  To: help-gnu-emacs

Skip Montanaro wrote:

> On Unix-like systems, the fg built-in command does the
> trick. Try "man bash" then search for "^SHELL BUILTIN" or
> "man fg" (at least on some systems).

OK!

I just did `suspend-frame' but nothing happened. It only works
on emacs-nw?

I have

  GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+
  Version 3.24.5, cairo version 1.16.0) of 2020-10-23

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 17:24                   ` Skip Montanaro
  2021-02-09 17:33                     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09 17:35                     ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 17:45                       ` Skip Montanaro
  1 sibling, 1 reply; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09 17:35 UTC (permalink / raw)
  To: help-gnu-emacs

Skip Montanaro wrote:

> On Unix-like systems, the fg built-in command does the
> trick. Try "man bash" then search for "^SHELL BUILTIN" or
> "man fg" (at least on some systems).

fg says 'fg: no job control in this shell'?

And no man page.

fg is indeed a shell built-in so should be mentioned in
zshall(1)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 17:33                     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09 17:43                       ` Skip Montanaro
  0 siblings, 0 replies; 44+ messages in thread
From: Skip Montanaro @ 2021-02-09 17:43 UTC (permalink / raw)
  To: Emanuel Berg, Help GNU Emacs

>
> I just did `suspend-frame' but nothing happened. It only works
> on emacs-nw?
>
> I have
>
>   GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+
>   Version 3.24.5, cairo version 1.16.0) of 2020-10-23


I'm not yet up to v28, but M-x suspend-frame RET does as it would expect
for me. OTOH, In a GUI instance M-x suspend-emacs RET complains that Emacs
can't be suspended while there is a visible frame. It does work for me in
an instance started with -nw. In fact, help on suspend-frame shows that
it's a bit higher level, calling the correct lower level function depending
on environment.


S


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 17:35                     ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09 17:45                       ` Skip Montanaro
  2021-02-09 23:55                         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 1 reply; 44+ messages in thread
From: Skip Montanaro @ 2021-02-09 17:45 UTC (permalink / raw)
  To: Emanuel Berg, Help GNU Emacs

>
> fg says 'fg: no job control in this shell'?
>
> And no man page.
>
> fg is indeed a shell built-in so should be mentioned in
> zshall(1)


Not using bash(1) I imagine. The man page for zsh(1) references
zshbuiltins(1), which has sections for fg(1) and bg(1).

S


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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 15:59             ` Skip Montanaro
  2021-02-09 16:11               ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2021-02-09 20:14               ` Dmitry Gutov
  2021-02-09 20:50                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 20:18               ` Joost Kremers
  2021-02-10 10:57               ` Jean Louis
  3 siblings, 1 reply; 44+ messages in thread
From: Dmitry Gutov @ 2021-02-09 20:14 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: Gregory Heytings, Help GNU Emacs

On 09.02.2021 17:59, Skip Montanaro wrote:

> New users are going to be comfortable with the menu bar concept, 
> especially the first two menus, File and Edit. They will want to undo 
> something, go to the Edit menu and select "Undo." They might well wonder 
> what C-x u is, but they will be able to undo without much drama. Maybe 
> someday they will get curious enough to poke Help in the menu bar and 
> notice the "Emacs Tutorial" entry.

And they'll go away with an impression that Emacs is clunky and baroque.

Especially combined with its peculiar 'redo' mechanics. Which is not 
productive compared to modern counterparts, no matter how many years you 
spend with Emacs.

> I get there is a mismatch between the way Emacs operates and how largely 
> GUI systems like Windows and MacOS operate. Emacs is waaay older than 
> either of those systems, so it's reasonable that there not be a perfect 
> match.

It's a good explanation for why things can be what they are now, but not 
why we wouldn't want to ever change them.

> Not being a graphic artist, I never had a need to use Photoshop. I 
> simply don't understand its model of image editing. The most image 
> editing I ever did was with simple tools like early versions of 
> MacPaint. While I have no proof, I suspect a semi-competent Photoshop 
> user could pick up the basics of GIMP pretty quickly. Every once in a 
> while I think, "I'll just fire up GIMP for this one little thing." I 
> stumble around for a while, accomplish nothing and eventually run 
> screaming out of the room. I then go back to kolourpaint. It's not a big 
> deal. If it was really that important I would spend the time to figure 
> out GIMP, read a book or find a tutorial. I don't bitch that GIMP 
> doesn't work like kolourpaint. I think Emacs is similar in that respect. 
> It has a ton of power. Users have to realize that and be willing to 
> spend some time learning. If all people want to do is enter some text, 
> they can run Notepad.

Unlike GIMP or Photoshop, Emacs is not a special-purpose program. We 
expect it to be useful to a wide range of professions. Nor is it a 
console editor. So it should make sense to make an effort to accommodate 
all different kinds of people.

If it were just a niche old-style editor, I would have left long ago, 
and some of the people here might have missed the improvements I have 
contributed over the years.



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 15:59             ` Skip Montanaro
  2021-02-09 16:11               ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 20:14               ` Dmitry Gutov
@ 2021-02-09 20:18               ` Joost Kremers
  2021-02-10 10:57               ` Jean Louis
  3 siblings, 0 replies; 44+ messages in thread
From: Joost Kremers @ 2021-02-09 20:18 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: help-gnu-emacs


On Tue, Feb 09 2021, Skip Montanaro wrote:
> For a long while after Emacs began to grow GUI capabilities, I
> actively disabled the menu bar. I leave it up now, but still don't use it
> much.

You know, <f10> works even if the menu bar is disabled. (I disable the menu bar
and use <f10> on the rare occasion that I want to look at the menu bar menu.)


-- 
Joost Kremers
Life has its moments



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 20:14               ` Dmitry Gutov
@ 2021-02-09 20:50                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09 20:50 UTC (permalink / raw)
  To: help-gnu-emacs

Dmitry Gutov wrote:

> Especially combined with its peculiar 'redo' mechanics.
> Which is not productive compared to modern counterparts, no
> matter how many years you spend with Emacs.

OK, what's the difference?

> Unlike GIMP or Photoshop, Emacs is not a special-purpose
> program. We expect it to be useful to a wide range of
> professions.

Well, maybe the GIMP and Photoshop people say the same thing
about their software with all scripts, plugins add-ons and
whatever that I suspect exist for them as well...

> If it were just a niche old-style editor, I would have left
> long ago, and some of the people here might have missed the
> improvements I have contributed over the years.

That's right! Can't have that.

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 17:45                       ` Skip Montanaro
@ 2021-02-09 23:55                         ` Emanuel Berg via Users list for the GNU Emacs text editor
  0 siblings, 0 replies; 44+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2021-02-09 23:55 UTC (permalink / raw)
  To: help-gnu-emacs

Skip Montanaro wrote:

>> fg says 'fg: no job control in this shell'?
>>
>> And no man page.
>>
>> fg is indeed a shell built-in so should be mentioned in
>> zshall(1)
>
> [...] The man page for zsh(1) references zshbuiltins(1),
> which has sections for fg(1) and bg(1).

Do you mean this? But it doesn't say anything. How do you
use it?

       fg [ job ... ]
       job ...
              Bring each specified job in turn to the
              foreground. If no job is specified, resume the
              current job.

Besides, fg and bg still just says no job control in
this shell.

`suspend-frame' works BTW. It didn't work before because
of tmux. Without tmux in the plain tty it works. Only I don't
get back to it so have to pkill it instead :)

-- 
underground experts united
http://user.it.uu.se/~embe8573
https://dataswamp.org/~incal




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 16:53                 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09 17:24                   ` Skip Montanaro
@ 2021-02-10 10:49                   ` Jean Louis
  1 sibling, 0 replies; 44+ messages in thread
From: Jean Louis @ 2021-02-10 10:49 UTC (permalink / raw)
  To: help-gnu-emacs

* Emanuel Berg via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> [2021-02-09 20:00]:
> Gregory Heytings wrote:
> 
> >> C-z is about as fundamental a keybinding as C-a, C-e, C-f
> >> and C-b. If you run "emacs -nw" how do you pause it to get
> >> back to your shell prompt?
> 
> Right, that was what happened!
> 
> But if you do that, how do you return to Emacs?

You have fg, bg kill %NUMBER comands, that is all shell. Actually C-z
is expectation coming from shell. I did not know that C-z has to be
implemented in Emacs or other software. My opinion was that C-z is
shell control of other software, regardless if that other software
have implemented various key bindings I was thinking shell is in
charge and in authority over programs running in the shell.

So C-z is my expectation to work always. Maybe is not so in reality.

This would invoke job #1 to come into foreground:

$ fg 1

This would invoke job #2 to come into foreground:

$ fg 2

So you could have multiple Emacs sessions or multiple editors in the
same shell and switching between them that way. That is not same as
screen/tmux as suspending a job does not continue execution of the
job.

Jean






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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 13:04             ` Gregory Heytings
@ 2021-02-10 10:54               ` Jean Louis
  0 siblings, 0 replies; 44+ messages in thread
From: Jean Louis @ 2021-02-10 10:54 UTC (permalink / raw)
  To: Gregory Heytings; +Cc: help-gnu-emacs, Dmitry Gutov

* Gregory Heytings <gregory@heytings.org> [2021-02-09 16:05]:
> 
> > 
> > That still requires extra research on the part of the user. As well as
> > subsequent adaptation.
> > 
> 
> I fear everything requires adaptation in Emacs ;-)
> 
> > > Moreover the bindings for "undo" are not more exotic than those of
> > > copy (M-w), cut (C-w) and paste (C-y).
> > 
> > True, even though it is a bit more exotic (the advertised binding is a
> > whole key sequence rather than a plain modifier+key).
> > 
> 
> If you think this is a problem, I would suggest to change the advertised
> binding to "C-/" instead of "C-x u".

Isn't it already undo on C-/ as alternative to C-x u?

But please don't change C-x u as that is what I expect to work
always.

I use my personal Emacs with configuration and plethora of other
Emacses on other VPS-es and other computers and in those cases muscle
memory remembers defaults. On those Emacses there are no personal
configurations, so automatically I use C-x u or to change window C-x o
while in personal configuration I use s-arrows to change windows.

It is better not breaking habits.



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09 15:59             ` Skip Montanaro
                                 ` (2 preceding siblings ...)
  2021-02-09 20:18               ` Joost Kremers
@ 2021-02-10 10:57               ` Jean Louis
  3 siblings, 0 replies; 44+ messages in thread
From: Jean Louis @ 2021-02-10 10:57 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: Help GNU Emacs

* Skip Montanaro <skip.montanaro@gmail.com> [2021-02-09 18:59]:
> Not being a graphic artist, I never had a need to use Photoshop. I simply
> don't understand its model of image editing. The most image editing I ever
> did was with simple tools like early versions of MacPaint. While I have no
> proof, I suspect a semi-competent Photoshop user could pick up the basics
> of GIMP pretty quickly. Every once in a while I think, "I'll just fire up
> GIMP for this one little thing." I stumble around for a while, accomplish
> nothing and eventually run screaming out of the room. I then go back to
> kolourpaint. It's not a big deal. If it was really that important I would
> spend the time to figure out GIMP, read a book or find a tutorial. I don't
> bitch that GIMP doesn't work like kolourpaint. I think Emacs is similar in
> that respect. It has a ton of power. Users have to realize that and be
> willing to spend some time learning. If all people want to do is enter some
> text, they can run Notepad.

Off-topic:

Yesterday I have seen Adobe Photoshop on computer of business card
producer in Kampala, Uganda. Because I know various Gimp functions, I
could explain to the operator how to resize layers, move and copy them
and make it right. Operator seemed to have same problems like you with
the exception that there was no escape to the kolourpaint.



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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-09  0:52         ` Skip Montanaro
  2021-02-09  1:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
  2021-02-09  5:58           ` Marcin Borkowski
@ 2021-02-11  0:52           ` Francis Belliveau
  2 siblings, 0 replies; 44+ messages in thread
From: Francis Belliveau @ 2021-02-11  0:52 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: Help GNU Emacs, Emanuel Berg

I have had it actually "exit" on me when I didn't want it to.
That's what I call dangerous.  I agree that normally it is only Disruptive.

> On Feb 8, 2021, at 19:52, Skip Montanaro <skip.montanaro@gmail.com> wrote:
> 
>> 
>>> It is certainly a dangerous function to have mapped to such
>>> an easy key to hit
>> 
>> Agree 100%:
>> 
>> (put 'suspend-frame 'disabled  t)
>> (global-unset-key "\C-z")
>> (global-unset-key "\C-x\C-z")
>> 
> 
> In what way is it dangerous? At least on the various Unix and Linux systems
> I've used over the years, the worst that happens is that it hides/iconifies
> the frame. Just reopen it.
> 
> It definitely should not be disabled in tty mode.
> 
> Skip




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-08  2:06   ` Howard Melman
@ 2021-02-11  1:37     ` Christopher Miles
  2021-02-11 13:52       ` Howard Melman
  0 siblings, 1 reply; 44+ messages in thread
From: Christopher Miles @ 2021-02-11  1:37 UTC (permalink / raw)
  To: Howard Melman; +Cc: help-gnu-emacs@gnu.org

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

<#secure method=pgpmime mode=sign>

Hi, Howard, your keybinding is great.

I copied your code, found some command is not defined.

Can you share your Emacs configuration? Thanks in advance. 😄

Howard Melman <hmelman@gmail.com> writes:

S Boucher via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> writes:

C-z is bound to a low frequency use function (suspend-frame)… and speaking for myself, I probably can count on one hand the number of times I've used it in the last 25years :-)

I would suggest:1) move suspend-frame to "C-c C-z" (that is still a quick shortcut) 2) reserve C-z <letter> for users That still leaves a whole lot with C-z C-… C-z M-…

FWIW I used to bind the ctl-x-5-map to C-z add was happier typing C-z f than C-x 5 f. I shifted to this frame oriented transient on C-z for a while now and have been happy. I'm sure it could be improved but as a first attempt it's been pretty good for me.

;;; frame commands from ctl-x-5-map (define-transient-command hrm-frame-transient () "Frame commands mirroring ctl-x-5-map" ["Configure Frames" ["Manage" ("2" "New" make-frame-command) ("0" "Delete" delete-frame) ("k" "Kill Frame & Buffer" kill-buffer-and-frame) ("1" "Delete others" delete-other-frames) ] ["Select" ("o" "Other" other-frame) ("n" "Next" other-frame) ("p" "Previous" select-previous-frame) ] ["Display" ("-" "Fixed Width" variable-pitch-mode) ("l" "Lower" lower-frame) ("=" "Maximize" toggle-frame-maximized) ("i" "Iconify" iconify-frame) ] ["Move" ("<" "Left" move-frame-left :transient t) (">" "Right" move-frame-right :transient t) ] ] ["Open in other Frame" ["Files" ("b" "Buffer" switch-to-buffer-other-frame) ("C-o" "Buffer other frame" display-buffer-other-frame) ("C-f" "File" find-file-other-frame) ("f" "File" find-file-other-frame) ("r" "File Read-Only" find-file-read-only-other-frame) ] ["Apps" ("d" "Dired" dired-other-frame) ("." "Xref" xref-find-definitions-other-frame) ("m" "Compose Mail" compose-mail-other-frame) ] ["Help For" ("V" "Variable" find-variable-other-frame) ("F" "Function" find-function-other-frame) ("K" "Key" find-function-on-key-other-frame) ("L" "Library" find-library-other-frame) ] ] ) (global-set-key (kbd "C-z") 'hrm-frame-transient)

[-- Attachment #2: ATT00001.txt --]
[-- Type: text/plain, Size: 253 bytes --]

-- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-11  1:37     ` Christopher Miles
@ 2021-02-11 13:52       ` Howard Melman
  2021-02-12  3:31         ` Christopher Miles
  0 siblings, 1 reply; 44+ messages in thread
From: Howard Melman @ 2021-02-11 13:52 UTC (permalink / raw)
  To: help-gnu-emacs

Christopher Miles <numbchild@gmail.com> writes:

> <#secure method=pgpmime mode=sign>
>
> Hi, Howard, your keybinding is great.
>
> I copied your code, found some command is not defined.
>
> Can you share your Emacs configuration? Thanks in
> advance. 😄

I had forgotten I'd defined some simple commands.  I'm not
inclined to share my whole config, but here are a few that
are used in this transient.

Howard

(defun move-frame-right ()
  "Move the current frame right 200 pixels"
  (interactive)
  (let* ((p (frame-position))
	 (x (car p))
	 (y (cdr p)))
    (set-frame-position (selected-frame) (+ x 200) y)))

(defun move-frame-left ()
  "Move the current frame left 200 pixels"
  (interactive)
  (let* ((p (frame-position))
	 (x (car p))
	 (y (cdr p)))
    (set-frame-position (selected-frame) (- x 200) y)))

(defun select-previous-frame (&optional arg)
  "Select the -ARG'th visible frame on current display, and raise it.

All frames are arranged in a cyclic order.
This command selects the frame ARG steps previously in that order.
It is the reverse of `other-frame'."
  (interactive "p")
  (other-frame (* -1 arg)))

(defun kill-buffer-and-frame ()
  "Kill the current buffer and the current frame."
  (interactive)
  ;; do this trick in case of dedicated window in special frame
  ;; in that case kill-buffer will delete-frame too
  ;; can't check after kill buffer since selected-frame will have changed
  (if (window-dedicated-p (selected-window))
      (kill-buffer (current-buffer))
    (kill-buffer (current-buffer))
    (delete-frame)))



>
> Howard Melman <hmelman@gmail.com> writes:
>
> S Boucher <help-gnu-emacs@gnu.org> writes:
>
> C-z is bound to a low frequency use function (suspend-frame)… and
> speaking for myself, I probably can count on one hand the number of
> times I've used it in the last 25years :-)
>
> I would suggest:1) move suspend-frame to "C-c C-z" (that is still a
> quick shortcut) 2) reserve C-z <letter> for users That still leaves a
> whole lot with C-z C-… C-z M-…
>
> FWIW I used to bind the ctl-x-5-map to C-z add was happier typing C-z
> f than C-x 5 f. I shifted to this frame oriented transient on C-z for
> a while now and have been happy. I'm sure it could be improved but as
> a first attempt it's been pretty good for me.
>
> ;;; frame commands from ctl-x-5-map
> (define-transient-command hrm-frame-transient ()
>   "Frame commands mirroring ctl-x-5-map"
>   ["Configure Frames"
>    ["Manage"
>     ("2" "New" make-frame-command)
>     ("0" "Delete" delete-frame)
>     ("k" "Kill Frame & Buffer" kill-buffer-and-frame)
>     ("1" "Delete others" delete-other-frames)
>     ]
>    ["Select"
>     ("o" "Other" other-frame)
>     ("n" "Next" other-frame)
>     ("p" "Previous" select-previous-frame)
>     ]
>    ["Display"
>     ("-" "Fixed Width" variable-pitch-mode)
>     ("l" "Lower" lower-frame)
>     ("=" "Maximize" toggle-frame-maximized)
>     ("i" "Iconify" iconify-frame)
>     ]
>    ["Move"
>     ("<" "Left" move-frame-left :transient t)
>     (">" "Right" move-frame-right :transient t)
>     ]
>    ]
>   ["Open in other Frame"
>    ["Files"
>     ("b" "Buffer" switch-to-buffer-other-frame)
>     ("C-o" "Buffer other frame" display-buffer-other-frame)
>     ("C-f" "File" find-file-other-frame)
>     ("f" "File" find-file-other-frame)
>     ("r" "File Read-Only" find-file-read-only-other-frame)
>     ]
>    ["Apps"
>     ("d" "Dired" dired-other-frame)
>     ("." "Xref" xref-find-definitions-other-frame)
>     ("m" "Compose Mail" compose-mail-other-frame)
>     ]
>    ["Help For"
>     ("V" "Variable" find-variable-other-frame)
>     ("F" "Function" find-function-other-frame)
>     ("K" "Key" find-function-on-key-other-frame)
>     ("L" "Library" find-library-other-frame)
>     ]
>    ]
>   )
> (global-set-key (kbd "C-z") 'hrm-frame-transient)

-- 

Howard




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

* Re: Proposal: "C-z <letter>" reserved for users
  2021-02-11 13:52       ` Howard Melman
@ 2021-02-12  3:31         ` Christopher Miles
  0 siblings, 0 replies; 44+ messages in thread
From: Christopher Miles @ 2021-02-12  3:31 UTC (permalink / raw)
  To: Howard Melman; +Cc: help-gnu-emacs@gnu.org

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

<#secure method=pgpmime mode=sign>

Thanks for your sharing. Very convinient commands. Thanks

Howard Melman <hmelman@gmail.com> writes:

Christopher Miles <numbchild@gmail.com> writes:

<#!secure method=pgpmime mode=sign>

Hi, Howard, your keybinding is great.

I copied your code, found some command is not defined.

Can you share your Emacs configuration? Thanks in advance. 😄

I had forgotten I'd defined some simple commands. I'm not inclined to share my whole config, but here are a few that are used in this transient.

Howard

(defun move-frame-right () "Move the current frame right 200 pixels" (interactive) (let* ((p (frame-position)) (x (car p)) (y (cdr p))) (set-frame-position (selected-frame) (+ x 200) y)))

(defun move-frame-left () "Move the current frame left 200 pixels" (interactive) (let* ((p (frame-position)) (x (car p)) (y (cdr p))) (set-frame-position (selected-frame) (- x 200) y)))

(defun select-previous-frame (&optional arg) "Select the -ARG'th visible frame on current display, and raise it.

All frames are arranged in a cyclic order. This command selects the frame ARG steps previously in that order. It is the reverse of `other-frame'." (interactive "p") (other-frame (* -1 arg)))

(defun kill-buffer-and-frame () "Kill the current buffer and the current frame." (interactive) ;; do this trick in case of dedicated window in special frame ;; in that case kill-buffer will delete-frame too ;; can't check after kill buffer since selected-frame will have changed (if (window-dedicated-p (selected-window)) (kill-buffer (current-buffer)) (kill-buffer (current-buffer)) (delete-frame)))


Howard Melman <hmelman@gmail.com> writes:

S Boucher <help-gnu-emacs@gnu.org> writes:

C-z is bound to a low frequency use function (suspend-frame)… and speaking for myself, I probably can count on one hand the number of times I've used it in the last 25years :-)

I would suggest:1) move suspend-frame to "C-c C-z" (that is still a quick shortcut) 2) reserve C-z <letter> for users That still leaves a whole lot with C-z C-… C-z M-…

FWIW I used to bind the ctl-x-5-map to C-z add was happier typing C-z f than C-x 5 f. I shifted to this frame oriented transient on C-z for a while now and have been happy. I'm sure it could be improved but as a first attempt it's been pretty good for me.

;;; frame commands from ctl-x-5-map (define-transient-command hrm-frame-transient () "Frame commands mirroring ctl-x-5-map" ["Configure Frames" ["Manage" ("2" "New" make-frame-command) ("0" "Delete" delete-frame) ("k" "Kill Frame & Buffer" kill-buffer-and-frame) ("1" "Delete others" delete-other-frames) ] ["Select" ("o" "Other" other-frame) ("n" "Next" other-frame) ("p" "Previous" select-previous-frame) ] ["Display" ("-" "Fixed Width" variable-pitch-mode) ("l" "Lower" lower-frame) ("=" "Maximize" toggle-frame-maximized) ("i" "Iconify" iconify-frame) ] ["Move" ("<" "Left" move-frame-left :transient t) (">" "Right" move-frame-right :transient t) ] ] ["Open in other Frame" ["Files" ("b" "Buffer" switch-to-buffer-other-frame) ("C-o" "Buffer other frame" display-buffer-other-frame) ("C-f" "File" find-file-other-frame) ("f" "File" find-file-other-frame) ("r" "File Read-Only" find-file-read-only-other-frame) ] ["Apps" ("d" "Dired" dired-other-frame) ("." "Xref" xref-find-definitions-other-frame) ("m" "Compose Mail" compose-mail-other-frame) ] ["Help For" ("V" "Variable" find-variable-other-frame) ("F" "Function" find-function-other-frame) ("K" "Key" find-function-on-key-other-frame) ("L" "Library" find-library-other-frame) ] ] ) (global-set-key (kbd "C-z") 'hrm-frame-transient)

[-- Attachment #2: ATT00001.txt --]
[-- Type: text/plain, Size: 253 bytes --]

-- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

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

end of thread, other threads:[~2021-02-12  3:31 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-09 15:29 Proposal: "C-z <letter>" reserved for users Anders Munch
  -- strict thread matches above, loose matches on Subject: below --
2021-02-09 15:33 Anders Munch
     [not found] <1973673328.2493716.1612740554692.ref@mail.yahoo.com>
2021-02-07 23:29 ` S Boucher via Users list for the GNU Emacs text editor
2021-02-07 23:46   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-08  2:06   ` Howard Melman
2021-02-11  1:37     ` Christopher Miles
2021-02-11 13:52       ` Howard Melman
2021-02-12  3:31         ` Christopher Miles
2021-02-08  3:31   ` Eli Zaretskii
2021-02-08 16:22     ` Francis Belliveau
2021-02-08 21:19       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09  0:52         ` Skip Montanaro
2021-02-09  1:03           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09  5:58           ` Marcin Borkowski
2021-02-09 12:19             ` Skip Montanaro
2021-02-09 13:44               ` Marcus Harnisch
2021-02-09 16:48               ` Gregory Heytings
2021-02-09 16:53                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 17:24                   ` Skip Montanaro
2021-02-09 17:33                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 17:43                       ` Skip Montanaro
2021-02-09 17:35                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 17:45                       ` Skip Montanaro
2021-02-09 23:55                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-10 10:49                   ` Jean Louis
2021-02-09 17:24                 ` Skip Montanaro
2021-02-11  0:52           ` Francis Belliveau
2021-02-09  5:55       ` Marcin Borkowski
2021-02-08 10:03   ` Colin Baxter
2021-02-08 20:20     ` Leo Butler
2021-02-09  6:02     ` Marcin Borkowski
2021-02-09 12:23       ` Dmitry Gutov
2021-02-09 12:41         ` Gregory Heytings
2021-02-09 12:56           ` Dmitry Gutov
2021-02-09 13:04             ` Gregory Heytings
2021-02-10 10:54               ` Jean Louis
2021-02-09 13:05             ` Bastian Beranek
2021-02-09 15:59             ` Skip Montanaro
2021-02-09 16:11               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 16:19                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 20:14               ` Dmitry Gutov
2021-02-09 20:50                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-02-09 20:18               ` Joost Kremers
2021-02-10 10:57               ` Jean Louis

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.