unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps
@ 2012-08-24 22:08 Drew Adams
  2012-08-25 19:41 ` Juri Linkov
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2012-08-24 22:08 UTC (permalink / raw)
  To: 12272

This Info node has 3 empty lines at the end, not 2 like other nodes.
 
The symptom, in my setup (separate frame, fit to buffer) is that hitting
SPC scrolls down to an empty screen, instead of moving immediately to
the next node.

In GNU Emacs 24.1.50.1 (i386-mingw-nt5.1.2600)
 of 2012-08-13 on MARVIN
Bzr revision: 109584 monnier@iro.umontreal.ca-20120813141247-76irjqslrfncn30u
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --with-gcc (4.6) --no-opt --enable-checking --cflags
 -ID:/devel/emacs/libs/libXpm-3.5.8/include
 -ID:/devel/emacs/libs/libXpm-3.5.8/src
 -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
 -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
 -ID:/devel/emacs/libs/giflib-4.1.4-1/include
 -ID:/devel/emacs/libs/jpeg-6b-4/include
 -ID:/devel/emacs/libs/tiff-3.8.2-1/include
 -ID:/devel/emacs/libs/gnutls-3.0.9/include
 -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
 -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
 






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps
  2012-08-24 22:08 bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps Drew Adams
@ 2012-08-25 19:41 ` Juri Linkov
  2012-08-26  5:18   ` Drew Adams
  2012-12-02  1:10   ` Juri Linkov
  0 siblings, 2 replies; 7+ messages in thread
From: Juri Linkov @ 2012-08-25 19:41 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12272

> This Info node has 3 empty lines at the end, not 2 like other nodes.

At the end of most nodes makeinfo adds 1 empty line (2 newline chars),
and at the end of chapters makeinfo adds 2 empty lines (3 newline chars).

There is no need to have empty lines at the end of nodes at all, so they
could be safely removed, exactly like the standalone Info reader already
does:

=== modified file 'lisp/info.el'
--- lisp/info.el	2012-08-25 18:49:47 +0000
+++ lisp/info.el	2012-08-25 19:40:45 +0000
@@ -4844,6 +4844,12 @@ (defun Info-fontify-node ()
                                  mouse-face highlight
                                  help-echo "mouse-2: go to this URL"))))
 
+      ;; Hide empty lines at the end of the node.
+      (goto-char (point-max))
+      (skip-chars-backward "\n")
+      (when (< (1+ (point)) (point-max))
+	(put-text-property (1+ (point)) (point-max) 'invisible t))
+
       (set-buffer-modified-p nil))))
 \f
 ;;; Speedbar support:






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps
  2012-08-25 19:41 ` Juri Linkov
@ 2012-08-26  5:18   ` Drew Adams
  2012-08-28  9:02     ` Juri Linkov
  2012-12-02  1:10   ` Juri Linkov
  1 sibling, 1 reply; 7+ messages in thread
From: Drew Adams @ 2012-08-26  5:18 UTC (permalink / raw)
  To: 'Juri Linkov'; +Cc: 12272

> There is no need to have empty lines at the end of nodes at 
> all, so they could be safely removed, exactly like the
> standalone Info reader already does:
> +      ;; Hide empty lines at the end of the node.
> +      (goto-char (point-max))
> +      (skip-chars-backward "\n")
> +      (when (< (1+ (point)) (point-max))
> +	(put-text-property (1+ (point)) (point-max) 'invisible t))
> +
>        (set-buffer-modified-p nil))))

Works for me.  Thx.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps
  2012-08-26  5:18   ` Drew Adams
@ 2012-08-28  9:02     ` Juri Linkov
  0 siblings, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2012-08-28  9:02 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12272-done

> Works for me.  Thx.

Installed and closed.  Thanks for the suggestion.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps
  2012-08-25 19:41 ` Juri Linkov
  2012-08-26  5:18   ` Drew Adams
@ 2012-12-02  1:10   ` Juri Linkov
  2012-12-02  2:23     ` Drew Adams
  2012-12-03 23:39     ` Juri Linkov
  1 sibling, 2 replies; 7+ messages in thread
From: Juri Linkov @ 2012-12-02  1:10 UTC (permalink / raw)
  To: Drew Adams; +Cc: 12272

To fix the problem reported at
http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00002.html
there is another patch that still retains 1 empty line
at the end of the node, but doesn't hide the last newline char.

Drew, could you please verify if it fixes the symptom
that you reported initially?

=== modified file 'lisp/info.el'
--- lisp/info.el	2012-11-21 10:32:38 +0000
+++ lisp/info.el	2012-12-02 00:57:20 +0000
@@ -4856,8 +4856,8 @@ (defun Info-fontify-node ()
       ;; Hide empty lines at the end of the node.
       (goto-char (point-max))
       (skip-chars-backward "\n")
-      (when (< (1+ (point)) (point-max))
-	(put-text-property (1+ (point)) (point-max) 'invisible t))
+      (when (< (point) (1- (point-max)))
+	(put-text-property (point) (1- (point-max)) 'invisible t))
 
       (set-buffer-modified-p nil))))
 \f






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps
  2012-12-02  1:10   ` Juri Linkov
@ 2012-12-02  2:23     ` Drew Adams
  2012-12-03 23:39     ` Juri Linkov
  1 sibling, 0 replies; 7+ messages in thread
From: Drew Adams @ 2012-12-02  2:23 UTC (permalink / raw)
  To: 'Juri Linkov'; +Cc: 12272

> To fix the problem reported at
> http://lists.gnu.org/archive/html/emacs-devel/2012-12/msg00002.html
> there is another patch that still retains 1 empty line
> at the end of the node, but doesn't hide the last newline char.
> 
> Drew, could you please verify if it fixes the symptom
> that you reported initially?

Thanks for letting me know.  I checked the original node reported for this bug,
and it still seems OK with that patch.  Thx.






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps
  2012-12-02  1:10   ` Juri Linkov
  2012-12-02  2:23     ` Drew Adams
@ 2012-12-03 23:39     ` Juri Linkov
  1 sibling, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2012-12-03 23:39 UTC (permalink / raw)
  To: 12272

> -      (when (< (1+ (point)) (point-max))
> -	(put-text-property (1+ (point)) (point-max) 'invisible t))
> +      (when (< (point) (1- (point-max)))
> +	(put-text-property (point) (1- (point-max)) 'invisible t))

Since this is a regression, I installed the fix to the emacs-24 branch.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-12-03 23:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-24 22:08 bug#12272: 24.1.50; extra newline at end of node (elisp) Standard Regexps Drew Adams
2012-08-25 19:41 ` Juri Linkov
2012-08-26  5:18   ` Drew Adams
2012-08-28  9:02     ` Juri Linkov
2012-12-02  1:10   ` Juri Linkov
2012-12-02  2:23     ` Drew Adams
2012-12-03 23:39     ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).