GNU bug report logs -
#18541
24.3; ruler-mode: margins are reset when doing next-buffer/previous-buffer
Previous Next
To reply to this bug, email your comments to 18541 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Tue, 23 Sep 2014 22:58:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Andrea Rossetti <andrea.rossetti <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Tue, 23 Sep 2014 22:58:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hello, I think I found a bug in ruler-mode,
here's a recipe for it. Start "emacs -Q" and type:
M-x ruler-mode RET
M-: (set-window-margins nil 10 10) RET
You will see left and right margins will narrow the
sides of *scratch* buffer. Now type
M-x next-buffer RET
M-x previous-buffer RET
and you will see that the margins have unexpectedly
disappeared, i.e. the *scratch* buffer is shown full-width
without margins.
May I please ask for a confirm of reproducibility at your side.
And also: does it seem like a bug for you too, or was it just
expected behaviour?
Thanks for your time and attention, kindest regards.
Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Wed, 24 Sep 2014 00:52:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 18541 <at> debbugs.gnu.org (full text, mbox):
> Hello, I think I found a bug in ruler-mode,
> here's a recipe for it. Start "emacs -Q" and type:
> M-x ruler-mode RET
> M-: (set-window-margins nil 10 10) RET
Setting margins with set-window-margins is a low-level operation.
Margins get re-set whenever the buffer displayed is changed.
IOW I think the behavior you describe with above recipe is not a bug.
But indeed, if you set the margin with S-mouse-1 or S-mouse-3 on the
header-line, then ruler-mode should arguably try to preserve this
setting like you request it.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Wed, 24 Sep 2014 22:15:04 GMT)
Full text and
rfc822 format available.
Message #11 received at 18541 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> But indeed, if you set the margin with S-mouse-1 or S-mouse-3 on the
> header-line, then ruler-mode should arguably try to preserve this
> setting like you request it.
Thanks for your reply Stefan.
Even if I set margins with S-mouse-1 and S-mouse-3, and then
type M-x next-buffer RET M-x previous-buffer RET , the margins
disappear.
It could indeed be a nice addition in the future if there's
some agreement. I can't think of a case where margin preservation
could be inappropriate (just a guess: maybe non-interactive sessions?).
My suggested alternative if one needs to jump around buffers while
keeping margins enabled in a certain buffer: I noticed that the "window
configuration registers" preserve margins properly:
- (... set margins with S-mouse-1 and S-mouse-3 ...)
- C-x r w a
- M-x next-buffer RET
- C-x r j a
Kindest regards,
Andrea
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Thu, 25 Sep 2014 01:11:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 18541 <at> debbugs.gnu.org (full text, mbox):
>> But indeed, if you set the margin with S-mouse-1 or S-mouse-3 on the
>> header-line, then ruler-mode should arguably try to preserve this
>> setting like you request it.
> Even if I set margins with S-mouse-1 and S-mouse-3, and then
> type M-x next-buffer RET M-x previous-buffer RET , the margins
> disappear.
Yes, that's what I meant, and this is the actual bug that needs fixing.
> It could indeed be a nice addition in the future if there's
> some agreement. I can't think of a case where margin preservation
> could be inappropriate (just a guess: maybe non-interactive sessions?).
There's no reason not to preserve the margin (other than the fact it's
not implemented). There are questions about *how* to do it, tho.
Mostly, should the margin set by the user be considered as a property of
the buffer (applied wherever the buffer gets displayed), or is it
a property that applies to this buffer but only in this particular window?
E.g. if I have the buffer in window 1 and then display it in window 2,
should window 2 get the same margins as well? What if window 2 has
a completely different width than window 1?
> My suggested alternative if one needs to jump around buffers while
> keeping margins enabled in a certain buffer: I noticed that the "window
> configuration registers" preserve margins properly:
> - (... set margins with S-mouse-1 and S-mouse-3 ...)
> - C-x r w a
> - M-x next-buffer RET
> - C-x r j a
Right, that can be a good workaround until ruler-mode does that for you,
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Thu, 19 Aug 2021 15:35:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 18541 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Mostly, should the margin set by the user be considered as a property of
> the buffer (applied wherever the buffer gets displayed), or is it
> a property that applies to this buffer but only in this particular window?
>
> E.g. if I have the buffer in window 1 and then display it in window 2,
> should window 2 get the same margins as well? What if window 2 has
> a completely different width than window 1?
Those are all very good questions.
Perhaps it only makes sense to restore window margins if we're popping
the same buffer back into the same window?
But that's such an unlikely thing to happen that I'm not sure it's much
of a user interface. Perhaps restoring it if jumping back to the buffer
in the same frame?
How would we implement this? Perhaps via a hook in
`window--display-buffer' that `ruler-mode' could set?
Or... we could just leave it alone, because I suspect that whatever we
do here, it's going to be pretty confusing. Anybody got an opinion here?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Thu, 19 Aug 2021 15:35:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Fri, 20 Aug 2021 08:19:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 18541 <at> debbugs.gnu.org (full text, mbox):
> Or... we could just leave it alone, because I suspect that whatever we
> do here, it's going to be pretty confusing. Anybody got an opinion here?
Add an option that tells whether S-mouse-1/-3 should set up margins in a
buffer- or window-local way.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Fri, 20 Aug 2021 13:15:01 GMT)
Full text and
rfc822 format available.
Message #25 received at 18541 <at> debbugs.gnu.org (full text, mbox):
martin rudalics <rudalics <at> gmx.at> writes:
>> Or... we could just leave it alone, because I suspect that whatever we
>> do here, it's going to be pretty confusing. Anybody got an opinion here?
>
> Add an option that tells whether S-mouse-1/-3 should set up margins in a
> buffer- or window-local way.
Yeah, I guess... but... is it really useful to restore the margins if
you display the same buffer in a (very) different frame? (I'm thinking
gui vs. non-gui in an emacsclient setup.)
I think it would be natural to restore margins if the buffer is a window
in the same frame, but that's rather obscure, too.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#18541
; Package
emacs
.
(Sun, 22 Aug 2021 08:25:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 18541 <at> debbugs.gnu.org (full text, mbox):
> Yeah, I guess... but... is it really useful to restore the margins if
> you display the same buffer in a (very) different frame? (I'm thinking
> gui vs. non-gui in an emacsclient setup.)
Is it useful to make Ruler mode buffer local?
> I think it would be natural to restore margins if the buffer is a window
> in the same frame, but that's rather obscure, too.
Buffer local settings have to be respected anywhere. A user who sets
the margins in a non-gui frame and switches to a gui frame may want to
see them there as well.
martin
Removed tag(s) moreinfo.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 21 Sep 2021 05:42:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.