GNU bug report logs -
#25784
25.2; mouse-1 binding in debbugs-gnu.el
Previous Next
Reported by: charles <at> aurox.ch (Charles A. Roelli)
Date: Sat, 18 Feb 2017 11:21:02 UTC
Severity: normal
Found in version 25.2
Done: Michael Albinus <michael.albinus <at> gmx.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25784 in the body.
You can then email your comments to 25784 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25784
; Package
emacs
.
(Sat, 18 Feb 2017 11:21:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
charles <at> aurox.ch (Charles A. Roelli)
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 18 Feb 2017 11:21:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
`mouse-1' is bound in debbugs-gnu.el, which means that a nil value of
`mouse-1-click-follows-link' is not respected. The following patch is
needed:
--- debbugs-0.12/debbugs-gnu.el.~2~ 2017-02-17 17:54:15.000000000 +0100
+++ debbugs-0.12/debbugs-gnu.el 2017-02-18 12:07:56.000000000 +0100
@@ -909,7 +909,6 @@
(menu-map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map "\r" 'debbugs-gnu-select-report)
- (define-key map [mouse-1] 'debbugs-gnu-select-report)
(define-key map [mouse-2] 'debbugs-gnu-select-report)
(define-key map "g" 'debbugs-gnu-rescan)
(define-key map "R" 'debbugs-gnu-show-all-blocking-reports)
@@ -1587,7 +1586,6 @@
(let ((map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map "\r" 'debbugs-gnu-select-usertag)
- (define-key map [mouse-1] 'debbugs-gnu-select-usertag)
(define-key map [mouse-2] 'debbugs-gnu-select-usertag)
map))
There already was a ChangeLog entry to this effect in the past:
2012-12-23 Lars Ingebrigtsen <larsi <at> gnus.org>
Don't explicitly bind mouse-1.
As Michael Heerdegen <michael_heerdegen <at> web.de> says:
However, also binding mouse-1 is not necessary. Depending on the
setting of `mouse-1-click-follows-link', which is non-nil by default,
mouse-1 already follows links - see its doc. We should leave it up to
the user if he wants to use mouse-1 for following or not.
But the change does not seem to have been made, or maybe it was reverted
at some point.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25784
; Package
emacs
.
(Sat, 18 Feb 2017 13:45:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 25784 <at> debbugs.gnu.org (full text, mbox):
On Feb 18 2017, charles <at> aurox.ch (Charles A. Roelli) wrote:
> There already was a ChangeLog entry to this effect in the past:
>
> 2012-12-23 Lars Ingebrigtsen <larsi <at> gnus.org>
>
> Don't explicitly bind mouse-1.
>
> As Michael Heerdegen <michael_heerdegen <at> web.de> says:
>
> However, also binding mouse-1 is not necessary. Depending on the
> setting of `mouse-1-click-follows-link', which is non-nil by default,
> mouse-1 already follows links - see its doc. We should leave it up to
> the user if he wants to use mouse-1 for following or not.
>
> But the change does not seem to have been made, or maybe it was reverted
> at some point.
This commit only changed debbugs-gnu-widget-map, not the other
occurrences.
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25784
; Package
emacs
.
(Sun, 19 Feb 2017 11:23:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 25784 <at> debbugs.gnu.org (full text, mbox):
On Sat, Feb 18 2017 at 02:43:49 pm, Andreas Schwab wrote:
> This commit only changed debbugs-gnu-widget-map, not the other
> occurrences.
Thanks for pointing that out. The other occurrences should be changed
too.
Reply sent
to
Michael Albinus <michael.albinus <at> gmx.de>
:
You have taken responsibility.
(Mon, 20 Feb 2017 08:17:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
charles <at> aurox.ch (Charles A. Roelli)
:
bug acknowledged by developer.
(Mon, 20 Feb 2017 08:17:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 25784-done <at> debbugs.gnu.org (full text, mbox):
charles <at> aurox.ch (Charles A. Roelli) writes:
Hi Charles,
>> This commit only changed debbugs-gnu-widget-map, not the other
>> occurrences.
>
> Thanks for pointing that out. The other occurrences should be changed
> too.
I've applied your patch, extended to the other occurences. debbugs
version is increased to 0.14, shall appear soon.
Thanks for your report, and best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25784
; Package
emacs
.
(Mon, 20 Feb 2017 08:57:01 GMT)
Full text and
rfc822 format available.
Message #19 received at 25784-done <at> debbugs.gnu.org (full text, mbox):
Thanks for looking into this, Michael. I realize now that this change
only makes sense if mouse-2 sets point when clicked, as it does in Gnus.
I think what follows is the correct way to do it, and it works as
expected.
--- debbugs-0.12/debbugs-gnu.el.~1~ 2016-10-31 22:02:05.000000000 +0100
+++ debbugs-0.12/debbugs-gnu.el 2017-02-19 12:56:02.000000000 +0100
@@ -909,7 +909,6 @@
(menu-map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map "\r" 'debbugs-gnu-select-report)
- (define-key map [mouse-1] 'debbugs-gnu-select-report)
(define-key map [mouse-2] 'debbugs-gnu-select-report)
(define-key map "g" 'debbugs-gnu-rescan)
(define-key map "R" 'debbugs-gnu-show-all-blocking-reports)
@@ -1347,9 +1346,10 @@
(format "Re: bug#%d: %s" id (cdr (assq 'subject status))))
(debbugs-gnu-summary-mode 1)))
-(defun debbugs-gnu-select-report ()
+(defun debbugs-gnu-select-report (&optional event)
"Select the report on the current line."
- (interactive)
+ (interactive "e")
+ (when event (mouse-set-point event))
;; We open the report messages.
(let* ((status (debbugs-gnu-current-status))
(id (cdr (assq 'id status)))
@@ -1587,7 +1587,6 @@
(let ((map (make-sparse-keymap)))
(set-keymap-parent map tabulated-list-mode-map)
(define-key map "\r" 'debbugs-gnu-select-usertag)
- (define-key map [mouse-1] 'debbugs-gnu-select-usertag)
(define-key map [mouse-2] 'debbugs-gnu-select-usertag)
map))
@@ -1665,9 +1664,10 @@
(set-buffer-modified-p nil)
(goto-char (point-min)))))
-(defun debbugs-gnu-select-usertag ()
+(defun debbugs-gnu-select-usertag (&optional event)
"Select the user tag on the current line."
- (interactive)
+ (interactive "e")
+ (when event (mouse-set-point event))
;; We open the bug reports.
(let ((args (get-text-property (line-beginning-position) 'tabulated-list-id)))
(when args (apply 'debbugs-gnu args))))
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25784
; Package
emacs
.
(Mon, 20 Feb 2017 12:34:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 25784-done <at> debbugs.gnu.org (full text, mbox):
charles <at> aurox.ch (Charles A. Roelli) writes:
Hi Charles,
> I realize now that this change only makes sense if mouse-2 sets point
> when clicked, as it does in Gnus.
Good catch!
> I think what follows is the correct way to do it, and it works as
> expected.
This patch works for using the mouse, but there are problems when you
enter a bug report via RET or menu <Debbugs> -> <Show Reports>.
I've applied the following patch to the repository:
--8<---------------cut here---------------start------------->8---
diff --git a/packages/debbugs/debbugs-gnu.el b/packages/debbugs/debbugs-gnu.el
index f814642..eb94679 100644
--- a/packages/debbugs/debbugs-gnu.el
+++ b/packages/debbugs/debbugs-gnu.el
@@ -1350,6 +1350,7 @@ MERGED is the list of bugs merged with this one."
(defun debbugs-gnu-select-report ()
"Select the report on the current line."
(interactive)
+ (when (mouse-event-p last-input-event) (mouse-set-point last-input-event))
;; We open the report messages.
(let* ((status (debbugs-gnu-current-status))
(id (cdr (assq 'id status)))
@@ -1673,6 +1674,7 @@ The following commands are available:
(defun debbugs-gnu-select-usertag ()
"Select the user tag on the current line."
(interactive)
+ (when (mouse-event-p last-input-event) (mouse-set-point last-input-event))
;; We open the bug reports.
(let ((args (get-text-property (line-beginning-position) 'tabulated-list-id)))
(when args (apply 'debbugs-gnu args))))
--8<---------------cut here---------------end--------------->8---
Will appear with the next debbugs version 0.15. I've not decided yet,
when to release.
Best regards, Michael.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#25784
; Package
emacs
.
(Mon, 20 Feb 2017 19:41:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 25784-done <at> debbugs.gnu.org (full text, mbox):
Thanks Michael, this looks good to me.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 21 Mar 2017 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 8 years and 88 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.