GNU bug report logs -
#13692
mouse clicks in vc-dir buffers accidentally changing marks
Previous Next
Reported by: Glenn Morris <rgm <at> gnu.org>
Date: Tue, 12 Feb 2013 04:57:02 UTC
Severity: minor
Found in version 24.3
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.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 13692 in the body.
You can then email your comments to 13692 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#13692
; Package
emacs
.
(Tue, 12 Feb 2013 04:57:02 GMT)
Full text and
rfc822 format available.
Message #3 received at submit <at> debbugs.gnu.org (full text, mbox):
Package: emacs
Version: 24.3
Severity: minor
Maybe it's just me, but I find it too easy to accidentally change the
marked files in a vc-dir buffer with careless mouse clicks.
In a directory under version control with modified files:
emacs -Q -f vc-dir
The text that says "edited" (and the space following it all the way up
to the filename) runs vc-dir-toggle-mark on mouse clicks. I find this
makes it too easy to accidentally change the marked state when using the
mouse to select a different window or frame.
In a dired buffer, there is no way to mark files with mouse clicks
AFAICS. I don't see why vc-dir needs one. (Confusingly, clicking on the
actual mark character itself at the start of the line in a vc-dir buffer
does nothing.)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Wed, 20 Jan 2021 03:59:01 GMT)
Full text and
rfc822 format available.
Message #6 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Glenn Morris <rgm <at> gnu.org> writes:
> Maybe it's just me, but I find it too easy to accidentally change the
> marked files in a vc-dir buffer with careless mouse clicks.
>
> In a directory under version control with modified files:
>
> emacs -Q -f vc-dir
>
> The text that says "edited" (and the space following it all the way up
> to the filename) runs vc-dir-toggle-mark on mouse clicks. I find this
> makes it too easy to accidentally change the marked state when using the
> mouse to select a different window or frame.
>
> In a dired buffer, there is no way to mark files with mouse clicks
> AFAICS. I don't see why vc-dir needs one. (Confusingly, clicking on the
> actual mark character itself at the start of the line in a vc-dir buffer
> does nothing.)
So the suggestion is to remove the `[mouse-2]' binding in
`vc-dir-mode'. I've never used the functionality myself, but I can see
that somebody might find this useful, but if we're going to have it,
perhaps the clickable area should be extended to the mark character,
too?
(I think removing the binding after more than a decade in existence
would be confusing.)
Anybody got any opinions here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Thu, 21 Jan 2021 03:09:01 GMT)
Full text and
rfc822 format available.
Message #9 received at 13692 <at> debbugs.gnu.org (full text, mbox):
On 20.01.2021 05:58, Lars Ingebrigtsen wrote:
> So the suggestion is to remove the `[mouse-2]' binding in
> `vc-dir-mode'.
I'm not sure, actually. Perhaps the complaint is about the mouse-1
effect on status buttons.
But the rest of my email is on the assumption that we're talking about
the mouse-2 binding.
> I've never used the functionality myself, but I can see
> that somebody might find this useful, but if we're going to have it,
> perhaps the clickable area should be extended to the mark character,
> too?
I've never noticed this functionality in almost a decade of using Emacs.
And working on VC for a number of years.
> (I think removing the binding after more than a decade in existence
> would be confusing.)
I don't have a strong opinion about this feature, but it seems like it
was designed almost with the main goal of being non-discoverable. As
such, I don't think it has many users.
It only works when you click on an empty space; if you click on a file
or directory name (which are highlighted as buttons and thus invite you
to click on them), using mouse-1 or mouse-2, you get to visit the file
instead. Only the "status" buttons work for that.
If the binding still causes problems (Glenn can tell us), perhaps we'd
better remove it. We can still keep the toggle effect on the status
buttons, so not much in the way of functionality would be missed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Thu, 21 Jan 2021 14:47:01 GMT)
Full text and
rfc822 format available.
Message #12 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 20.01.2021 05:58, Lars Ingebrigtsen wrote:
>> So the suggestion is to remove the `[mouse-2]' binding in
>> `vc-dir-mode'.
>
> I'm not sure, actually. Perhaps the complaint is about the mouse-1
> effect on status buttons.
>
> But the rest of my email is on the assumption that we're talking about
> the mouse-2 binding.
Depending on your settings, it's the same binding. I think the default
is that mouse-1 and mouse-2 will work the same here (because of the
(define-key map [follow-link] 'mouse-face)
thing)?
> I don't have a strong opinion about this feature, but it seems like it
> was designed almost with the main goal of being non-discoverable. As
> such, I don't think it has many users.
>
> It only works when you click on an empty space; if you click on a file
> or directory name (which are highlighted as buttons and thus invite
> you to click on them), using mouse-1 or mouse-2, you get to visit the
> file instead. Only the "status" buttons work for that.
It works on the status column, which normally has text like "edited "
in it (if you've edited something) -- the button extends to the end of
the column...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Sat, 23 Jan 2021 01:44:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 13692 <at> debbugs.gnu.org (full text, mbox):
On 21.01.2021 16:46, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> On 20.01.2021 05:58, Lars Ingebrigtsen wrote:
>>> So the suggestion is to remove the `[mouse-2]' binding in
>>> `vc-dir-mode'.
>>
>> I'm not sure, actually. Perhaps the complaint is about the mouse-1
>> effect on status buttons.
>>
>> But the rest of my email is on the assumption that we're talking about
>> the mouse-2 binding.
>
> Depending on your settings, it's the same binding. I think the default
> is that mouse-1 and mouse-2 will work the same here (because of the
>
> (define-key map [follow-link] 'mouse-face)
>
> thing)?
We're talking about slightly different things.
When I hear "mouse-2 binding", I think the global bidning in
vc-dir-mode-map, which affects how mouse-2 works also when clicking
outside of any buttons (on whitespace beside the buttons). And I think
that behavior is relatively weird and could be removed.
But we also have the behavior of mouse-1 and mouse-2 clicks on the
"status" button. Which seem fairly sensible to me, but might be the
cause of Glenn's annoyance in this report because it's relatively easy
to click mouse-1 anywhere in the buffer by mistake.
>> I don't have a strong opinion about this feature, but it seems like it
>> was designed almost with the main goal of being non-discoverable. As
>> such, I don't think it has many users.
>>
>> It only works when you click on an empty space; if you click on a file
>> or directory name (which are highlighted as buttons and thus invite
>> you to click on them), using mouse-1 or mouse-2, you get to visit the
>> file instead. Only the "status" buttons work for that.
>
> It works on the status column, which normally has text like "edited "
> in it (if you've edited something) -- the button extends to the end of
> the column...
Right. But if that is what is at issue here, I think the question
becomes whether to remove the "buttons" from that column (and keep the
mouse-2 binding globally) or whether to remove the mouse-2 binding, but
set up the buttons to continue working. Or make mouse-1 stop working on
the buttons but keep mouse-2 working everywhere (except the file names,
I guess?).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Sat, 23 Jan 2021 19:04:01 GMT)
Full text and
rfc822 format available.
Message #18 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> We're talking about slightly different things.
>
> When I hear "mouse-2 binding", I think the global bidning in
> vc-dir-mode-map, which affects how mouse-2 works also when clicking
> outside of any buttons (on whitespace beside the buttons). And I think
> that behavior is relatively weird and could be removed.
I didn't even notice that `mouse-2' did stuff when outside the
"buttons". And what it does is quite odd... hm, no, if you click after
the final line, it'll mark the last line, and before the first, it'll
mark the first, so perhaps that's logical?
> But we also have the behavior of mouse-1 and mouse-2 clicks on the
> "status" button. Which seem fairly sensible to me, but might be the
> cause of Glenn's annoyance in this report because it's relatively easy
> to click mouse-1 anywhere in the buffer by mistake.
Yes, I think he was complaining about the "status" button.
> Right. But if that is what is at issue here, I think the question
> becomes whether to remove the "buttons" from that column (and keep the
> mouse-2 binding globally) or whether to remove the mouse-2 binding,
> but set up the buttons to continue working. Or make mouse-1 stop
> working on the buttons but keep mouse-2 working everywhere (except the
> file names, I guess?).
I think removing the global mouse bindings and only having them on the
"buttons" would be least surprising -- that's how most modes work.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Sun, 24 Jan 2021 02:24:01 GMT)
Full text and
rfc822 format available.
Message #21 received at 13692 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 23.01.2021 21:02, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> We're talking about slightly different things.
>>
>> When I hear "mouse-2 binding", I think the global bidning in
>> vc-dir-mode-map, which affects how mouse-2 works also when clicking
>> outside of any buttons (on whitespace beside the buttons). And I think
>> that behavior is relatively weird and could be removed.
>
> I didn't even notice that `mouse-2' did stuff when outside the
> "buttons". And what it does is quite odd... hm, no, if you click after
> the final line, it'll mark the last line, and before the first, it'll
> mark the first, so perhaps that's logical?
I meant more like between the buttons, but on the same line as them. The
"before" and "after" behaviors are logical, but the whole binding is
very non-discoverable. Nor does it work on file names.
>> But we also have the behavior of mouse-1 and mouse-2 clicks on the
>> "status" button. Which seem fairly sensible to me, but might be the
>> cause of Glenn's annoyance in this report because it's relatively easy
>> to click mouse-1 anywhere in the buffer by mistake.
>
> Yes, I think he was complaining about the "status" button.
>
>> Right. But if that is what is at issue here, I think the question
>> becomes whether to remove the "buttons" from that column (and keep the
>> mouse-2 binding globally) or whether to remove the mouse-2 binding,
>> but set up the buttons to continue working. Or make mouse-1 stop
>> working on the buttons but keep mouse-2 working everywhere (except the
>> file names, I guess?).
>
> I think removing the global mouse bindings and only having them on the
> "buttons" would be least surprising -- that's how most modes work.
The attached patch seems to do that, except for the "status" buttons
beside directory names, which seem to be printed by ewoc in some other
way, and thus don't go through vc-dir-printer. Which is a new different
kind of awkward.
We're also solving a different problem than the one which was reported.
So I'm not sure about the change, TBH.
[vc-dir-no-mouse-2.diff (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Tue, 26 Jan 2021 00:00:01 GMT)
Full text and
rfc822 format available.
Message #24 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
>> I think removing the global mouse bindings and only having them on
>> the
>> "buttons" would be least surprising -- that's how most modes work.
>
> The attached patch seems to do that, except for the "status" buttons
> beside directory names, which seem to be printed by ewoc in some other
> way, and thus don't go through vc-dir-printer. Which is a new
> different kind of awkward.
>
> We're also solving a different problem than the one which was reported.
It's a different problem, but I think this change makes sense.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Tue, 26 Jan 2021 00:37:01 GMT)
Full text and
rfc822 format available.
Message #27 received at 13692 <at> debbugs.gnu.org (full text, mbox):
On 26.01.2021 01:59, Lars Ingebrigtsen wrote:
> It's a different problem, but I think this change makes sense.
I'm fine with doing it, but someone should look into the buttons beside
directory names first (clicking on them stops working if that patch is
applied).
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Wed, 27 Jan 2021 01:40:01 GMT)
Full text and
rfc822 format available.
Message #30 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> On 26.01.2021 01:59, Lars Ingebrigtsen wrote:
>> It's a different problem, but I think this change makes sense.
>
> I'm fine with doing it, but someone should look into the buttons
> beside directory names first (clicking on them stops working if that
> patch is applied).
Do you mean the `vc-default-dir-printer' thing?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Sat, 30 Jan 2021 02:02:02 GMT)
Full text and
rfc822 format available.
Message #33 received at 13692 <at> debbugs.gnu.org (full text, mbox):
On 27.01.2021 03:39, Lars Ingebrigtsen wrote:
> Dmitry Gutov<dgutov <at> yandex.ru> writes:
>
>> On 26.01.2021 01:59, Lars Ingebrigtsen wrote:
>>> It's a different problem, but I think this change makes sense.
>> I'm fine with doing it, but someone should look into the buttons
>> beside directory names first (clicking on them stops working if that
>> patch is applied).
> Do you mean the `vc-default-dir-printer' thing?
Huh, never mind. After applying the patch re-compiling both files and
restarting Emacs, the behavior now is as expected. So I pushed the
patch, thank you.
Not sure if we should close this now.
The thing that tripped me up last time was that when
vc-dir-revert-buffer-function is invoked, neither vc-default-dir-printer
nor vc-git-dir-printer are called to re-print the directory entries.
They remain as they were when the VC-Dir buffer was created (unless the
refresh ends up adding some some files in other directories, I suppose).
While we're on the subject of buttons, I think it's odd that mouse-1 and
mouse-2 routinely do the same thing, here and in other cases (e.g. links
in Compilation buffers). But I suppose this is outside of scope for this
discussion.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Sat, 30 Jan 2021 06:22:01 GMT)
Full text and
rfc822 format available.
Message #36 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> Not sure if we should close this now.
I think we should make the "*" area also clickable -- I think that's the
most confusing part here now (that only clicking the status area toggles
the "*", and clicking the "*" itself doesn't do anything).
> While we're on the subject of buttons, I think it's odd that mouse-1
> and mouse-2 routinely do the same thing, here and in other cases
> (e.g. links in Compilation buffers). But I suppose this is outside of
> scope for this discussion.
Yeah, the mouse thing is pretty confusing, but the
`mouse-1-click-follows-link' variable can be set to change the
behaviour.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Sat, 30 Jan 2021 14:06:01 GMT)
Full text and
rfc822 format available.
Message #39 received at 13692 <at> debbugs.gnu.org (full text, mbox):
On 30.01.2021 08:21, Lars Ingebrigtsen wrote:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> Not sure if we should close this now.
>
> I think we should make the "*" area also clickable -- I think that's the
> most confusing part here now (that only clicking the status area toggles
> the "*", and clicking the "*" itself doesn't do anything).
I don't know if it's so confusing: after all, we have mouse-face to let
the user know which area can be interacted with mouse clicks. The
asterisk is not highlighted, so it's not clickable.
We can change that, but how? Extend highlighting to the asterisk column?
On all lines, whether the asterisk is there or not?
The way that the button currently starts where the text starts looks
tidy and nice, IMHO.
>> While we're on the subject of buttons, I think it's odd that mouse-1
>> and mouse-2 routinely do the same thing, here and in other cases
>> (e.g. links in Compilation buffers). But I suppose this is outside of
>> scope for this discussion.
>
> Yeah, the mouse thing is pretty confusing, but the
> `mouse-1-click-follows-link' variable can be set to change the
> behaviour.
All right.
And I guess (setq mouse-1-click-follows-link nil) can be a solution for
the original complaint here.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Sun, 31 Jan 2021 07:28:02 GMT)
Full text and
rfc822 format available.
Message #42 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Dmitry Gutov <dgutov <at> yandex.ru> writes:
> We can change that, but how? Extend highlighting to the asterisk
> column? On all lines, whether the asterisk is there or not?
Yes, I think that would be a pretty consistent interface, so that you
can click the "*" off and on as you wish.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#13692
; Package
emacs
.
(Mon, 23 Aug 2021 14:13:01 GMT)
Full text and
rfc822 format available.
Message #45 received at 13692 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>
>> We can change that, but how? Extend highlighting to the asterisk
>> column? On all lines, whether the asterisk is there or not?
>
> Yes, I think that would be a pretty consistent interface, so that you
> can click the "*" off and on as you wish.
Actually, playing with this a bit more, I think the way it works now
makes sense. Having the leading space be a button is confusing -- you
don't expect that clicking on space should do anything. So just having
the status column clickable is best.
So I think your changes here were sufficient, and I'm closing this bug
report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug marked as fixed in version 28.1, send any further explanations to
13692 <at> debbugs.gnu.org and Glenn Morris <rgm <at> gnu.org>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Mon, 23 Aug 2021 14:13:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 21 Sep 2021 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.