GNU bug report logs - #7511
24.0.50; describe-variable trailing whitespace minor bug

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Sun, 28 Nov 2010 23:06:02 UTC

Severity: minor

Found in version 24.0.50

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 7511 in the body.
You can then email your comments to 7511 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 owner <at> debbugs.gnu.org, rfrancoise <at> debian.org, bug-gnu-emacs <at> gnu.org:
bug#7511; Package emacs. (Sun, 28 Nov 2010 23:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to rfrancoise <at> debian.org, bug-gnu-emacs <at> gnu.org. (Sun, 28 Nov 2010 23:06:02 GMT) Full text and rfc822 format available.

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

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; describe-variable trailing whitespace minor bug
Date: Mon, 29 Nov 2010 01:58:55 +0800
(setq show-trailing-whitespace t)
(setq bla "1234567890")
(describe-variable 'bla) ; output looks good
(setq bla "12345678901234567890")
(describe-variable 'bla) ; ouptut now on second line (odd, though plenty of
room left on first line, but never mind that), with trailing
whitespace on first line.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7511; Package emacs. (Fri, 17 Dec 2010 11:33:02 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: jidanni <at> jidanni.org
Cc: rfrancoise <at> debian.org, 7511 <at> debbugs.gnu.org
Subject: Re: bug#7511: 24.0.50; describe-variable trailing whitespace minor bug
Date: Fri, 17 Dec 2010 19:38:16 +0800
jidanni <at> jidanni.org writes:

> (setq show-trailing-whitespace t)
> (setq bla "1234567890")
> (describe-variable 'bla) ; output looks good
> (setq bla "12345678901234567890")
> (describe-variable 'bla) ; ouptut now on second line (odd, though plenty of
> room left on first line, but never mind that), with trailing
> whitespace on first line.

Fixed, thanks.




bug closed, send any further explanations to jidanni <at> jidanni.org Request was from Chong Yidong <cyd <at> stupidchicken.com> to control <at> debbugs.gnu.org. (Fri, 17 Dec 2010 11:33:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7511; Package emacs. (Sun, 19 Dec 2010 07:09:01 GMT) Full text and rfc822 format available.

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

From: Leo <sdl.web <at> gmail.com>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: rfrancoise <at> debian.org, 7511 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#7511: 24.0.50; describe-variable trailing whitespace minor bug
Date: Sun, 19 Dec 2010 07:15:00 +0000
On 2010-12-17 11:38 +0000, Chong Yidong wrote:
> jidanni <at> jidanni.org writes:
>
>> (setq show-trailing-whitespace t)
>> (setq bla "1234567890")
>> (describe-variable 'bla) ; output looks good
>> (setq bla "12345678901234567890")
>> (describe-variable 'bla) ; ouptut now on second line (odd, though plenty of
>> room left on first line, but never mind that), with trailing
>> whitespace on first line.
>
> Fixed, thanks.

(line-beginning-position -1) actually moves backwards two lines, which
is really unintuitive (BTW it should be brought in line with
forward-line). So with Yidong's fix all standard variables are printed
on a newline. See C-h v fill-column.

The following patch fixes typo in the fix.

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index a6cf2b4..250c4b9 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -643,7 +643,7 @@ it is displayed along with the global value."
 		(let ((from (point)))
 		  (terpri)
 		  (pp val)
-		  (if (< (point) (- 68 (line-beginning-position -1)))
+		  (if (< (point) (+ 68 (line-beginning-position 0)))
 		      (delete-region from (1+ from))
 		    (delete-region (1- from) from)))))
 	    (terpri)

-- 
Oracle is the new evil




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#7511; Package emacs. (Mon, 20 Dec 2010 11:25:01 GMT) Full text and rfc822 format available.

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

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Leo <sdl.web <at> gmail.com>
Cc: rfrancoise <at> debian.org, 7511 <at> debbugs.gnu.org, jidanni <at> jidanni.org
Subject: Re: bug#7511: 24.0.50; describe-variable trailing whitespace minor bug
Date: Mon, 20 Dec 2010 19:31:20 +0800
Leo <sdl.web <at> gmail.com> writes:

> (line-beginning-position -1) actually moves backwards two lines, which
> is really unintuitive (BTW it should be brought in line with
> forward-line). So with Yidong's fix all standard variables are printed
> on a newline. See C-h v fill-column.
>
> The following patch fixes typo in the fix.

Thanks for the catch.  I've committed your fix.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 17 Jan 2011 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 14 years and 159 days ago.

Previous Next


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