GNU bug report logs - #16196
24.3.50; Disable ding when scrolling

Previous Next

Package: emacs;

Reported by: Jan Djärv <jan.h.d <at> swipnet.se>

Date: Fri, 20 Dec 2013 06:10:02 UTC

Severity: minor

Tags: patch

Found in version 24.3.50

Fixed in version 27.1

Done: Stefan Kangas <stefan <at> marxist.se>

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 16196 in the body.
You can then email your comments to 16196 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#16196; Package emacs. (Fri, 20 Dec 2013 06:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jan Djärv <jan.h.d <at> swipnet.se>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 20 Dec 2013 06:10:03 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 07:08:37 +0100
Hello.

When using a laptop with a trackpad, or a separate trackpad, scrolling in Emacs is annoying.
The reason is that with a trackpad you "fling" the scrollbar up or down, with low precision.  Trackbar scrolling isn't designed to be done with the seame precision as with a scrollbar.
That means when Emacs hits top or bottom, it beeps a lot.  If you have visual bell on, it blinks a lot.
That is because Emacs beeps when you try to scroll up/down and you already are at the top/bottom.
The same applies for scrolling left/right.

I think Emacs should by default not beep at all when scrolling and no movement can be done.  It should just ignore it and do nothing, like most applications do.  At the very least there should be an option to turn off scrollrelated beeping.

	Jan D.


In GNU Emacs 24.3.50.1 (x86_64-apple-darwin13.0.0, NS apple-appkit-1265.00)
of 2013-11-20 on zeplin
Bzr revision: 115162 jan.h.d <at> swipnet.se-20131120183312-4v1zvxtg5vf1ez60
Windowing system distributor `Apple', version 10.3.1265
Configured using:
`configure --verbose --with-ns CFLAGS=-g3'

Important settings:
  value of $LC_COLLATE: C
  value of $LANG: sv_SE.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<escape> x r e p o r t - e m <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process cocoa ns
multi-tty emacs)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 08:57:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 16196 <at> debbugs.gnu.org
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 10:56:18 +0200
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Fri, 20 Dec 2013 07:08:37 +0100
> 
> I think Emacs should by default not beep at all when scrolling and no movement can be done.

This could be hard to implement.  Most scrolling commands just examine
the text around point, and set the window-start for the next
redisplay, so they don't really know when no movement can be done.
Thus, the exact conditions for bitching "End of buffer" are not at all
what you could imagine, and not easily correlated with the situation
you describe.  For example, the next-line and previous-line commands
signal these errors when they find they are unable to scroll text,
something that might be utterly unrelated to hitting end of buffer.

> It should just ignore it and do nothing, like most applications do.

Well, "do nothing" is something Emacs cannot easily do in this case,
since the part that "does nothing" is redisplay, which has no idea
about the scrolling command that just ran.

>  At the very least there should be an option to turn off scrollrelated beeping.

This should be much easier to implement, although you may be surprised
to see in how many places we throw that particular error.  (Hint: grep
the Lisp sources for "'end-of-file".)

Patches are welcome, as usual.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 10:27:02 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 11:26:18 +0100
Hello. 

20 dec 2013 kl. 09:56 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>> Date: Fri, 20 Dec 2013 07:08:37 +0100
>> 
>> I think Emacs should by default not beep at all when scrolling and no movement can be done.
> 
> This could be hard to implement.  Most scrolling commands just examine
> the text around point, and set the window-start for the next
> redisplay, so they don't really know when no movement can be done.
> Thus, the exact conditions for bitching "End of buffer" are not at all
> what you could imagine, and not easily correlated with the situation
> you describe.  For example, the next-line and previous-line commands
> signal these errors when they find they are unable to scroll text,
> something that might be utterly unrelated to hitting end of buffer.

I have in my .emacs:

(setq mwheel-scroll-up-function
     '(lambda (amt)
        (if (< (window-end) (point-max)) (scroll-up amt))))

(setq mwheel-scroll-down-function
     '(lambda (amt)
        (if (> (window-start) (point-min)) (scroll-down amt))))

This does what this bug report talks about, except in the horizontal direction. So it can't be that hard. 

       Jan D. 

> 
>> It should just ignore it and do nothing, like most applications do.
> 
> Well, "do nothing" is something Emacs cannot easily do in this case,
> since the part that "does nothing" is redisplay, which has no idea
> about the scrolling command that just ran.
> 
>> At the very least there should be an option to turn off scrollrelated beeping.
> 
> This should be much easier to implement, although you may be surprised
> to see in how many places we throw that particular error.  (Hint: grep
> the Lisp sources for "'end-of-file".)
> 
> Patches are welcome, as usual.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 10:33:01 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 11:32:40 +0100
Hello. 

> 20 dec 2013 kl. 11:26 skrev Jan Djärv <jan.h.d <at> swipnet.se>:
> 
> Hello. 
> 
> 20 dec 2013 kl. 09:56 skrev Eli Zaretskii <eliz <at> gnu.org>:
> 
>>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>>> Date: Fri, 20 Dec 2013 07:08:37 +0100
>>> 
>>> I think Emacs should by default not beep at all when scrolling and no movement can be done.
>> 
>> This could be hard to implement.  Most scrolling commands just examine
>> the text around point, and set the window-start for the next
>> redisplay, so they don't really know when no movement can be done.
>> Thus, the exact conditions for bitching "End of buffer" are not at all
>> what you could imagine, and not easily correlated with the situation
>> you describe.  For example, the next-line and previous-line commands
>> signal these errors when they find they are unable to scroll text,
>> something that might be utterly unrelated to hitting end of buffer.
> 
> I have in my .emacs:
> 
> (setq mwheel-scroll-up-function
>     '(lambda (amt)
>        (if (< (window-end) (point-max)) (scroll-up amt))))
> 
> (setq mwheel-scroll-down-function
>     '(lambda (amt)
>        (if (> (window-start) (point-min)) (scroll-down amt))))
> 
> This does what this bug report talks about, except in the horizontal direction. So it can't be that hard. 

On the C level I think it is a matter of not calling xsignal0 in window_scroll_(line|pixel)_based in window.c. 

    Jan D. 

> 
>> 
>>> It should just ignore it and do nothing, like most applications do.
>> 
>> Well, "do nothing" is something Emacs cannot easily do in this case,
>> since the part that "does nothing" is redisplay, which has no idea
>> about the scrolling command that just ran.
>> 
>>> At the very least there should be an option to turn off scrollrelated beeping.
>> 
>> This should be much easier to implement, although you may be surprised
>> to see in how many places we throw that particular error.  (Hint: grep
>> the Lisp sources for "'end-of-file".)
>> 
>> Patches are welcome, as usual.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 10:43:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 16196 <at> debbugs.gnu.org
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 12:43:09 +0200
> Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Fri, 20 Dec 2013 11:26:18 +0100
> 
> (setq mwheel-scroll-up-function
>      '(lambda (amt)
>         (if (< (window-end) (point-max)) (scroll-up amt))))
> 
> (setq mwheel-scroll-down-function
>      '(lambda (amt)
>         (if (> (window-start) (point-min)) (scroll-down amt))))
> 
> This does what this bug report talks about, except in the horizontal direction. So it can't be that hard. 

Did you try that when the beginning or the end of the buffer is a
large image, or a line with a font so large it doesn't fit in the
window?

In any case, if the issue is limited to wheel scrolling, it might
indeed be simpler.  I thought you were suggesting to disable the error
for any type of scrolling, not just by the mouse wheel.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 10:49:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 16196 <at> debbugs.gnu.org
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 12:48:32 +0200
> Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Fri, 20 Dec 2013 11:32:40 +0100
> 
> On the C level I think it is a matter of not calling xsignal0 in window_scroll_(line|pixel)_based in window.c. 

Depends on the scope of the proposed change, as I wrote earlier.
Grep lisp/*.el for "(signal .* 'end-of-buffer" to see how many places
throw this error.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 17:53:01 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16196 <at> debbugs.gnu.org
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 18:52:27 +0100
Hello.

20 dec 2013 kl. 11:48 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>
>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>> Date: Fri, 20 Dec 2013 11:32:40 +0100
>> 
>> On the C level I think it is a matter of not calling xsignal0 in window_scroll_(line|pixel)_based in window.c. 
> 
> Depends on the scope of the proposed change, as I wrote earlier.
> Grep lisp/*.el for "(signal .* 'end-of-buffer" to see how many places
> throw this error.

11 hits, 6 in simple.el.  17/10 if we include beginning-of-buffer.  About half is kill-related and does not involve scrolling.  Does not sound many to me.

But I would settle for no beep for WHEEL events.  I'd prefer no beep at all though.

	Jan D.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 18:12:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 16196 <at> debbugs.gnu.org
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 20:10:57 +0200
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Fri, 20 Dec 2013 18:52:27 +0100
> Cc: 16196 <at> debbugs.gnu.org
> 
> 11 hits, 6 in simple.el.  17/10 if we include beginning-of-buffer.  About half is kill-related and does not involve scrolling.  Does not sound many to me.

There are a couple in C as well.  But the main problem would be to
understand which ones belong to what use cases.

> But I would settle for no beep for WHEEL events.  I'd prefer no beep at all though.

What, never?  Not even if you hit the beginning or end by moving
cursor or by C-v/M-v?  That'd be a serious change of behavior, so it
should be discussed and/or users polled before we do that, I think.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 18:50:02 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16196 <at> debbugs.gnu.org
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 19:48:57 +0100
Hello.

20 dec 2013 kl. 19:10 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>> Date: Fri, 20 Dec 2013 18:52:27 +0100
>> Cc: 16196 <at> debbugs.gnu.org
>> 
>> 11 hits, 6 in simple.el.  17/10 if we include beginning-of-buffer.  About half is kill-related and does not involve scrolling.  Does not sound many to me.
> 
> There are a couple in C as well.  But the main problem would be to
> understand which ones belong to what use cases.
> 
>> But I would settle for no beep for WHEEL events.  I'd prefer no beep at all though.
> 
> What, never?  Not even if you hit the beginning or end by moving
> cursor or by C-v/M-v?

Yes never.  I always though the beeping to be a bit out of this world:

"Where do you want to be?"
"At the end of the buffer."
"You are at the end of the buffer."
"Fine!"
"Not at all, it is an error to be where you want to be."
"??"


>  That'd be a serious change of behavior, so it
> should be discussed and/or users polled before we do that, I think.

Best make it an option then.  Does not require polling.

	Jan D.






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 20 Dec 2013 20:36:01 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 16196 <at> debbugs.gnu.org
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 20 Dec 2013 22:35:22 +0200
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Fri, 20 Dec 2013 19:48:57 +0100
> Cc: 16196 <at> debbugs.gnu.org
> 
> >  That'd be a serious change of behavior, so it
> > should be discussed and/or users polled before we do that, I think.
> 
> Best make it an option then.  Does not require polling.

I don't think an option will raise any objections.  Patches welcome.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 23 Dec 2013 02:47:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16196 <at> debbugs.gnu.org, Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sun, 22 Dec 2013 21:46:02 -0500
>> >  That'd be a serious change of behavior, so it
>> > should be discussed and/or users polled before we do that, I think.
>> Best make it an option then.  Does not require polling.
> I don't think an option will raise any objections.  Patches welcome.

Can be seen as a generalization of scroll-error-top-bottom.

I'm not opposed to such an option, but I'm not convinced that changing
the default behavior is a good idea: the general design of Emacs is that
we strive to make every command perform *something*, so when the user's
request ends up doing nothing, we signal an error to make it clear that
Emacs did obey the request.  Otherwise the lack of feedback can make the
user feel like Emacs is unresponsive.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 23 Dec 2013 10:45:02 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 16196 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 23 Dec 2013 11:44:52 +0100
Hello.

23 dec 2013 kl. 03:46 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:

>>>> That'd be a serious change of behavior, so it
>>>> should be discussed and/or users polled before we do that, I think.
>>> Best make it an option then.  Does not require polling.
>> I don't think an option will raise any objections.  Patches welcome.
> 
> Can be seen as a generalization of scroll-error-top-bottom.
> 
> I'm not opposed to such an option, but I'm not convinced that changing
> the default behavior is a good idea: the general design of Emacs is that
> we strive to make every command perform *something*, so when the user's
> request ends up doing nothing, we signal an error to make it clear that
> Emacs did obey the request.  Otherwise the lack of feedback can make the
> user feel like Emacs is unresponsive.

The main use case here is "flinging" with a trackpad.  In that case, Emacs already responds by scrolling up/down to the top/bottom.  It is after Emacs has hit top/bottom that the "extra" beeps occur.

If already at the top/bottom, the normal thing for OSX apps is to "bounce" a bit to show that the display is already at the top/bottom.  If at the top, the whole page is moved a bit downwards and then bounces back.  This is not common in X, so not really appropriate for Emacs.

	Jan D.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 03 Jan 2014 22:58:02 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 16196 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 03 Jan 2014 17:57:22 -0500
>> I'm not opposed to such an option, but I'm not convinced that changing
>> the default behavior is a good idea: the general design of Emacs is that
>> we strive to make every command perform *something*, so when the user's
>> request ends up doing nothing, we signal an error to make it clear that
>> Emacs did obey the request.  Otherwise the lack of feedback can make the
>> user feel like Emacs is unresponsive.
> The main use case here is "flinging" with a trackpad.  In that case, Emacs
> already responds by scrolling up/down to the top/bottom.  It is after Emacs
> has hit top/bottom that the "extra" beeps occur.

But if you're at EOB and you scroll with the wheel to try and go "even
further", if Emacs doesn't (ding), then it does nothing: lack of feedback.

> If already at the top/bottom, the normal thing for OSX apps is to
> "bounce" a bit to show that the display is already at the top/bottom.  If at
> the top, the whole page is moved a bit downwards and then bounces back.
> This is not common in X, so not really appropriate for Emacs.

Right, instead we (ding).


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 03 Jan 2014 23:47:02 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 4 Jan 2014 00:46:32 +0100
Hello. 

3 jan 2014 kl. 23:57 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:

>>> I'm not opposed to such an option, but I'm not convinced that changing
>>> the default behavior is a good idea: the general design of Emacs is that
>>> we strive to make every command perform *something*, so when the user's
>>> request ends up doing nothing, we signal an error to make it clear that
>>> Emacs did obey the request.  Otherwise the lack of feedback can make the
>>> user feel like Emacs is unresponsive.
>> The main use case here is "flinging" with a trackpad.  In that case, Emacs
>> already responds by scrolling up/down to the top/bottom.  It is after Emacs
>> has hit top/bottom that the "extra" beeps occur.
> 
> But if you're at EOB and you scroll with the wheel to try and go "even
> further", if Emacs doesn't (ding), then it does nothing: lack of feedback.
> 

Which is useless IMHO. Ding implies an error, this isn't one. I want to be at EOB and I am at EOB.

>> If already at the top/bottom, the normal thing for OSX apps is to
>> "bounce" a bit to show that the display is already at the top/bottom.  If at
>> the top, the whole page is moved a bit downwards and then bounces back.
>> This is not common in X, so not really appropriate for Emacs.
> 
> Right, instead we (ding).

If it was only one ding, one might be able to stand it even if it is just annoying and gives no value whatsoever. But with flinging the beeping goes on for several seconds, depending on the force of the fling. 

I rather have a silent lack of feedback than a lot of beeping. 

    Jan D. 



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 04 Jan 2014 00:04:01 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Jan Djärv <jan.h.d <at> swipnet.se>, Stefan Monnier
 <monnier <at> iro.umontreal.ca>
Cc: 16196 <at> debbugs.gnu.org
Subject: RE: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 3 Jan 2014 16:03:13 -0800 (PST)
> Ding implies an error

No, it does not.  Read its doc.

And read about particular uses of it, in the Elisp manual.  Each
explicit mention of a use makes clear that it is NOT about signaling
an error.

Node `Key Lookup':

  "it rings the bell (by calling `ding') but does not signal an error."
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Node `Functions for Key Lookup':

  "It calls `ding', but does not cause an error."
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^

Node `Beeping' tells you clearly what `ding' *is* for:

  "to attract the user's attention."

It also makes clear that one does not want to overuse it: attracting
the user's attention too much defeats the purpose and can be annoying.

> I rather have a silent lack of feedback than a lot of beeping.

Bind `ring-bell-function' wherever you like to whatever you like,
including to `ignore'.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 04 Jan 2014 05:08:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 04 Jan 2014 00:07:11 -0500
>> But if you're at EOB and you scroll with the wheel to try and go "even
>> further", if Emacs doesn't (ding), then it does nothing: lack of feedback.

> Which is useless IMHO.  Ding implies an error, this isn't one.  I want
> to be at EOB and I am at EOB.

Useless or not, the point is: without (ding) this would make the command
do absolutely nothing, which is contrary to the principle that Emacs
should try to provide some feedback in response to each command.

> I rather have a silent lack of feedback than a lot of beeping. 

If you use the audible bell, the beeping might indeed be a pain in the
ear (tho I can't really judge: I find the audible bell itself to be
unbearable so I've used the visual bell for as long as I can remember).

So the question is: which kind of feedback should we use instead?
I'd rather keep some kind of feedback.  Maybe a `message'?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 04 Jan 2014 07:27:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: 16196 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 04 Jan 2014 09:25:46 +0200
> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>  "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>
> From: Jan Djärv <jan.h.d <at> swipnet.se>
> Date: Sat, 4 Jan 2014 00:46:32 +0100
> 
> with flinging the beeping goes on for several seconds, depending on the force of the fling. 

Are you saying that ding is called several times in a row?  Perhaps we
could avoid this specific situation (we already have mechanism in
place for changing behavior when certain commands are invoked several
times in a row).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 04 Jan 2014 09:37:02 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16196 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 4 Jan 2014 10:36:27 +0100
Hello.

4 jan 2014 kl. 08:25 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> Cc: Eli Zaretskii <eliz <at> gnu.org>,
>> "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>
>> From: Jan Djärv <jan.h.d <at> swipnet.se>
>> Date: Sat, 4 Jan 2014 00:46:32 +0100
>> 
>> with flinging the beeping goes on for several seconds, depending on the force of the fling. 
> 
> Are you saying that ding is called several times in a row?  Perhaps we
> could avoid this specific situation (we already have mechanism in
> place for changing behavior when certain commands are invoked several
> times in a row).

Yes.  Here is C-h l after a normal fling.  Each wheel-down results in a beep:

<wheel-down> <double-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down>
<triple-wheel-down> C-h l

Maybe double and triple could be ignored?
Visual bell is worse in this use case than the beep, as each blink takes longer time than a beep.

	Jan D.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 04 Jan 2014 09:41:03 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 4 Jan 2014 10:40:10 +0100
Hello.

4 jan 2014 kl. 06:07 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:

> 
>> I rather have a silent lack of feedback than a lot of beeping. 
> 
> If you use the audible bell, the beeping might indeed be a pain in the
> ear (tho I can't really judge: I find the audible bell itself to be
> unbearable so I've used the visual bell for as long as I can remember).

Visual bell is actually worse.  A beep is fast, a visual blink lasts longer, so the time blinking is longer than the time beeping.

> So the question is: which kind of feedback should we use instead?
> I'd rather keep some kind of feedback.  Maybe a `message'?

That sounds like a good idea.

	Jan D.
 



Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 04 Jan 2014 13:44:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 04 Jan 2014 14:43:00 +0100
> So the question is: which kind of feedback should we use instead?
> I'd rather keep some kind of feedback.  Maybe a `message'?

As we do already.  Just suppress the additional beep.

martin, sharing Jan's concerns




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 04 Jan 2014 20:41:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: martin rudalics <rudalics <at> gmx.at>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 04 Jan 2014 15:40:53 -0500
>> So the question is: which kind of feedback should we use instead?
>> I'd rather keep some kind of feedback.  Maybe a `message'?
> As we do already.

Indeed!  I didn't notice it because the (ding) drowns it out.

> Just suppress the additional beep.

Sounds OK.  Can someone provide a patch to mwheel.el?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 09 Aug 2019 07:56:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 martin rudalics <rudalics <at> gmx.at>,
 Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 9 Aug 2019 09:55:03 +0200
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> So the question is: which kind of feedback should we use instead?
>>> I'd rather keep some kind of feedback.  Maybe a `message'?
>> As we do already.
>
> Indeed!  I didn't notice it because the (ding) drowns it out.
>
>> Just suppress the additional beep.
>
> Sounds OK.  Can someone provide a patch to mwheel.el?

I took a stab at this.  The attached patch traps the beginning-of-buffer
and end-of-buffer errors and shows a message instead as suggested above.

To make it easier to review, I've also included a git diff
ignoring whitespace changes.

What do you think?

Best regards,
Stefan Kangas
[0001-Make-mouse-scroll-show-a-message-instead-of-dinging-.patch (application/octet-stream, attachment)]
[bug-16196-no-ws.diff (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 09 Aug 2019 08:59:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Jan Djärv <jan.h.d <at> swipnet.se>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 09 Aug 2019 11:57:58 +0300
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefan <at> marxist.se> writes:

> To make it easier to review, I've also included a git diff
> ignoring whitespace changes.

FWIW, you can slightly reduce the amount of code that needs reindenting
by binding saw-error in the existing let* form:

[mwheel.diff (text/x-diff, inline)]
diff --git a/lisp/mwheel.el b/lisp/mwheel.el
index dfea55374b..6403c57236 100644
--- a/lisp/mwheel.el
+++ b/lisp/mwheel.el
@@ -237,7 +237,8 @@ mwheel-scroll
 	       (window-point)))
          (mods
 	  (delq 'click (delq 'double (delq 'triple (event-modifiers event)))))
-         (amt (assoc mods mouse-wheel-scroll-amount)))
+         (amt (assoc mods mouse-wheel-scroll-amount))
+         saw-error)
     (unless (eq scroll-window selected-window)
       ;; Mark window to be scrolled for redisplay.
       (select-window scroll-window 'mark-for-redisplay))
@@ -251,6 +252,7 @@ mwheel-scroll
       ;; So by adding things up we get a squaring up (1, 3, 6, 10, 15, ...).
       (setq amt (* amt (event-click-count event))))
     (when (numberp amt) (setq amt (* amt (event-line-count event))))
+    (condition-case nil
         (unwind-protect
 	    (let ((button (mwheel-event-button event)))
 	      (cond ((eq button mouse-wheel-down-event)
@@ -293,15 +295,21 @@ mwheel-scroll
 	          (goto-char old-point)
 	          (deactivate-mark)
 	          (goto-char new-point)))
-	(select-window selected-window t))))
+            (select-window selected-window t)))
+      ;; Do not ding at buffer limits.  Show a message instead.
+      (beginning-of-buffer (message "Beginning of buffer")
+                           (setq saw-error t))
+      (end-of-buffer (message "End of buffer")
+                     (setq saw-error t)))
 
-  (when (and mouse-wheel-click-event mouse-wheel-inhibit-click-time)
-    (if mwheel-inhibit-click-event-timer
+    (when (and (not saw-error)
+               mouse-wheel-click-event mouse-wheel-inhibit-click-time)
+      (if mwheel-inhibit-click-event-timerp
 	  (cancel-timer mwheel-inhibit-click-event-timer)
         (add-hook 'pre-command-hook 'mwheel-filter-click-events))
       (setq mwheel-inhibit-click-event-timer
 	    (run-with-timer mouse-wheel-inhibit-click-time nil
-			  'mwheel-inhibit-click-timeout))))
+                            'mwheel-inhibit-click-timeout)))))
 
 (put 'mwheel-scroll 'scroll-command t)
 
[Message part 3 (text/plain, inline)]
Thanks,

-- 
Basil

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 09 Aug 2019 09:01:01 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Kangas <stefan <at> marxist.se>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Jan Djärv <jan.h.d <at> swipnet.se>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 9 Aug 2019 11:00:28 +0200
> I took a stab at this.  The attached patch traps the beginning-of-buffer
> and end-of-buffer errors and shows a message instead as suggested above.

Thanks.

> To make it easier to review, I've also included a git diff
> ignoring whitespace changes.

This one doesn't apply here.

> What do you think?

AFAIAC it's an improvement.  But personally, I'd drop the message as
well.  Does anyone really need it?

martin




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 10 Aug 2019 18:08:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Jan Djärv <jan.h.d <at> swipnet.se>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 10 Aug 2019 20:07:29 +0200
Basil L. Contovounesios <contovob <at> tcd.ie> writes:
> FWIW, you can slightly reduce the amount of code that needs reindenting
> by binding saw-error in the existing let* form:

Sure, I could've done that, but I was worried that moving the final sexp in that
defun into the let* form would cause a regression.  It might have been left
outside for a purpose.  (Or it could just be that it didn't need to be in the
let* form before.)

Are you saying that you know that it's safe to move it?

Thanks,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sat, 10 Aug 2019 18:25:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: martin rudalics <rudalics <at> gmx.at>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sat, 10 Aug 2019 20:23:43 +0200
martin rudalics <rudalics <at> gmx.at> writes:

>  > To make it easier to review, I've also included a git diff
>  > ignoring whitespace changes.
>
> This one doesn't apply here.

Sorry, I should've been more clear.  This is the same as the patch but
without the whitespace changes.  Please try applying the patch
instead.  Thanks.

>  > What do you think?
>
> AFAIAC it's an improvement.  But personally, I'd drop the message as
> well.  Does anyone really need it?

I'm personally prone to agree with you, but the reasoning in the previous
discussion in this thread seems to be that we do want it.  Or at least
something similar.

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> the general design of Emacs is that
> we strive to make every command perform *something*, so when the user's
> request ends up doing nothing, we signal an error to make it clear that
> Emacs did obey the request.  Otherwise the lack of feedback can make the
> user feel like Emacs is unresponsive.

And later:

> I'd rather keep some kind of feedback.  Maybe a `message'?

Personally, I think the scrolling itself is enough feedback.  It
either scrolls or it doesn't.  That's what happens in many other
programs, for example in Firefox.  And scroll-bar-mode is enabled by
default.

But I think my opinion on this carries less weight than Stefan
Monnier's.  :-)

Thanks,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sun, 11 Aug 2019 08:19:02 GMT) Full text and rfc822 format available.

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

From: martin rudalics <rudalics <at> gmx.at>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sun, 11 Aug 2019 10:17:42 +0200
>>   > To make it easier to review, I've also included a git diff
>>   > ignoring whitespace changes.
>>
>> This one doesn't apply here.
>
> Sorry, I should've been more clear.  This is the same as the patch but
> without the whitespace changes.  Please try applying the patch
> instead.  Thanks.

I obviously did that (otherwise I would have complained about the
patch in the first place) ;-)

>> AFAIAC it's an improvement.  But personally, I'd drop the message as
>> well.  Does anyone really need it?
>
> I'm personally prone to agree with you, but the reasoning in the previous
> discussion in this thread seems to be that we do want it.  Or at least
> something similar.
>
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>
>> the general design of Emacs is that
>> we strive to make every command perform *something*, so when the user's
>> request ends up doing nothing, we signal an error to make it clear that
>> Emacs did obey the request.  Otherwise the lack of feedback can make the
>> user feel like Emacs is unresponsive.
>
> And later:
>
>> I'd rather keep some kind of feedback.  Maybe a `message'?
>
> Personally, I think the scrolling itself is enough feedback.  It
> either scrolls or it doesn't.  That's what happens in many other
> programs, for example in Firefox.  And scroll-bar-mode is enabled by
> default.
>
> But I think my opinion on this carries less weight than Stefan
> Monnier's.  :-)

My current *Messages* buffer is listed below.  I never look at it
because it just doesn't make sense.

Thanks anyway for your efforts to remove the beeps, martin


Loading paren...done
Mark set [4 times]
next-line: End of buffer [5 times]
Mark set
next-line: End of buffer
Mark set [5 times]
nil
Mark set
user-error: Beginning of history; no preceding item
user-error: End of history; no default available [2 times]
Quit [2 times]
C-M-: is undefined
nil
Mark set [2 times]
previous-line: Beginning of buffer [2 times]
Mark set
next-line: End of buffer [2 times]
Auto-saving...done
previous-line: Beginning of buffer [2 times]
Mark set
previous-line: Beginning of buffer [5 times]
Mark set
nil
previous-line: Beginning of buffer [5 times]
Mark set
next-line: End of buffer
No undo information
Mark set
next-line: End of buffer [4 times]
Mark set [3 times]
next-line: End of buffer [5 times]
Mark set
next-line: End of buffer
Mark set [4 times]
Auto-saving...done
Mark set [6 times]
Creating customization items...
Creating customization items ...done
Creating customization setup...done
Mark set
Undo
user-error: No further undo information [15 times]
Mark set [4 times]
next-line: End of buffer [3 times]
Mark set
next-line: End of buffer
Mark set
next-line: End of buffer
Mark set [3 times]
next-line: End of buffer
if: End of buffer [7 times]
Mark set [11 times]
next-line: End of buffer [4 times]
Undo [4 times]
Mark set [9 times]
next-line: End of buffer [4 times]
Mark set [9 times]
next-line: End of buffer [3 times]
Scanning for dabbrevs...done
Expansion found in ‘ *sidebar*’
Mark set [4 times]





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Sun, 11 Aug 2019 14:29:02 GMT) Full text and rfc822 format available.

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

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Jan Djärv <jan.h.d <at> swipnet.se>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Sun, 11 Aug 2019 17:28:17 +0300
Stefan Kangas <stefan <at> marxist.se> writes:

> Basil L. Contovounesios <contovob <at> tcd.ie> writes:
>> FWIW, you can slightly reduce the amount of code that needs reindenting
>> by binding saw-error in the existing let* form:
>
> Sure, I could've done that, but I was worried that moving the final sexp in that
> defun into the let* form would cause a regression.  It might have been left
> outside for a purpose.  (Or it could just be that it didn't need to be in the
> let* form before.)

It looks like the latter:

Avoid accidental yanking of text while scrolling with the mouse wheel.
d09696f73f 2002-11-28 23:03:30 +0000
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d09696f73f17c4ae0bf09e8c72ef7f427f07d31b

> Are you saying that you know that it's safe to move it?

Inasmuch as I can "know" something about a code fragment from just
looking at it, yes.  Note that this does not mean I am urging you to
move it; I merely suggested it as a stylistic alternative or tip,
"FWIW".

Thanks,

-- 
Basil




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 12 Aug 2019 00:53:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Jan Djärv <jan.h.d <at> swipnet.se>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 12 Aug 2019 02:52:16 +0200
[Message part 1 (text/plain, inline)]
Basil L. Contovounesios <contovob <at> tcd.ie> writes:

> > Sure, I could've done that, but I was worried that moving the final sexp in that
> > defun into the let* form would cause a regression.  It might have been left
> > outside for a purpose.  (Or it could just be that it didn't need to be in the
> > let* form before.)
>
> It looks like the latter:
>
> Avoid accidental yanking of text while scrolling with the mouse wheel.
> d09696f73f 2002-11-28 23:03:30 +0000
> https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=d09696f73f17c4ae0bf09e8c72ef7f427f07d31b
>
> > Are you saying that you know that it's safe to move it?
>
> Inasmuch as I can "know" something about a code fragment from just
> looking at it, yes.  Note that this does not mean I am urging you to
> move it; I merely suggested it as a stylistic alternative or tip,
> "FWIW".

Thanks, I appreciate the help.  I agree that it's a good idea, and it
seems to work fine here.  Please find attached an updated patch with
that change included.

Best regards,
Stefan Kangas
[0001-Make-mouse-scroll-show-a-message-instead-of-dinging-.patch (application/octet-stream, attachment)]

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2019 04:21:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 30 Sep 2019 13:27:01 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: "Basil L. Contovounesios" <contovob <at> tcd.ie>
Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 30 Sep 2019 15:26:20 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

>  Please find attached an updated patch

No comments in over a month.  Any objections to applying this patch?

Besides indentation changes, this comes down to adding a new variable
saw-error and:

(condition-case nil
   ...
  ;; Do not ding at buffer limits.  Show a message instead.
  (beginning-of-buffer (message "Beginning of buffer")
                       (setq saw-error t))
  (end-of-buffer (message "End of buffer")
                 (setq saw-error t)))

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 30 Sep 2019 13:57:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: contovob <at> tcd.ie, 16196 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 30 Sep 2019 16:55:52 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Mon, 30 Sep 2019 15:26:20 +0200
> Cc: "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
>  Stefan Monnier <monnier <at> iro.umontreal.ca>
> 
> Stefan Kangas <stefan <at> marxist.se> writes:
> 
> >  Please find attached an updated patch
> 
> No comments in over a month.  Any objections to applying this patch?

Not here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 30 Sep 2019 14:04:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 30 Sep 2019 16:03:19 +0200
>>>>> On Mon, 30 Sep 2019 15:26:20 +0200, Stefan Kangas <stefan <at> marxist.se> said:

    Stefan> Stefan Kangas <stefan <at> marxist.se> writes:
    >> Please find attached an updated patch

    Stefan> No comments in over a month.  Any objections to applying this patch?

    Stefan> Besides indentation changes, this comes down to adding a new variable
    Stefan> saw-error and:

    Stefan> (condition-case nil
    Stefan>    ...
    Stefan>   ;; Do not ding at buffer limits.  Show a message instead.
    Stefan>   (beginning-of-buffer (message "Beginning of buffer")
    Stefan>                        (setq saw-error t))
    Stefan>   (end-of-buffer (message "End of buffer")
    Stefan>                  (setq saw-error t)))

How about using

(error-message-string '(beginning-of-buffer nil))

so that the error string remains in sync with src/data.c?

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 30 Sep 2019 14:12:01 GMT) Full text and rfc822 format available.

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

From: Robert Pluim <rpluim <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 30 Sep 2019 16:11:02 +0200
>>>>> On Mon, 30 Sep 2019 16:03:19 +0200, Robert Pluim <rpluim <at> gmail.com> said:

>>>>> On Mon, 30 Sep 2019 15:26:20 +0200, Stefan Kangas <stefan <at> marxist.se> said:
    Stefan> Stefan Kangas <stefan <at> marxist.se> writes:
    >>> Please find attached an updated patch

    Stefan> No comments in over a month.  Any objections to applying this patch?

    Stefan> Besides indentation changes, this comes down to adding a new variable
    Stefan> saw-error and:

    Stefan> (condition-case nil
    Stefan> ...
    Stefan> ;; Do not ding at buffer limits.  Show a message instead.
    Stefan> (beginning-of-buffer (message "Beginning of buffer")
    Stefan> (setq saw-error t))
    Stefan> (end-of-buffer (message "End of buffer")
    Stefan> (setq saw-error t)))

    Robert> How about using

    Robert> (error-message-string '(beginning-of-buffer nil))

    Robert> so that the error string remains in sync with src/data.c?

Make that:

(error-message-string '(beginning-of-buffer))

Robert




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 30 Sep 2019 14:20:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 30 Sep 2019 16:19:20 +0200
Robert Pluim <rpluim <at> gmail.com> writes:

>     Robert> How about using
>     Robert> (error-message-string '(beginning-of-buffer nil))
>     Robert> so that the error string remains in sync with src/data.c?
>
> Make that:
>
> (error-message-string '(beginning-of-buffer))

Yup, sounds good to me.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Mon, 30 Sep 2019 21:52:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Mon, 30 Sep 2019 23:51:36 +0200
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefan <at> marxist.se> writes:

> >     Robert> How about using
> >     Robert> (error-message-string '(beginning-of-buffer nil))
> >     Robert> so that the error string remains in sync with src/data.c?
> >
> > Make that:
> >
> > (error-message-string '(beginning-of-buffer))
>
> Yup, sounds good to me.

Fixed in the attached patch.  If there are no objections, I intend to
commit this in a couple of days.

Best regards,
Stefan Kangas
[0001-Make-mouse-scroll-show-a-message-instead-of-dinging-.patch (application/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#16196; Package emacs. (Fri, 04 Oct 2019 16:12:02 GMT) Full text and rfc822 format available.

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

From: Stefan Kangas <stefan <at> marxist.se>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: "Basil L. Contovounesios" <contovob <at> tcd.ie>,
 "16196 <at> debbugs.gnu.org" <16196 <at> debbugs.gnu.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#16196: 24.3.50; Disable ding when scrolling
Date: Fri, 4 Oct 2019 18:11:11 +0200
close 16196 27.1
quit

Stefan Kangas <stefan <at> marxist.se> writes:
> If there are no objections, I intend to commit this in a couple of days.

Now pushed as commit be27f02bcf.  Thanks to all for the reviews and comments.

Best regards,
Stefan Kangas




bug marked as fixed in version 27.1, send any further explanations to 16196 <at> debbugs.gnu.org and Jan Djärv <jan.h.d <at> swipnet.se> Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Fri, 04 Oct 2019 16:12: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. (Sat, 02 Nov 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 169 days ago.

Previous Next


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