GNU bug report logs - #29538
26.0.90; Gnus, group buffer: Mouse click on empty space selects group

Previous Next

Package: emacs;

Reported by: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>

Date: Sat, 2 Dec 2017 20:17:01 UTC

Severity: minor

Found in version 26.0.90

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

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 29538 in the body.
You can then email your comments to 29538 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#29538; Package emacs. (Sat, 02 Dec 2017 20:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 02 Dec 2017 20:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
Date: Sat, 02 Dec 2017 21:15:37 +0100
The behaviour of mouse clicks has changed in the Gnus group buffer from
Emacs 25 to Emacs 26.

In Emacs 25, when I clicked on empty space to the right of lines or
after the last group, this did nothing.  This was usefull to just
activate the Emacs frame.

In Emacs 26, clicking after lines opens the group on the line where I
clicked or it opens the last group, if I click in the space after the
last group.  As I use the mouse mostly to activate Emacs and once Emacs
is active I use the keyboard for most of my interaction, this is a
rather annoying change for me.

I would guess that for some reason, in Emacs 25 the lineend was inactive
and in Emacs 26 it is now activated for mouse clicks.  I currently do
not even understand how activation for mouse clicks work in this buffer,
so I can't provide a fix myself.

---

In GNU Emacs 26.0.90 (build 1, i686-pc-linux-gnu, GTK+ Version 2.24.25)
 of 2017-12-02 built on justinian
Repository revision: 8227087194e0817b984ce3b15099f5eae4dc011c
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description:	Debian GNU/Linux 8.9 (jessie)

Recent messages:
Reading active file via nnfolder...
Reading incoming mail from file... [2 times]
Reading incoming mail from pop...
nnfolder: Reading incoming mail (no new mail)...done
Reading active file via nnfolder...done
Reading active file via nndraft...done
Checking new news...done
When done with this frame, type C-x 5 0
Quit [2 times]
Type C-x 1 to delete the help window, C-M-v to scroll help.

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM GSETTINGS NOTIFY LIBSELINUX GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Help

Minor modes in effect:
  desktop-save-mode: t
  delete-selection-mode: t
  display-time-mode: t
  diff-auto-refine-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort emacsbug cl-extra eieio-opt speedbar sb-image ezimage
dframe find-func help-fns help-mode pp gnus-topic nndraft nnmh nndoc
nnfolder bbdb-gnus network-stream nsm starttls gnus-agent gnus-srvr
gnus-score score-mode nnvirtual gnus-msg nntp gnus-cache pop3 nnrss
gnus-art mm-uu mml2015 mm-view mml-smime smime dig gnus-sum gnus-group
gnus-undo gnus-start gnus-cloud nnimap nnmail mail-source tls gnutls
utf7 netrc nnoo parse-time gnus-spec gnus-int gnus-range gnus-win
cus-edit cus-start cus-load eww mm-url gnus nnheader wid-edit url-queue
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util mailcap shr svg xml dom edmacro kmacro conf-mode
imenu elec-pair jka-compr desktop frameset highline benny-calendar-cfg
ange-ftp benny-unicode generic-x autoinsert cc-cmds cc-engine cc-vars
cc-defs ps-print ps-print-loaddefs ps-def lpr advice benny-url cmuscheme
comint ansi-color ring scheme delsel disp-table time server protbuf
cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays
hol-loaddefs vc-git diff-mode easy-mmode vc-fossil vc vc-dispatcher
diary-lib diary-loaddefs cal-menu calendar cal-loaddefs benny-file-cache
message-x message rmc puny dired dired-loaddefs format-spec mml mml-sec
epa derived epg gnus-util rmail rmail-loaddefs time-date mm-decode
mm-bodies mm-encode mail-parse rfc2231 gmm-utils mailheader bbdb-snarf
mail-extr rfc822 bbdb-com mailabbrev bbdb-autoloads bbdb cl timezone
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
.loaddefs browse-url autoload radix-tree lisp-mnt finder-inf gh-common
gh-profile rx s marshal eieio-compat ht json map dash info package
easymenu epg-config url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs eieio-loaddefs password-cache url-vars seq byte-opt
gv bytecomp byte-compile cconv cl-loaddefs cl-lib mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote inotify dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 8 430699 23066)
 (symbols 24 152994 2)
 (miscs 20 106 348)
 (strings 16 204009 6852)
 (string-bytes 1 5349834)
 (vectors 12 38477)
 (vector-slots 4 851193 36246)
 (floats 8 1019 104)
 (intervals 28 629 0)
 (buffers 536 28)
 (heap 1024 57025 1736))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29538; Package emacs. (Mon, 04 Dec 2017 01:04:02 GMT) Full text and rfc822 format available.

Message #8 received at 29538 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: 29538 <at> debbugs.gnu.org
Subject: Re: bug#29538: 26.0.90;
 Gnus, group buffer: Mouse click on empty space selects group
Date: Mon, 04 Dec 2017 10:03:37 +0900
On Sat, 02 Dec 2017 21:15:37 +0100, Benjamin Riefenstahl wrote:
> The behaviour of mouse clicks has changed in the Gnus group buffer from
> Emacs 25 to Emacs 26.

I found no difference in the end of a group line between 25 and 26.
Don't you have a special treatment on `gnus-mouse-2'?  In Emacs 25
the default value of it is `[mouse-2]' that Emacs 26 directly uses
instead of `gnus-mouse-2'.  Otherwise, isn't it due to your setting of
`mouse-1-click-follows-link' or `mouse-1-click-in-non-selected-windows'?

> In Emacs 25, when I clicked on empty space to the right of lines or
> after the last group, this did nothing.  This was usefull to just
> activate the Emacs frame.

Making the mouse click do so is easy anyway:

(defadvice gnus-mouse-pick-group (around do-nothing-in-lineend activate)
  "Do nothing in the line end."
  (mouse-set-point e)
  (or (eolp) ad-do-it))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29538; Package emacs. (Mon, 04 Dec 2017 19:49:01 GMT) Full text and rfc822 format available.

Message #11 received at 29538 <at> debbugs.gnu.org (full text, mbox):

From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: 29538 <at> debbugs.gnu.org
Subject: Re: bug#29538: 26.0.90;
 Gnus, group buffer: Mouse click on empty space selects group
Date: Mon, 04 Dec 2017 20:47:53 +0100
Hi,

Thank you for looking into this.

> On Sat, 02 Dec 2017 21:15:37 +0100, Benjamin Riefenstahl wrote:
>> The behaviour of mouse clicks has changed in the Gnus group buffer from
>> Emacs 25 to Emacs 26.

Katsumi Yamaoka writes:
> I found no difference in the end of a group line between 25 and 26.
> Don't you have a special treatment on `gnus-mouse-2'?  In Emacs 25
> the default value of it is `[mouse-2]' that Emacs 26 directly uses
> instead of `gnus-mouse-2'.

What is `gnus-mouse-2'?  I do not seem to have a variable or function of
that name.

I tried C-h k mouse-1 after the line end and also inside the group
string.

For Enacs 25 I get this for after the line end:

    <down-mouse-1> at that spot runs the command mouse-drag-region (found
    in global-map), [...]

    ----------------- up-event ----------------

    <mouse-1> at that spot runs the command mouse-set-point (found in
    global-map), [...]

Inside the groups string I get:

    <down-mouse-1> (translated from <mouse-1>) at that spot runs the
    command mouse-drag-region (found in global-map), [...]

    ----------------- up-event ----------------

    <mouse-2> at that spot runs the command gnus-mouse-pick-topic (found
    in gnus-topic-mode-map), [...]

While for Emacs 26 I get this for both:

    <down-mouse-1> at that spot runs the command mouse-drag-region (found
    in global-map), [...]

    ----------------- up-event (short click) ----------------

    <mouse-2> at that spot is remapped to <mouse-2>, which runs the
    command gnus-mouse-pick-topic (found in gnus-topic-mode-map), [...]

    ----------------- up-event (long click) ----------------

    Pressing <mouse-1> at that spot for longer than 450 milli-seconds
    runs the command mouse-set-point (found in global-map), [...]

IOW, after the line end there is an additional handler for mouse-2 in
Emacs 26, that was not there in Emacs 25.

> Otherwise, isn't it due to your setting of
> `mouse-1-click-follows-link' or
> `mouse-1-click-in-non-selected-windows'?

`mouse-1-click-in-non-selected-windows' would change this particular
behaviour, but it is not what I want either :-(.  I prefer to have a
button or link activate when I click on it, without having to care if
the frame was active or not.  It's just that in the case of the Gnus
group buffer, the whole client space is active, even where it used to be
not (and IMO should not be).

> Making the mouse click do so is easy anyway:
>
> (defadvice gnus-mouse-pick-group (around do-nothing-in-lineend activate)
>   "Do nothing in the line end."
>   (mouse-set-point e)
>   (or (eolp) ad-do-it))

That works for me, thank you.  It's `gnus-mouse-pick-topic' for me,
because I have topics activated, sorry for not mentioning that before.
(If I disable topics, the same problem occurs, so that by itself seems
not to be the cause of this.)

benny




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29538; Package emacs. (Tue, 05 Dec 2017 02:09:02 GMT) Full text and rfc822 format available.

Message #14 received at 29538 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: 29538 <at> debbugs.gnu.org
Subject: Re: bug#29538: 26.0.90;
 Gnus, group buffer: Mouse click on empty space selects group
Date: Tue, 05 Dec 2017 11:08:15 +0900
On Mon, 04 Dec 2017 20:47:53 +0100, Benjamin Riefenstahl wrote:
> Thank you for looking into this.

>> On Sat, 02 Dec 2017 21:15:37 +0100, Benjamin Riefenstahl wrote:
>>> The behaviour of mouse clicks has changed in the Gnus group buffer from
>>> Emacs 25 to Emacs 26.

> Katsumi Yamaoka writes:
>> I found no difference in the end of a group line between 25 and 26.
>> Don't you have a special treatment on `gnus-mouse-2'?  In Emacs 25
>> the default value of it is `[mouse-2]' that Emacs 26 directly uses
>> instead of `gnus-mouse-2'.

> What is `gnus-mouse-2'?  I do not seem to have a variable or function of
> that name.

There used to be many `gnus-ORIGINAL-FUNCTION-OR-VARIABLE-NAME'
in old Gnus in order to keep the compatibility with old Emacsen
and XEmacsen.  As for the variable `gnus-mouse-2', the value was
[mouse-2] in Emacs, and [button2] in XEmacs.

> I tried C-h k mouse-1 after the line end and also inside the group
> string.

> For Enacs 25 I get this for after the line end:
[...]
> While for Emacs 26 I get this for both:
[...]

The same as here.  And I got to be able to reproduce the problem
in Emacs 26, not 25.  Sorry, I tested only mouse-2 yesterday as
I set `mouse-1-click-follows-link' to nil.  But it's 450 now.

In `gnus-group-mode-map' the [follow-link] key is bound to
`mouse-face'.  This causes the [mouse-1] event to be converted
to the [mouse-2] event at the areas where the `mouse-face'
exists if `mouse-1-click-follows-link' is non-nil.
The difference between Emacs 25 and 26 is that only Emacs 26 is
sensitive to the `mouse-face' text property even if the observation
point is behind the area where the text property exists.

Here is a test code.  You may see "Hello World" in Emacs 26 when
clicking the mouse-1 button just after the "group.name", whereas
you will not see it in Emacs 25.  Adding the `(rear-nonsticky t)'
text property doesn't help.

(require 'gnus-group)
(let ((buffer (get-buffer-create "*testing*"))
      (keymap (copy-keymap gnus-group-mode-map)))
  (define-key keymap [mouse-2] (lambda ()
				 (interactive)
				 (message "Hello World")))
  (with-current-buffer buffer
    (erase-buffer)
    (use-local-map keymap)
    (insert "  123: "
	    (propertize "group.name" 'mouse-face 'highlight)
	    "\n"))
  (display-buffer buffer))

However the following test code 2 does not make the mouse-1
button sensitive at the line end even in Emacs 26.

(let ((buffer (get-buffer-create "*testing*"))
      (keymap (make-keymap)))
  (define-key keymap [follow-link] 'mouse-face)
  (define-key keymap [mouse-2] (lambda ()
				 (interactive)
				 (message "Hello World")))
  (with-current-buffer buffer
    (erase-buffer)
    (use-local-map keymap)
    (insert "  123: "
	    (propertize "group.name" 'mouse-face 'highlight)
	    "\n"))
  (display-buffer buffer))

Does anyone know what is different between them?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29538; Package emacs. (Tue, 05 Dec 2017 03:11:02 GMT) Full text and rfc822 format available.

Message #17 received at 29538 <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: larsi <at> gnus.org, 29538 <at> debbugs.gnu.org
Subject: Re: bug#29538: 26.0.90;
 Gnus, group buffer: Mouse click on empty space selects group
Date: Tue, 05 Dec 2017 12:09:53 +0900
On Tue, 05 Dec 2017 11:08:15 +0900, Katsumi Yamaoka wrote:
> Does anyone know what is different between them?

I don't know why and who did it but this fixes the problem:

--- gnus-group.el~	2017-10-27 01:14:04.569750000 +0000
+++ gnus-group.el	2017-12-05 03:03:45.672382200 +0000
@@ -630,3 +630,3 @@
   [mouse-2] gnus-mouse-pick-group
-  [follow-link] 'mouse-face
+  [follow-link] mouse-face
   "<" beginning-of-buffer

Oh, I'm not sure whether it's a fix either.  Lars, WDYT?
This makes `mouse-on-link-p' behave differently anyway.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29538; Package emacs. (Tue, 05 Dec 2017 07:37:02 GMT) Full text and rfc822 format available.

Message #20 received at 29538 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Katsumi Yamaoka <yamaoka <at> jpl.org>
Cc: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>,
 29538 <at> debbugs.gnu.org
Subject: Re: bug#29538: 26.0.90;
 Gnus, group buffer: Mouse click on empty space selects group
Date: Tue, 05 Dec 2017 08:36:19 +0100
Katsumi Yamaoka <yamaoka <at> jpl.org> writes:

> I don't know why and who did it but this fixes the problem:
>
> --- gnus-group.el~	2017-10-27 01:14:04.569750000 +0000
> +++ gnus-group.el	2017-12-05 03:03:45.672382200 +0000
> @@ -630,3 +630,3 @@
>    [mouse-2] gnus-mouse-pick-group
> -  [follow-link] 'mouse-face
> +  [follow-link] mouse-face
>    "<" beginning-of-buffer
>
> Oh, I'm not sure whether it's a fix either.  Lars, WDYT?

Looks like the right fix to me.

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




Reply sent to Katsumi Yamaoka <yamaoka <at> jpl.org>:
You have taken responsibility. (Tue, 05 Dec 2017 08:24:01 GMT) Full text and rfc822 format available.

Notification sent to Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>:
bug acknowledged by developer. (Tue, 05 Dec 2017 08:24:03 GMT) Full text and rfc822 format available.

Message #25 received at 29538-done <at> debbugs.gnu.org (full text, mbox):

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>,
 29538-done <at> debbugs.gnu.org
Subject: Re: bug#29538: 26.0.90;
 Gnus, group buffer: Mouse click on empty space selects group
Date: Tue, 05 Dec 2017 17:23:02 +0900
On Tue, 05 Dec 2017 08:36:19 +0100, Lars Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka <at> jpl.org> writes:
>> I don't know why and who did it but this fixes the problem:

>> --- gnus-group.el~	2017-10-27 01:14:04.569750000 +0000
>> +++ gnus-group.el	2017-12-05 03:03:45.672382200 +0000
>> @@ -630,3 +630,3 @@
>>    [mouse-2] gnus-mouse-pick-group
>> -  [follow-link] 'mouse-face
>> +  [follow-link] mouse-face
>>    "<" beginning-of-buffer

>> Oh, I'm not sure whether it's a fix either.  Lars, WDYT?

> Looks like the right fix to me.

I've pushed it to the emacs-26 branch.  Thanks Lars.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 02 Jan 2018 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.