unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo
@ 2020-09-10 18:29 Caio Henrique
  2020-09-10 20:59 ` Lars Ingebrigtsen
  2020-09-11  4:18 ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Caio Henrique @ 2020-09-10 18:29 UTC (permalink / raw)
  To: 43315

Hi,

After the recent discussions to improve discoverability of Emacs, I
analyzed the Emacs menu-bar and the menu bar of  other text
editors. They all have a "Redo" option close to the "Undo".

Here are some examples:

1. nano
When you launch nano on the terminal, you can see the text on the bottom
that says "M-E Redo", right bellow "Undo".

2. libreoffice write
When you open the Edit menu, you will find that the first option is "Undo"
and the second is "Redo".

3. Notepad++
Same as libreoffice write.

4. Visual Studio Code
Same as libreoffice write.

Here is my proposal:
I'm not used to the default undo system since I use undo-tree, but it
seems that Emacs 28 has added a function called undo-redo to the
simple.el file, right? My proposal is to add it to the menu-bar, right
bellow "Undo":

_____
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index bc094c9050..30d86c7f17 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -536,6 +536,12 @@ menu-bar-edit-menu
     (if (featurep 'ns)
         (bindings--define-key menu [separator-undo] menu-bar-separator))
 
+    (bindings--define-key menu [undo-redo]
+      '(menu-item "Redo" undo-redo
+                  :enable (and (not buffer-read-only)
+                           (undo--last-change-was-undo-p buffer-undo-list))
+                  :help "Undo last undo"))
+
     (bindings--define-key menu [undo]
       '(menu-item "Undo" undo
                   :enable (and (not buffer-read-only)
____

Cordially,
Caio Henrique






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

* bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo
  2020-09-10 18:29 bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo Caio Henrique
@ 2020-09-10 20:59 ` Lars Ingebrigtsen
  2020-09-10 22:21   ` Caio Henrique
  2020-09-11  5:59   ` Eli Zaretskii
  2020-09-11  4:18 ` Richard Stallman
  1 sibling, 2 replies; 6+ messages in thread
From: Lars Ingebrigtsen @ 2020-09-10 20:59 UTC (permalink / raw)
  To: Caio Henrique; +Cc: 43315

Caio Henrique <caiohcs0@gmail.com> writes:

> Here is my proposal:
> I'm not used to the default undo system since I use undo-tree, but it
> seems that Emacs 28 has added a function called undo-redo to the
> simple.el file, right? My proposal is to add it to the menu-bar, right
> bellow "Undo":

Makes sense to me, so I've applied your patch to Emacs 28.

It's small enough to do without a copyright assignment to the FSF, but
if it's likely/possible that you'll be submitting more patches in the
future, it might make sense to start the assignment process now.  Would
you be willing to assign the copyright on Emacs patches to the FSF?

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





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

* bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo
  2020-09-10 20:59 ` Lars Ingebrigtsen
@ 2020-09-10 22:21   ` Caio Henrique
  2020-09-11  6:36     ` Eli Zaretskii
  2020-09-11  5:59   ` Eli Zaretskii
  1 sibling, 1 reply; 6+ messages in thread
From: Caio Henrique @ 2020-09-10 22:21 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43315, Caio Henrique

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Would you be willing to assign the copyright on Emacs patches to the FSF?

Yes, can you send me the instructions/documents? Thanks!





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

* bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo
  2020-09-10 18:29 bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo Caio Henrique
  2020-09-10 20:59 ` Lars Ingebrigtsen
@ 2020-09-11  4:18 ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2020-09-11  4:18 UTC (permalink / raw)
  To: Caio Henrique; +Cc: 43315

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > +    (bindings--define-key menu [undo-redo]
  > +      '(menu-item "Redo" undo-redo
  > +                  :enable (and (not buffer-read-only)
  > +                           (undo--last-change-was-undo-p buffer-undo-list))
  > +                  :help "Undo last undo"))
  > +

There is no harm putting it in the menu.  But I doubt we can find a key for it.

-- 
Dr Richard Stallman
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)







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

* bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo
  2020-09-10 20:59 ` Lars Ingebrigtsen
  2020-09-10 22:21   ` Caio Henrique
@ 2020-09-11  5:59   ` Eli Zaretskii
  1 sibling, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2020-09-11  5:59 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 43315, caiohcs0

> Resent-From: Lars Ingebrigtsen <larsi@gnus.org>
> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
> Resent-CC: bug-gnu-emacs@gnu.org
> Resent-Sender: help-debbugs@gnu.org
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Thu, 10 Sep 2020 22:59:15 +0200
> Cc: 43315@debbugs.gnu.org
> 
> Caio Henrique <caiohcs0@gmail.com> writes:
> 
> > Here is my proposal:
> > I'm not used to the default undo system since I use undo-tree, but it
> > seems that Emacs 28 has added a function called undo-redo to the
> > simple.el file, right? My proposal is to add it to the menu-bar, right
> > bellow "Undo":
> 
> Makes sense to me, so I've applied your patch to Emacs 28.

Thanks.

However, when we put a command on a menu item, we should make sure its
documentation is clear enough for newbies.  In this case, the doc
string was so terse it was beyond obscure, and needed fixing to be
clear enough for a menu command.  (I fixed it.)





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

* bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo
  2020-09-10 22:21   ` Caio Henrique
@ 2020-09-11  6:36     ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2020-09-11  6:36 UTC (permalink / raw)
  To: Caio Henrique; +Cc: larsi, 43315, caiohcs0

> From: Caio Henrique <caiohcs0@gmail.com>
> Date: Thu, 10 Sep 2020 19:21:07 -0300
> Cc: 43315@debbugs.gnu.org, Caio Henrique <caiohcs0@gmail.com>
> 
> Lars Ingebrigtsen <larsi@gnus.org> writes:
> 
> > Would you be willing to assign the copyright on Emacs patches to the FSF?
> 
> Yes, can you send me the instructions/documents? Thanks!

Form and instructions sent off-list.

Thanks.





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

end of thread, other threads:[~2020-09-11  6:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-10 18:29 bug#43315: 28.0.50; Improvements to menu-bar Edit: add redo Caio Henrique
2020-09-10 20:59 ` Lars Ingebrigtsen
2020-09-10 22:21   ` Caio Henrique
2020-09-11  6:36     ` Eli Zaretskii
2020-09-11  5:59   ` Eli Zaretskii
2020-09-11  4:18 ` Richard Stallman

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).