unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
       [not found] ` <20230111193754.33EF3C00A7F@vcs2.savannah.gnu.org>
@ 2023-01-16 13:57   ` Robert Pluim
  2023-01-16 14:33     ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Pluim @ 2023-01-16 13:57 UTC (permalink / raw)
  To: emacs-devel; +Cc: Juri Linkov

>>>>> On Wed, 11 Jan 2023 14:37:54 -0500 (EST), Juri Linkov <juri@jurta.org> said:

    Juri> branch: emacs-29
    Juri> commit 4a8891a462e41e81a5232810b67d9d85f79bc515
    Juri> Author: Juri Linkov <juri@linkov.net>
    Juri> Commit: Juri Linkov <juri@linkov.net>

    Juri>     * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
    
    Juri>     * lisp/outline.el (outline-minor-mode-cycle--bind):
    Juri>     Add docstring (bug#60426).
    Juri>     (outline-minor-mode-cycle--bind): Default 'map' to
    Juri>     'outline-minor-mode-cycle-map'.
    Juri>     (outline-minor-mode-cycle-map): Improve docstring.
    Juri>     (outline-minor-mode): Move margin-cycling keys to
    Juri>     'outline-minor-mode-cycle-map'.
    Juri> ---

Juri/Eli, any objection to putting something like the following in
emacs-29? That would make it easier to add heading-specific bindings
in NEWS mode, which Iʼd do in master. It also avoids creating a
separate keymap for each heading.

Robert
-- 

diff --git c/lisp/outline.el i/lisp/outline.el
index 91f6040687b..65d0d4db261 100644
--- c/lisp/outline.el
+++ i/lisp/outline.el
@@ -1766,6 +1766,13 @@ outline-cycle-buffer
 \f
 ;;; Button/margin indicators
 
+(defvar-keymap outline-button-icon-map
+  "<mouse-2>" #'outline-cycle
+  ;; Need to override the global binding
+  ;; `mouse-appearance-menu' with <down->:
+  "S-<down-mouse-1>" #'ignore
+  "S-<mouse-1>" #'outline-cycle-buffer)
+
 (defun outline--create-button-icons ()
   (pcase outline-minor-mode-use-buttons
     ('in-margins
@@ -1798,15 +1805,21 @@ outline--create-button-icons
         (propertize (icon-string icon-name)
                     'mouse-face 'default
                     'follow-link 'mouse-face
-                    'keymap (define-keymap
-                              "<mouse-2>" #'outline-cycle
-                              ;; Need to override the global binding
-                              ;; `mouse-appearance-menu' with <down->:
-                              "S-<down-mouse-1>" #'ignore
-                              "S-<mouse-1>" #'outline-cycle-buffer)))
+                    'keymap outline-button-icon-map))
       (list 'outline-open
             (if outline--use-rtl 'outline-close-rtl 'outline-close))))))
 
+(defvar-keymap outline-inserted-button-map
+  "RET" #'outline-cycle
+  "<mouse-2>" #'outline-cycle
+  ;; Need to override the global binding
+  ;; `mouse-appearance-menu' with <down->:
+  "S-<down-mouse-1>" #'ignore
+  "S-<mouse-1>" #'outline-cycle-buffer)
+
+(defvar-keymap outline-overlay-button-map
+  "RET" #'outline-cycle)
+
 (defun outline--insert-button (type)
   (with-silent-modifications
     (save-excursion
@@ -1829,19 +1842,13 @@ outline--insert-button
            (overlay-put o 'face (plist-get icon 'face))
            (overlay-put o 'follow-link 'mouse-face)
            (overlay-put o 'mouse-face 'highlight)
-           (overlay-put o 'keymap (define-keymap
-                                    "RET" #'outline-cycle
-                                    "<mouse-2>" #'outline-cycle
-                                    ;; Need to override the global binding
-                                    ;; `mouse-appearance-menu' with <down->:
-                                    "S-<down-mouse-1>" #'ignore
-                                    "S-<mouse-1>" #'outline-cycle-buffer)))
+           (overlay-put o 'keymap outline-inserted-button-map))
           ('in-margins
            (overlay-put o 'before-string icon)
-           (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle)))
+           (overlay-put o 'keymap outline-overlay-button-map))
           (_
            (overlay-put o 'before-string icon)
-           (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle))))))))
+           (overlay-put o 'keymap outline-overlay-button-map)))))))
 
 (defun outline--fix-up-all-buttons (&optional from to)
   (when outline-minor-mode-use-buttons



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 13:57   ` emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map' Robert Pluim
@ 2023-01-16 14:33     ` Eli Zaretskii
  2023-01-16 15:02       ` Robert Pluim
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-01-16 14:33 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel, juri

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Juri Linkov <juri@linkov.net>
> Date: Mon, 16 Jan 2023 14:57:03 +0100
> 
> >>>>> On Wed, 11 Jan 2023 14:37:54 -0500 (EST), Juri Linkov <juri@jurta.org> said:
> 
>     Juri> branch: emacs-29
>     Juri> commit 4a8891a462e41e81a5232810b67d9d85f79bc515
>     Juri> Author: Juri Linkov <juri@linkov.net>
>     Juri> Commit: Juri Linkov <juri@linkov.net>
> 
>     Juri>     * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
>     
>     Juri>     * lisp/outline.el (outline-minor-mode-cycle--bind):
>     Juri>     Add docstring (bug#60426).
>     Juri>     (outline-minor-mode-cycle--bind): Default 'map' to
>     Juri>     'outline-minor-mode-cycle-map'.
>     Juri>     (outline-minor-mode-cycle-map): Improve docstring.
>     Juri>     (outline-minor-mode): Move margin-cycling keys to
>     Juri>     'outline-minor-mode-cycle-map'.
>     Juri> ---
> 
> Juri/Eli, any objection to putting something like the following in
> emacs-29? That would make it easier to add heading-specific bindings
> in NEWS mode, which Iʼd do in master. It also avoids creating a
> separate keymap for each heading.

I don't think I understand the problem you are trying to solve, and
why this particular solution.  Please tell more.



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 14:33     ` Eli Zaretskii
@ 2023-01-16 15:02       ` Robert Pluim
  2023-01-16 16:58         ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Pluim @ 2023-01-16 15:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, juri

>>>>> On Mon, 16 Jan 2023 16:33:17 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: Juri Linkov <juri@linkov.net>
    >> Date: Mon, 16 Jan 2023 14:57:03 +0100
    >> 
    >> >>>>> On Wed, 11 Jan 2023 14:37:54 -0500 (EST), Juri Linkov <juri@jurta.org> said:
    >> 
    Juri> branch: emacs-29
    Juri> commit 4a8891a462e41e81a5232810b67d9d85f79bc515
    Juri> Author: Juri Linkov <juri@linkov.net>
    Juri> Commit: Juri Linkov <juri@linkov.net>
    >> 
    Juri> * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
    >> 
    Juri> * lisp/outline.el (outline-minor-mode-cycle--bind):
    Juri> Add docstring (bug#60426).
    Juri> (outline-minor-mode-cycle--bind): Default 'map' to
    Juri> 'outline-minor-mode-cycle-map'.
    Juri> (outline-minor-mode-cycle-map): Improve docstring.
    Juri> (outline-minor-mode): Move margin-cycling keys to
    Juri> 'outline-minor-mode-cycle-map'.
    Juri> ---
    >> 
    >> Juri/Eli, any objection to putting something like the following in
    >> emacs-29? That would make it easier to add heading-specific bindings
    >> in NEWS mode, which Iʼd do in master. It also avoids creating a
    >> separate keymap for each heading.

    Eli> I don't think I understand the problem you are trying to solve, and
    Eli> why this particular solution.  Please tell more.

In outline-mode and modes derived from it, there are various bindings
that work at the start of headings (and in buttons that could be
inserted depending on the value of `outline-minor-mode-use-buttonsʼ),
such as "RET" for `outline-cycle'.

Adding more bindings there is a pain, since the bindings are done
using a separate anonymous keymap on each per-heading overlay, which
means iterating over all the overlays in order to make changes. The
patch I sent changes that to use a named keymap, so only the named
keymap needs to be updated or `setq-local'ʼd before invoking
`outline-mode'.

(and what I really want to do is add 'n' and 'p' into that map, which
improves the speed at which I can proofread NEWS.)

Robert
-- 



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 15:02       ` Robert Pluim
@ 2023-01-16 16:58         ` Eli Zaretskii
  2023-01-16 17:18           ` Robert Pluim
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-01-16 16:58 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel, juri

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org,  juri@linkov.net
> Date: Mon, 16 Jan 2023 16:02:38 +0100
> 
>     >> Juri/Eli, any objection to putting something like the following in
>     >> emacs-29? That would make it easier to add heading-specific bindings
>     >> in NEWS mode, which Iʼd do in master. It also avoids creating a
>     >> separate keymap for each heading.
> 
>     Eli> I don't think I understand the problem you are trying to solve, and
>     Eli> why this particular solution.  Please tell more.
> 
> In outline-mode and modes derived from it, there are various bindings
> that work at the start of headings (and in buttons that could be
> inserted depending on the value of `outline-minor-mode-use-buttonsʼ),
> such as "RET" for `outline-cycle'.
> 
> Adding more bindings there is a pain, since the bindings are done
> using a separate anonymous keymap on each per-heading overlay, which
> means iterating over all the overlays in order to make changes. The
> patch I sent changes that to use a named keymap, so only the named
> keymap needs to be updated or `setq-local'ʼd before invoking
> `outline-mode'.

Ah, okay.  Fine with me if Juri (or someone else) doesn't object.

> (and what I really want to do is add 'n' and 'p' into that map, which
> improves the speed at which I can proofread NEWS.)

On master or emacs-29?



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 16:58         ` Eli Zaretskii
@ 2023-01-16 17:18           ` Robert Pluim
  2023-01-16 17:43             ` Juri Linkov
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Pluim @ 2023-01-16 17:18 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel, juri

>>>>> On Mon, 16 Jan 2023 18:58:45 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: emacs-devel@gnu.org,  juri@linkov.net
    >> Date: Mon, 16 Jan 2023 16:02:38 +0100
    >> 
    >> >> Juri/Eli, any objection to putting something like the following in
    >> >> emacs-29? That would make it easier to add heading-specific bindings
    >> >> in NEWS mode, which Iʼd do in master. It also avoids creating a
    >> >> separate keymap for each heading.
    >> 
    Eli> I don't think I understand the problem you are trying to solve, and
    Eli> why this particular solution.  Please tell more.
    >> 
    >> In outline-mode and modes derived from it, there are various bindings
    >> that work at the start of headings (and in buttons that could be
    >> inserted depending on the value of `outline-minor-mode-use-buttonsʼ),
    >> such as "RET" for `outline-cycle'.
    >> 
    >> Adding more bindings there is a pain, since the bindings are done
    >> using a separate anonymous keymap on each per-heading overlay, which
    >> means iterating over all the overlays in order to make changes. The
    >> patch I sent changes that to use a named keymap, so only the named
    >> keymap needs to be updated or `setq-local'ʼd before invoking
    >> `outline-mode'.

    Eli> Ah, okay.  Fine with me if Juri (or someone else) doesn't object.

    >> (and what I really want to do is add 'n' and 'p' into that map, which
    >> improves the speed at which I can proofread NEWS.)

    Eli> On master or emacs-29?

On master. Iʼm assuming adding bindings would not fall under 'bug
fixes only'.

Robert
-- 



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 17:18           ` Robert Pluim
@ 2023-01-16 17:43             ` Juri Linkov
  2023-01-16 18:26               ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Juri Linkov @ 2023-01-16 17:43 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Eli Zaretskii, emacs-devel

>     Eli> Ah, okay.  Fine with me if Juri (or someone else) doesn't object.
>
>     >> (and what I really want to do is add 'n' and 'p' into that map, which
>     >> improves the speed at which I can proofread NEWS.)
>
>     Eli> On master or emacs-29?
>
> On master. Iʼm assuming adding bindings would not fall under 'bug
> fixes only'.

But maybe Eli will agree to install it on emacs-29?



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 17:43             ` Juri Linkov
@ 2023-01-16 18:26               ` Eli Zaretskii
  2023-01-16 19:02                 ` Robert Pluim
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-01-16 18:26 UTC (permalink / raw)
  To: Juri Linkov; +Cc: rpluim, emacs-devel

> From: Juri Linkov <juri@linkov.net>
> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
> Date: Mon, 16 Jan 2023 19:43:10 +0200
> 
> >     Eli> Ah, okay.  Fine with me if Juri (or someone else) doesn't object.
> >
> >     >> (and what I really want to do is add 'n' and 'p' into that map, which
> >     >> improves the speed at which I can proofread NEWS.)
> >
> >     Eli> On master or emacs-29?
> >
> > On master. Iʼm assuming adding bindings would not fall under 'bug
> > fixes only'.
> 
> But maybe Eli will agree to install it on emacs-29?

Maybe.  Robert didn't really explain what are his plans in that
regard.



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 18:26               ` Eli Zaretskii
@ 2023-01-16 19:02                 ` Robert Pluim
  2023-01-16 19:37                   ` Eli Zaretskii
  2023-01-17  7:29                   ` emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map' Juri Linkov
  0 siblings, 2 replies; 18+ messages in thread
From: Robert Pluim @ 2023-01-16 19:02 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Juri Linkov, emacs-devel

>>>>> On Mon, 16 Jan 2023 20:26:14 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Juri Linkov <juri@linkov.net>
    >> Cc: Eli Zaretskii <eliz@gnu.org>,  emacs-devel@gnu.org
    >> Date: Mon, 16 Jan 2023 19:43:10 +0200
    >> 
    >> >     Eli> Ah, okay.  Fine with me if Juri (or someone else) doesn't object.
    >> >
    >> >     >> (and what I really want to do is add 'n' and 'p' into that map, which
    >> >     >> improves the speed at which I can proofread NEWS.)
    >> >
    >> >     Eli> On master or emacs-29?
    >> >
    >> > On master. Iʼm assuming adding bindings would not fall under 'bug
    >> > fixes only'.
    >> 
    >> But maybe Eli will agree to install it on emacs-29?

    Eli> Maybe.  Robert didn't really explain what are his plans in that
    Eli> regard.

Hereʼs the complete patch (minus doc changes). I was thinking putting
the outline.el bits in emacs-29, to make it easier for everybody to
change the bindings, and then changing the bindings in news-mode in
master.

Or we could just stick the whole thing in master.

Robert
-- 

diff --git c/lisp/outline.el i/lisp/outline.el
index 91f6040687b..6fb9281f61e 100644
--- c/lisp/outline.el
+++ i/lisp/outline.el
@@ -1766,6 +1766,20 @@ outline-cycle-buffer
 \f
 ;;; Button/margin indicators
 
+(defvar-keymap outline-button-icon-map
+  "<mouse-2>" #'outline-cycle
+  ;; Need to override the global binding
+  ;; `mouse-appearance-menu' with <down->:
+  "S-<down-mouse-1>" #'ignore
+  "S-<mouse-1>" #'outline-cycle-buffer)
+
+(defvar-keymap outline-overlay-button-map
+  "RET" #'outline-cycle)
+
+(defvar-keymap outline-inserted-button-map
+  :parent (make-composed-keymap outline-button-icon-map
+                                outline-overlay-button-map))
+
 (defun outline--create-button-icons ()
   (pcase outline-minor-mode-use-buttons
     ('in-margins
@@ -1798,12 +1812,7 @@ outline--create-button-icons
         (propertize (icon-string icon-name)
                     'mouse-face 'default
                     'follow-link 'mouse-face
-                    'keymap (define-keymap
-                              "<mouse-2>" #'outline-cycle
-                              ;; Need to override the global binding
-                              ;; `mouse-appearance-menu' with <down->:
-                              "S-<down-mouse-1>" #'ignore
-                              "S-<mouse-1>" #'outline-cycle-buffer)))
+                    'keymap outline-button-icon-map))
       (list 'outline-open
             (if outline--use-rtl 'outline-close-rtl 'outline-close))))))
 
@@ -1829,19 +1838,13 @@ outline--insert-button
            (overlay-put o 'face (plist-get icon 'face))
            (overlay-put o 'follow-link 'mouse-face)
            (overlay-put o 'mouse-face 'highlight)
-           (overlay-put o 'keymap (define-keymap
-                                    "RET" #'outline-cycle
-                                    "<mouse-2>" #'outline-cycle
-                                    ;; Need to override the global binding
-                                    ;; `mouse-appearance-menu' with <down->:
-                                    "S-<down-mouse-1>" #'ignore
-                                    "S-<mouse-1>" #'outline-cycle-buffer)))
+           (overlay-put o 'keymap outline-inserted-button-map))
           ('in-margins
            (overlay-put o 'before-string icon)
-           (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle)))
+           (overlay-put o 'keymap outline-overlay-button-map))
           (_
            (overlay-put o 'before-string icon)
-           (overlay-put o 'keymap (define-keymap "RET" #'outline-cycle))))))))
+           (overlay-put o 'keymap outline-overlay-button-map)))))))
 
 (defun outline--fix-up-all-buttons (&optional from to)
   (when outline-minor-mode-use-buttons
diff --git c/lisp/textmodes/emacs-news-mode.el i/lisp/textmodes/emacs-news-mode.el
index b844955e1be..31410176181 100644
--- c/lisp/textmodes/emacs-news-mode.el
+++ i/lisp/textmodes/emacs-news-mode.el
@@ -60,6 +60,11 @@ emacs-news-mode-map
   "C-x C-q" #'emacs-news-view-mode
   "<remap> <open-line>" #'emacs-news-open-line)
 
+(defvar-keymap emacs-news-heading-map
+  :parent outline-overlay-button-map
+  "n" #'outline-next-visible-heading
+  "p" #'outline-previous-visible-heading)
+
 (defvar emacs-news-view-mode-map
   ;; This is defined this way instead of inheriting because we're
   ;; deriving the mode from `special-mode' and want the keys from there.
@@ -75,7 +80,8 @@ emacs-news--mode-common
   (setq-local font-lock-defaults '(emacs-news-mode-font-lock-keywords t))
   (setq-local outline-minor-mode-cycle t
               outline-minor-mode-highlight 'append
-              outline-minor-mode-use-buttons 'in-margins)
+              outline-minor-mode-use-buttons 'in-margins
+              outline-overlay-button-map emacs-news-heading-map)
   (outline-minor-mode)
   (setq-local imenu-generic-expression outline-imenu-generic-expression)
   (emacs-etc--hide-local-variables))



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 19:02                 ` Robert Pluim
@ 2023-01-16 19:37                   ` Eli Zaretskii
  2023-01-30 14:39                     ` News-mode improvements Robert Pluim
  2023-01-17  7:29                   ` emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map' Juri Linkov
  1 sibling, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-01-16 19:37 UTC (permalink / raw)
  To: Robert Pluim; +Cc: juri, emacs-devel

> From: Robert Pluim <rpluim@gmail.com>
> Cc: Juri Linkov <juri@linkov.net>,  emacs-devel@gnu.org
> Date: Mon, 16 Jan 2023 20:02:34 +0100
> 
> >>>>> On Mon, 16 Jan 2023 20:26:14 +0200, Eli Zaretskii <eliz@gnu.org> said:
> 
>     >> > On master. Iʼm assuming adding bindings would not fall under 'bug
>     >> > fixes only'.
>     >> 
>     >> But maybe Eli will agree to install it on emacs-29?
> 
>     Eli> Maybe.  Robert didn't really explain what are his plans in that
>     Eli> regard.
> 
> Hereʼs the complete patch (minus doc changes). I was thinking putting
> the outline.el bits in emacs-29, to make it easier for everybody to
> change the bindings, and then changing the bindings in news-mode in
> master.

It's fine with me to add a couple of key bindings to
emacs-news-mode-map.

Btw, that mode "needs work", IMO: it has no menu-bar menu (and so
mouse-1 on its mode-line indication does funny things), and it begs
for some useful key bindings.



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-16 19:02                 ` Robert Pluim
  2023-01-16 19:37                   ` Eli Zaretskii
@ 2023-01-17  7:29                   ` Juri Linkov
  2023-01-17  8:52                     ` Robert Pluim
  1 sibling, 1 reply; 18+ messages in thread
From: Juri Linkov @ 2023-01-17  7:29 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Eli Zaretskii, emacs-devel

>     >> >     Eli> Ah, okay.  Fine with me if Juri (or someone else) doesn't object.
>     >> >
>     >> >     >> (and what I really want to do is add 'n' and 'p' into that map, which
>     >> >     >> improves the speed at which I can proofread NEWS.)
>     >> >
>     >> >     Eli> On master or emacs-29?
>     >> >
>     >> > On master. Iʼm assuming adding bindings would not fall under 'bug
>     >> > fixes only'.
>     >>
>     >> But maybe Eli will agree to install it on emacs-29?
>
>     Eli> Maybe.  Robert didn't really explain what are his plans in that
>     Eli> regard.
>
> Hereʼs the complete patch (minus doc changes). I was thinking putting
> the outline.el bits in emacs-29, to make it easier for everybody to
> change the bindings, and then changing the bindings in news-mode in
> master.

Are there any reasons not to make this customizable in emacs-29?



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-17  7:29                   ` emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map' Juri Linkov
@ 2023-01-17  8:52                     ` Robert Pluim
  2023-01-17 17:25                       ` Juri Linkov
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Pluim @ 2023-01-17  8:52 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Eli Zaretskii, emacs-devel

>>>>> On Tue, 17 Jan 2023 09:29:32 +0200, Juri Linkov <juri@linkov.net> said:

    >> >> >     Eli> Ah, okay.  Fine with me if Juri (or someone else) doesn't object.
    >> >> >
    >> >> >     >> (and what I really want to do is add 'n' and 'p' into that map, which
    >> >> >     >> improves the speed at which I can proofread NEWS.)
    >> >> >
    >> >> >     Eli> On master or emacs-29?
    >> >> >
    >> >> > On master. Iʼm assuming adding bindings would not fall under 'bug
    >> >> > fixes only'.
    >> >>
    >> >> But maybe Eli will agree to install it on emacs-29?
    >> 
    Eli> Maybe.  Robert didn't really explain what are his plans in that
    Eli> regard.
    >> 
    >> Hereʼs the complete patch (minus doc changes). I was thinking putting
    >> the outline.el bits in emacs-29, to make it easier for everybody to
    >> change the bindings, and then changing the bindings in news-mode in
    >> master.

    Juri> Are there any reasons not to make this customizable in emacs-29?

Which bit do you want to make customizable? The 'n' and 'p' bindings?
Or did you mean customizing whether those bindings are applied for
headings?

(and again: emacs-29 is supposed to be in feature freeze. If we keep
adding stuff to this featurette, Iʼm going to lean towards putting it
in master)

Robert
-- 



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-17  8:52                     ` Robert Pluim
@ 2023-01-17 17:25                       ` Juri Linkov
  2023-01-18  8:30                         ` Robert Pluim
  0 siblings, 1 reply; 18+ messages in thread
From: Juri Linkov @ 2023-01-17 17:25 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Eli Zaretskii, emacs-devel

>     >> >> >     Eli> Ah, okay.  Fine with me if Juri (or someone else) doesn't object.
>     >> >> >
>     >> >> >     >> (and what I really want to do is add 'n' and 'p' into that map, which
>     >> >> >     >> improves the speed at which I can proofread NEWS.)
>     >> >> >
>     >> >> >     Eli> On master or emacs-29?
>     >> >> >
>     >> >> > On master. Iʼm assuming adding bindings would not fall under 'bug
>     >> >> > fixes only'.
>     >> >>
>     >> >> But maybe Eli will agree to install it on emacs-29?
>     >>
>     Eli> Maybe.  Robert didn't really explain what are his plans in that
>     Eli> regard.
>     >>
>     >> Hereʼs the complete patch (minus doc changes). I was thinking putting
>     >> the outline.el bits in emacs-29, to make it easier for everybody to
>     >> change the bindings, and then changing the bindings in news-mode in
>     >> master.
>
>     Juri> Are there any reasons not to make this customizable in emacs-29?
>
> Which bit do you want to make customizable? The 'n' and 'p' bindings?
> Or did you mean customizing whether those bindings are applied for
> headings?

I meant only moving keymaps out of the functions to the separate variables
without changing their keybindings to give users freedom to customize keys,
i.e. like in your patch for outline.el.



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-17 17:25                       ` Juri Linkov
@ 2023-01-18  8:30                         ` Robert Pluim
  2023-01-24 18:38                           ` Juri Linkov
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Pluim @ 2023-01-18  8:30 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Eli Zaretskii, emacs-devel

>>>>> On Tue, 17 Jan 2023 19:25:16 +0200, Juri Linkov <juri@linkov.net> said:

    Juri> I meant only moving keymaps out of the functions to the separate variables
    Juri> without changing their keybindings to give users freedom to customize keys,
    Juri> i.e. like in your patch for outline.el.

OK, I thought you were talking about adding `defcustom' stuff. I think
weʼre in agreement, then.

Robert
-- 



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-18  8:30                         ` Robert Pluim
@ 2023-01-24 18:38                           ` Juri Linkov
  2023-01-24 22:03                             ` Robert Pluim
  0 siblings, 1 reply; 18+ messages in thread
From: Juri Linkov @ 2023-01-24 18:38 UTC (permalink / raw)
  To: Robert Pluim; +Cc: Eli Zaretskii, emacs-devel

>> I meant only moving keymaps out of the functions to the separate variables
>> without changing their keybindings to give users freedom to customize keys,
>> i.e. like in your patch for outline.el.
>
> OK, I thought you were talking about adding `defcustom' stuff. I think
> weʼre in agreement, then.

So pushed now.  Thanks for the patch.



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

* Re: emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map'.
  2023-01-24 18:38                           ` Juri Linkov
@ 2023-01-24 22:03                             ` Robert Pluim
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Pluim @ 2023-01-24 22:03 UTC (permalink / raw)
  To: Juri Linkov; +Cc: Eli Zaretskii, emacs-devel

>>>>> On Tue, 24 Jan 2023 20:38:56 +0200, Juri Linkov <juri@linkov.net> said:

    >>> I meant only moving keymaps out of the functions to the separate
    >>> variables
    >>> without changing their keybindings to give users freedom to
    >>> customize keys,
    >>> i.e. like in your patch for outline.el.
    >> 
    >> OK, I thought you were talking about adding `defcustom' stuff. I think
    >> weʼre in agreement, then.

    Juri> So pushed now.  Thanks for the patch.

Thanks. I was convinced Iʼd pushed it, but itʼs still sitting locally,
so evidently not.

Robert
-- 



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

* News-mode improvements
  2023-01-16 19:37                   ` Eli Zaretskii
@ 2023-01-30 14:39                     ` Robert Pluim
  2023-01-30 14:58                       ` Eli Zaretskii
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Pluim @ 2023-01-30 14:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>>>>> On Mon, 16 Jan 2023 21:37:47 +0200, Eli Zaretskii <eliz@gnu.org> said:

    Eli> Btw, that mode "needs work", IMO: it has no menu-bar menu (and so
    Eli> mouse-1 on its mode-line indication does funny things), and it begs
    Eli> for some useful key bindings.

Adding a menu bar is easy enough. What bindings were you thinking of?

Robert
-- 



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

* Re: News-mode improvements
  2023-01-30 14:39                     ` News-mode improvements Robert Pluim
@ 2023-01-30 14:58                       ` Eli Zaretskii
  2023-01-30 15:14                         ` Robert Pluim
  0 siblings, 1 reply; 18+ messages in thread
From: Eli Zaretskii @ 2023-01-30 14:58 UTC (permalink / raw)
  To: Robert Pluim; +Cc: emacs-devel

> From: Robert Pluim <rpluim@gmail.com>
> Cc: emacs-devel@gnu.org
> Date: Mon, 30 Jan 2023 15:39:10 +0100
> 
> >>>>> On Mon, 16 Jan 2023 21:37:47 +0200, Eli Zaretskii <eliz@gnu.org> said:
> 
>     Eli> Btw, that mode "needs work", IMO: it has no menu-bar menu (and so
>     Eli> mouse-1 on its mode-line indication does funny things), and it begs
>     Eli> for some useful key bindings.
> 
> Adding a menu bar is easy enough. What bindings were you thinking of?

The commands defined there are all useful, so some "C-c SOMETHING"
bindings for the following commands would be appreciated:
emacs-news-next/previous-untagged-entry, emacs-news-toggle-tag,
emacs-news-count-untagged-entries, emacs-news-goto-section,
emacs-news-find-heading, emacs-news-open-line,
emacs-news-delete-temporary-markers.

TIA



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

* Re: News-mode improvements
  2023-01-30 14:58                       ` Eli Zaretskii
@ 2023-01-30 15:14                         ` Robert Pluim
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Pluim @ 2023-01-30 15:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

>>>>> On Mon, 30 Jan 2023 16:58:59 +0200, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Robert Pluim <rpluim@gmail.com>
    >> Cc: emacs-devel@gnu.org
    >> Date: Mon, 30 Jan 2023 15:39:10 +0100
    >> 
    >> >>>>> On Mon, 16 Jan 2023 21:37:47 +0200, Eli Zaretskii <eliz@gnu.org> said:
    >> 
    Eli> Btw, that mode "needs work", IMO: it has no menu-bar menu (and so
    Eli> mouse-1 on its mode-line indication does funny things), and it begs
    Eli> for some useful key bindings.
    >> 
    >> Adding a menu bar is easy enough. What bindings were you thinking of?

    Eli> The commands defined there are all useful, so some "C-c SOMETHING"
    Eli> bindings for the following commands would be appreciated:
    Eli> emacs-news-next/previous-untagged-entry, emacs-news-toggle-tag,
    Eli> emacs-news-count-untagged-entries, emacs-news-goto-section,
    Eli> emacs-news-find-heading, emacs-news-open-line,
    Eli> emacs-news-delete-temporary-markers.

    Eli> TIA

Your wish is granted: those already exist (except
`emacs-news-delete-temporary-markers', which I guess we could put on
"C-c C-D" or something):

(defvar-keymap emacs-news-mode-map
  :parent emacs-news-common-map
  "C-c C-s" #'emacs-news-next-untagged-entry
  "C-c C-r" #'emacs-news-previous-untagged-entry
  "C-c C-t" #'emacs-news-toggle-tag
  "C-c C-g" #'emacs-news-goto-section
  "C-c C-j" #'emacs-news-find-heading
  "C-c C-e" #'emacs-news-count-untagged-entries
  "C-x C-q" #'emacs-news-view-mode
  "<remap> <open-line>" #'emacs-news-open-line)

Robert
-- 



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

end of thread, other threads:[~2023-01-30 15:14 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <167346587385.21119.11842722402918987249@vcs2.savannah.gnu.org>
     [not found] ` <20230111193754.33EF3C00A7F@vcs2.savannah.gnu.org>
2023-01-16 13:57   ` emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map' Robert Pluim
2023-01-16 14:33     ` Eli Zaretskii
2023-01-16 15:02       ` Robert Pluim
2023-01-16 16:58         ` Eli Zaretskii
2023-01-16 17:18           ` Robert Pluim
2023-01-16 17:43             ` Juri Linkov
2023-01-16 18:26               ` Eli Zaretskii
2023-01-16 19:02                 ` Robert Pluim
2023-01-16 19:37                   ` Eli Zaretskii
2023-01-30 14:39                     ` News-mode improvements Robert Pluim
2023-01-30 14:58                       ` Eli Zaretskii
2023-01-30 15:14                         ` Robert Pluim
2023-01-17  7:29                   ` emacs-29 4a8891a462: * etc/NEWS: Mention incompatible changes in 'outline-minor-mode-cycle-map' Juri Linkov
2023-01-17  8:52                     ` Robert Pluim
2023-01-17 17:25                       ` Juri Linkov
2023-01-18  8:30                         ` Robert Pluim
2023-01-24 18:38                           ` Juri Linkov
2023-01-24 22:03                             ` Robert Pluim

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