unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#38535: 26.3; Optionally make recursive editing more noticeable
@ 2019-12-08 18:30 Drew Adams
  2019-12-08 22:50 ` Juri Linkov
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2019-12-08 18:30 UTC (permalink / raw)
  To: 38535

Enhancement suggestion.

Recursive editing is sometimes useful.  Its main disadvantage is that
you might not be aware that you've entered or exited a recursive edit.

Please consider adding something like what this code provides:

https://www.emacswiki.org/emacs/download/rec-edit.el

There are really two different features there.  Either could be provided
on its own by Emacs.  But `rec-edit.el' rolls them together in a minor
mode, `rec-edit-mode'.

1. You can use the same key, `C-M-c', to enter a recursive edit as to
   exit.  When already in a recursive edit, it exits or, if you use a
   prefix arg, it enters a new recursive edit.  In other words, it does
   this:
     (if (or (< (recursion-depth) 1)
             current-prefix-arg)
         (recursive-edit)
       (exit-recursive-edit))

2. It optionally highlights the mode-line indication, `[...]', to make
   clear that you're in a recursive edit, and to indicate the depth.
   Whether this highlighting is done is controlled by a Boolean user
   option.

Emacs generally discourages, or doesn't encourage, initiating a
recursive edit.  That's understandable.  But sometimes it's useful, and
a major reason it's discouraged is because it's easy for users to not
realize they're in a recursive edit, or not know how to exit.

This minor mode aims to mitigate those downsides.  And it's off by
default, so presumably a user of it wants to make use of recursive
editing but wants to be aware when doing that.

I think something like this would be helpful for Emacs to provide.

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.17763
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





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

* bug#38535: 26.3; Optionally make recursive editing more noticeable
  2019-12-08 18:30 bug#38535: 26.3; Optionally make recursive editing more noticeable Drew Adams
@ 2019-12-08 22:50 ` Juri Linkov
  2019-12-08 23:19   ` Drew Adams
  0 siblings, 1 reply; 4+ messages in thread
From: Juri Linkov @ 2019-12-08 22:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 38535

> Recursive editing is sometimes useful.  Its main disadvantage is that
> you might not be aware that you've entered or exited a recursive edit.

But there is minibuffer-depth-indicate-mode that shows the recursion
depth in the minibuffer prompt when recursive minibuffers are enabled.





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

* bug#38535: 26.3; Optionally make recursive editing more noticeable
  2019-12-08 22:50 ` Juri Linkov
@ 2019-12-08 23:19   ` Drew Adams
  2021-06-14 14:33     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2019-12-08 23:19 UTC (permalink / raw)
  To: Juri Linkov; +Cc: 38535

> > Recursive editing is sometimes useful.
> > Its main disadvantage is that you might not
> > be aware that you've entered or exited a
> > recursive edit.
> 
> But there is minibuffer-depth-indicate-mode that shows the recursion
> depth in the minibuffer prompt when recursive minibuffers are enabled.

Unrelated.

Minibuffer recursion is indicated as you say.
It is not indicated by [...] in the mode line.

 "Minibuffer input is a special kind of
  recursive editing." (elisp) `Recursive Editing'

This is about a non-minibuffer recursive edit,
which is indicated only by a not-very-noticeable
[...] in the mode line.

Those two are handled very differently in terms
of UI and interaction.

For the same reason that we highlight the
minibuffer indication of minibuffer depth, minor
mode `rec-edit-mode' can highlight the [...]
brackets.  ("Can", because an option controls
whether the highlighting occurs.)





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

* bug#38535: 26.3; Optionally make recursive editing more noticeable
  2019-12-08 23:19   ` Drew Adams
@ 2021-06-14 14:33     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-14 14:33 UTC (permalink / raw)
  To: Drew Adams; +Cc: 38535, Juri Linkov

Drew Adams <drew.adams@oracle.com> writes:

> This is about a non-minibuffer recursive edit,
> which is indicated only by a not-very-noticeable
> [...] in the mode line.

I think that should be sufficient.  Closing.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2021-06-14 14:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-08 18:30 bug#38535: 26.3; Optionally make recursive editing more noticeable Drew Adams
2019-12-08 22:50 ` Juri Linkov
2019-12-08 23:19   ` Drew Adams
2021-06-14 14:33     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).