* bug#4023: mwheel.el uses (point) instead of point-before-scroll
@ 2009-12-05 2:46 Chong Yidong
2009-12-05 21:06 ` Glenn Morris
0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2009-12-05 2:46 UTC (permalink / raw)
To: Glenn Morris, gabriele balducci; +Cc: 4023
> Just upgraded emacs to 23.1 and noted the following issue, related
> (apparently) to mwheel.el.
>
> Here is how to (hopefully) reproduce the problem.
>
> In an emacs window (under X):
>
> => set the point with mouse-1
> => select a region with mouse-3 some lines below
> => now scroll down with the mouse wheel so that the bottom of the
> selected region scrolls `out' of the upper edge of the emacs window
> (the highlighted region must disappear)
> => extend the region by mouse-3 again
> => paste the region with mouse-2 somewhere (e.g. in a clean buffer)
>
> Result:
> only the text between the *visible* top of the window and the end of
> the region has been pasted. I.e. all works as if the beginning of
> the selected region had moved the first line of the visible portion
> of the buffer.
>
> This contrasts with the behavior in emacs-22.3, where extending the
> region while scrolling down with the wheel used to work as expected
> (by me): the contents of the region started from the point set with
> mouse-1 at the beginning.
>
> The (correct) behavior in 23.1 is obtained if scrolling is performed
> with the side bar, instead of the wheel (and also if the scroll with
> the wheel does not make the bottom of the region fly out of the upper
> window edge)
This change was made in response to a complaint by Glenn Morris, about
the behavior you desire:
http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg00409.html
Double-click with left mouse to select the word "tree" from "This
directory tree...". The word "tree" is highlighted with region face.
Scroll down with mouse-wheel so that "tree" goes off the top of the
screen.
Scroll back up with mouse-wheel.
Now the region has been extended to cover a lot more text. The further
I scroll down initially, the more is highlighted.
I have no preference for either behavior, because I don't use the mouse
wheel much. Either way, we should probably make the scrollbar and mouse
wheel behavior consistent, though.
Glenn, what do you think?
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4023: mwheel.el uses (point) instead of point-before-scroll
2009-12-05 2:46 bug#4023: mwheel.el uses (point) instead of point-before-scroll Chong Yidong
@ 2009-12-05 21:06 ` Glenn Morris
2009-12-09 11:42 ` gabriele balducci
0 siblings, 1 reply; 4+ messages in thread
From: Glenn Morris @ 2009-12-05 21:06 UTC (permalink / raw)
To: Chong Yidong; +Cc: 4023, gabriele balducci
Chong Yidong wrote:
> I have no preference for either behavior, because I don't use the mouse
> wheel much. Either way, we should probably make the scrollbar and mouse
> wheel behavior consistent, though.
Emacs 22.3 seems to make both me and the OP happy.
When transient-mark-mode is off, it does not have the issue I
complained about. When transient-mark-mode is on, it behaves the way
the OP wants. (So by default 22.3 does NOT behave the way the OP asks
for, AFAICS.)
I complained when the behaviour I disliked (and I do find it really
annoying) started happening even when t-m-m was off.
So is there a way to make us both happy, by getting the 22.3 behaviour
back? I don't care at all what the defaults are, so long as I can get
the behaviour I like somehow.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4023: mwheel.el uses (point) instead of point-before-scroll
2009-12-05 21:06 ` Glenn Morris
@ 2009-12-09 11:42 ` gabriele balducci
0 siblings, 0 replies; 4+ messages in thread
From: gabriele balducci @ 2009-12-09 11:42 UTC (permalink / raw)
To: rgm, cyd, 4023
Hi there
> > I have no preference for either behavior, because I don't use the mouse
> > wheel much. Either way, we should probably make the scrollbar and mouse
> > wheel behavior consistent, though.
I do not use the wheel very much too, but the occasions on which I use
it are just when I want to mark a wide region by scrolling!
Actually, I did not realize that someone might want to:
=> mark a (small) region
=> scroll down with the wheel
=> paste the region contents previously selected
and, of course, this is just the opposite of what I normally do!
>
> Emacs 22.3 seems to make both me and the OP happy.
>
> When transient-mark-mode is off, it does not have the issue I
> complained about. When transient-mark-mode is on, it behaves the way
> the OP wants. (So by default 22.3 does NOT behave the way the OP asks
> for, AFAICS.)
Actually, I used to raise transient-mark-mode on at emacs startup
>
> I complained when the behaviour I disliked (and I do find it really
> annoying) started happening even when t-m-m was off.
>
> So is there a way to make us both happy, by getting the 22.3 behaviour
> back? I don't care at all what the defaults are, so long as I can get
> the behaviour I like somehow.
Me too.
I am not a lisp/emacs developer, so do not know whether this might be a
good/feasible option: what about a t/nil configurable variable such as
wheel-scroll-extends-region?
thanks and ciao
gabriele
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#4023: mwheel.el uses (point) instead of point-before-scroll
@ 2009-08-03 16:26 gabriele balducci
0 siblings, 0 replies; 4+ messages in thread
From: gabriele balducci @ 2009-08-03 16:26 UTC (permalink / raw)
To: bug-gnu-emacs
Hello,
apologies if I am wrong.
Just upgraded emacs to 23.1 and noted the following issue, related
(apparently) to mwheel.el.
Here is how to (hopefully) reproduce the problem.
In an emacs window (under X):
=> set the point with mouse-1
=> select a region with mouse-3 some lines below
=> now scroll down with the mouse wheel so that the bottom of the
selected region scrolls `out' of the upper edge of the emacs window
(the highlighted region must disappear)
=> extend the region by mouse-3 again
=> paste the region with mouse-2 somewhere (e.g. in a clean buffer)
Result:
only the text between the *visible* top of the window and the end of
the region has been pasted. I.e. all works as if the beginning of
the selected region had moved the first line of the visible portion
of the buffer.
This contrasts with the behavior in emacs-22.3, where extending the
region while scrolling down with the wheel used to work as expected
(by me): the contents of the region started from the point set with
mouse-1 at the beginning.
The (correct) behavior in 23.1 is obtained if scrolling is performed
with the side bar, instead of the wheel (and also if the scroll with
the wheel does not make the bottom of the region fly out of the upper
window edge)
Actually, the following new lines have appeared in mwheel.el from 22.3
to 23.1:
(opoint (with-current-buffer buffer
(when (eq (car-safe transient-mark-mode) 'only)
(point))))
and I seem to understand that this is the origin of the problem.
In fact, the following change:
diff -c ./emacs-23.1/lisp/mwheel.el.ORIG ./emacs-23.1/lisp/mwheel.el
*** ./emacs-23.1/lisp/mwheel.el.ORIG Mon Aug 3 17:05:23 2009
--- ./emacs-23.1/lisp/mwheel.el Mon Aug 3 17:05:23 2009
***************
*** 195,201 ****
(buffer (window-buffer curwin))
(opoint (with-current-buffer buffer
(when (eq (car-safe transient-mark-mode) 'only)
! (point))))
(mods
(delq 'click (delq 'double (delq 'triple (event-modifiers event)))))
(amt (assoc mods mouse-wheel-scroll-amount)))
--- 195,201 ----
(buffer (window-buffer curwin))
(opoint (with-current-buffer buffer
(when (eq (car-safe transient-mark-mode) 'only)
! point-before-scroll)))
(mods
(delq 'click (delq 'double (delq 'triple (event-modifiers event)))))
(amt (assoc mods mouse-wheel-scroll-amount)))
fixes everything for me.
Do not know if this is the best solution (I am only an occasional lisp
programmer); I do not even know if the object of my report is actually
a problem or instead is something wanted (if so, I would be surprised).
Apologies for the length of the message and a BIG THANKS for emacs, of
course!
ciao
gabriele
-----
In GNU Emacs 23.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.17.6)
of 2009-08-03 on dschgrazlin1
Windowing system distributor `The XFree86 Project, Inc', version 11.0.40800000
configured using `configure '--prefix=/usr''
Important settings:
value of $LC_ALL: C
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: C
value of $XMODIFIERS: nil
locale-coding-system: nil
default-enable-multibyte-characters: t
Major mode: Text
Minor modes in effect:
show-paren-mode: t
tooltip-mode: t
tool-bar-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
global-auto-composition-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-09 11:42 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-05 2:46 bug#4023: mwheel.el uses (point) instead of point-before-scroll Chong Yidong
2009-12-05 21:06 ` Glenn Morris
2009-12-09 11:42 ` gabriele balducci
-- strict thread matches above, loose matches on Subject: below --
2009-08-03 16:26 gabriele balducci
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.