GNU bug report logs - #8987
24.0.50; texinfo-insert-menu inserts unnecessary trailing spaces

Previous Next

Package: emacs;

Reported by: emacs18 <at> gmail.com

Date: Sat, 2 Jul 2011 18:43:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 24.0.50

Fixed in version 24.1

Done: Lars Magne 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 8987 in the body.
You can then email your comments to 8987 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, bug-gnu-emacs <at> gnu.org:
bug#8987; Package emacs. (Sat, 02 Jul 2011 18:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to emacs18 <at> gmail.com:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 02 Jul 2011 18:43:02 GMT) Full text and rfc822 format available.

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

From: emacs18 <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; texinfo-insert-menu inserts unnecessary trailing spaces
Date: Sat, 02 Jul 2011 11:42:23 -0700
texinfo-all-menus-update is a command that updates all menus within a
texinfo buffer.  This command calls texinfo-insert-menu in turn to
update each menu.  The problem with the latter is that it inserts
unnecessary white spaces at the end of most menu items following
double-colon.  For example see bzr version 104838 of emacs trunk checked
in on July 1, 2011 where someone checked in cc-mode.texi with trailing
white spaces.

This problem has existed for many years.  I know, because I suffered
through it many times myself.  So I looked for a solution and it seems
like making one line change should fix this as shown below.

In emacs-lisp empty string evaluates to boolean true unlike python,
so that one cannot simply test boolean value of a string to detect
empty string verses non-empty string.  It looks like testing the
(length) being greater than 0 seems to get the job done.

=== modified file 'lisp/textmodes/texnfo-upd.el'
--- lisp/textmodes/texnfo-upd.el	2011-01-25 04:08:28 +0000
+++ lisp/textmodes/texnfo-upd.el	2011-07-02 18:30:47 +0000
@@ -687,7 +687,7 @@
 	(insert (format "%s: %s." (car node-part) (cdr node-part)))))
 
     ;; Insert the description, if present.
-    (when (cdr menu)
+    (when (> (length (cdr menu)) 0)
       ;; Move to right place.
       (indent-to texinfo-column-for-description 2)
       ;; Insert description.





Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 03 Jul 2011 16:13:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 8987 <at> debbugs.gnu.org and emacs18 <at> gmail.com Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 03 Jul 2011 16:13:02 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8987; Package emacs. (Sun, 03 Jul 2011 16:31:03 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: emacs18 <at> gmail.com
Cc: 8987 <at> debbugs.gnu.org
Subject: Re: 24.0.50; texinfo-insert-menu inserts unnecessary trailing spaces
Date: Sun, 03 Jul 2011 18:12:14 +0200
emacs18 <at> gmail.com, Richard Kim <emacs18 <at> gmail.com> writes:

> In emacs-lisp empty string evaluates to boolean true unlike python,
> so that one cannot simply test boolean value of a string to detect
> empty string verses non-empty string.  It looks like testing the
> (length) being greater than 0 seems to get the job done.

Thanks for the patch; I've applied it to Emacs 24.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




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

This bug report was last modified 13 years and 324 days ago.

Previous Next


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