unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
@ 2017-12-02 20:15 Benjamin Riefenstahl
  2017-12-04  1:03 ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Riefenstahl @ 2017-12-02 20:15 UTC (permalink / raw)
  To: 29538

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





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

* bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
  2017-12-02 20:15 bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group Benjamin Riefenstahl
@ 2017-12-04  1:03 ` Katsumi Yamaoka
  2017-12-04 19:47   ` Benjamin Riefenstahl
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2017-12-04  1:03 UTC (permalink / raw)
  To: Benjamin Riefenstahl; +Cc: 29538

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





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

* bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
  2017-12-04  1:03 ` Katsumi Yamaoka
@ 2017-12-04 19:47   ` Benjamin Riefenstahl
  2017-12-05  2:08     ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Benjamin Riefenstahl @ 2017-12-04 19:47 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: 29538

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





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

* bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
  2017-12-04 19:47   ` Benjamin Riefenstahl
@ 2017-12-05  2:08     ` Katsumi Yamaoka
  2017-12-05  3:09       ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2017-12-05  2:08 UTC (permalink / raw)
  To: Benjamin Riefenstahl; +Cc: 29538

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?





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

* bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
  2017-12-05  2:08     ` Katsumi Yamaoka
@ 2017-12-05  3:09       ` Katsumi Yamaoka
  2017-12-05  7:36         ` Lars Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2017-12-05  3:09 UTC (permalink / raw)
  To: Benjamin Riefenstahl; +Cc: larsi, 29538

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.





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

* bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
  2017-12-05  3:09       ` Katsumi Yamaoka
@ 2017-12-05  7:36         ` Lars Ingebrigtsen
  2017-12-05  8:23           ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Ingebrigtsen @ 2017-12-05  7:36 UTC (permalink / raw)
  To: Katsumi Yamaoka; +Cc: Benjamin Riefenstahl, 29538

Katsumi Yamaoka <yamaoka@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





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

* bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group
  2017-12-05  7:36         ` Lars Ingebrigtsen
@ 2017-12-05  8:23           ` Katsumi Yamaoka
  0 siblings, 0 replies; 7+ messages in thread
From: Katsumi Yamaoka @ 2017-12-05  8:23 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Benjamin Riefenstahl, 29538-done

On Tue, 05 Dec 2017 08:36:19 +0100, Lars Ingebrigtsen wrote:
> Katsumi Yamaoka <yamaoka@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.





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

end of thread, other threads:[~2017-12-05  8:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-02 20:15 bug#29538: 26.0.90; Gnus, group buffer: Mouse click on empty space selects group Benjamin Riefenstahl
2017-12-04  1:03 ` Katsumi Yamaoka
2017-12-04 19:47   ` Benjamin Riefenstahl
2017-12-05  2:08     ` Katsumi Yamaoka
2017-12-05  3:09       ` Katsumi Yamaoka
2017-12-05  7:36         ` Lars Ingebrigtsen
2017-12-05  8:23           ` Katsumi Yamaoka

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