Article View: gnu.emacs.bug
Article #88039[19.25] Building virtual info dir, inconsistent newline handling
From: Vincent Del Vecchio
Date: Tue, 16 Aug 1994 20:22
Date: Tue, 16 Aug 1994 20:22
91 lines
3940 bytes
3940 bytes
This is emacs 19.25 on a sparc-sun-sunos4.1.3.
If I have an Info-directory-list ("/tmp/a" "/tmp/b" "/tmp/c" "/tmp/d") and
each of those directories has an identical dir file (attached below),
the vertical spacing between copies is inconsistent:
* Menu: The list of major topics begins on the next line.
* Calc: (calc.info). The GNU Emacs Calculator.
* ELisp: (elisp). GNU Emacs Lisp.
* Calc: (calc.info). The GNU Emacs Calculator.
* ELisp: (elisp). GNU Emacs Lisp.
* Calc: (calc.info). The GNU Emacs Calculator.
* ELisp: (elisp). GNU Emacs Lisp.
* Calc: (calc.info). The GNU Emacs Calculator.
* ELisp: (elisp). GNU Emacs Lisp.
---
The cause seems to be that, in Info-insert-dir, newlines are inserted after
each group of items copied from another file, but are not inserted after
the items from emacs's dir which were originally in the buffer. Attached
are first, the dir file used to produce the above output (note that ^_
should be replaced by its control-char equivalent) and, below that, a patch:
---cut here---
-*- Text -*-
This is the file .../info/dir, which contains the topmost node of the
Info hierarchy. The first time you invoke Info you start off
looking at that node, which is (dir)Top.
^_
File: dir Node: Top This is the top of the INFO tree
This (the Directory node) gives a menu of major topics.
Typing "d" returns here, "q" exits, "?" lists all INFO commands, "h"
gives a primer for first-timers, "mTexinfo<Return>" visits Texinfo topic,
etc.
--- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) ---
* Menu: The list of major topics begins on the next line.
* Calc: (calc.info). The GNU Emacs Calculator.
* ELisp: (elisp). GNU Emacs Lisp.
---cut here---
Tue Aug 16 15:45:40 1994 Vincent Del Vecchio (vdelvecc@dsd.camb.inmet.com)
* info.el (Info-insert-dir): Insert newlines before rather than
after nodes copied from other files, for consistency.
*** info.el~ Tue Aug 16 16:07:14 1994
--- info.el Tue Aug 16 15:44:57 1994
***************
*** 450,463 ****
nil t)
(progn
(search-forward "\n\^_" nil 'move)
! (beginning-of-line))
;; If none exists, add one.
(goto-char (point-max))
(insert "\^_\nFile: dir\tnode: " nodename "\n\n* Menu:\n\n"))
;; Merge the text from the other buffer's menu
;; into the menu in the like-named node in the main buffer.
! (apply 'insert-buffer-substring (cdr (car nodes)))
! (insert "\n"))
(setq nodes (cdr nodes)))
;; Kill all the buffers we just made.
(while buffers
--- 450,463 ----
nil t)
(progn
(search-forward "\n\^_" nil 'move)
! (beginning-of-line)
! (insert "\n"))
;; If none exists, add one.
(goto-char (point-max))
(insert "\^_\nFile: dir\tnode: " nodename "\n\n* Menu:\n\n"))
;; Merge the text from the other buffer's menu
;; into the menu in the like-named node in the main buffer.
! (apply 'insert-buffer-substring (cdr (car nodes))))
(setq nodes (cdr nodes)))
;; Kill all the buffers we just made.
(while buffers
-Vincent Del Vecchio
vdelvecc@inmet.com
Technical Details
Message-ID:
<9408162019.AA02157@dsd.camb.inmet.com>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!panix!MathWorks.Com!yeshua.marcam.com!usc!math.ohio-state.edu!cis.ohio-state.edu!dsd.camb.inmet.com!vdelveccShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,3a448fbc2d1db04a,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-08-16 14:34:16 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!panix!MathWorks.Com!yeshua.marcam.com!usc!math.ohio-state.edu!cis.ohio-state.edu!dsd.camb.inmet.com!vdelvecc From: vdelvecc@dsd.camb.inmet.com (Vincent Del Vecchio) Newsgroups: gnu.emacs.bug Subject: [19.25] Building virtual info dir, inconsistent newline handling Date: 16 Aug 1994 16:22:38 -0400 Organization: GNUs Not Usenet Lines: 91 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9408162019.AA02157@dsd.camb.inmet.com>