[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ":" in Scheme names.
From: |
Aubrey Jaffer |
Subject: |
Re: ":" in Scheme names. |
Date: |
Wed, 6 Nov 2002 22:39:03 -0500 (EST) |
| Date: Tue, 5 Nov 2002 08:22:03 +0200 (IST)
| From: Eli Zaretskii <address@hidden>
|
| On Mon, 4 Nov 2002, Aubrey Jaffer wrote:
|
| > Putting a TAB character after the ":" in index entries in .info
| > files does not screw up indexing for the info (4.1) program or
| > emacs (21.2).
|
| There's more than just 2 Info readers out there. We shouldn't
| break any of them. (Although I don't think any amount of
| whitespace after the colon will break any of them.)
|
| > The next version of makeinfo would put tabs after ":" in index
| > entries. New versions of info readers would treat ":<TAB>" as
| > the separator if present; falling back to ":" if tabs are absent.
|
| Thank you for your suggestion.
|
| However, I don't think it will work to rely on whitespace after the
| colon: whitespace is generally ignored by the Info readers when
| they look for node names and other keywords. Likewise, TABs and
| SPACEs (and newlines as well) are treated the same.
When I interpose a newline in an index entry, /usr/bin/info can still
index it, but Emacs says "Info-index: No `make-color' in index".
| These assumptions are buried deep inside the low-level search
| routines of the Info reader, which don't really know whether they
| are looking for an index entry or something else, so it's not easy
| to change that.
You just said there are many info readers -- so the difficulty you
cite with "the Info reader" will not apply to all readers. You opined
that whitespace shouldn't break any reader. If a method fixes some
readers and does no harm to the others, then it is worth doing.
| As an example, consider this entry from my DIR file:
|
| * mkfifo: (fileutils)mkfifo invocation. Create FIFOs: (named pipes).
|
| There are two colons with whitespace after them here; how do you
| tell Info which one to take as the significant delimiter? The part
| to the right of the node name is free text, so anything can go
| there.
The DIR file is not an index. Typing 'I' to /usr/bin/info provokes
"No indices found." Emacs info-mode searches the TexInfo index.
| As Karl said, this is a hard problem, and it's not limited to the
| colon (a period has similar problems here).
It is a hard problem only if you insist on fixing all readers with the
same hammer.
| There's a strong desire to find a solution that would be
| back-compatible, but I suspect that the solution will be more
| complicated than just adding a TAB.
Tabs would be backward compatible. Old info files would index as they
do now. Old readers would behave as they do now.
-=-=-=-=-
Here is a patch which fixes emacs Info-mode (with tab or not):
cd /usr/share/emacs/21.2/lisp/
diff -c /usr/share/emacs/21.2/lisp/info.el\~ /usr/share/emacs/21.2/lisp/info.el
*** /usr/share/emacs/21.2/lisp/info.el~ Fri Dec 21 14:08:17 2001
--- /usr/share/emacs/21.2/lisp/info.el Wed Nov 6 22:30:47 2002
***************
*** 1830,1836 ****
(interactive "sIndex topic: ")
(let ((orignode Info-current-node)
(rnode nil)
! (pattern (format "\n\\* +\\([^\n:]*%s[^\n:]*\\):[ \t]*\\([^.\n]*\\)\\.[
\t]*\\([0-9]*\\)"
(regexp-quote topic)))
node
(case-fold-search t))
--- 1830,1836 ----
(interactive "sIndex topic: ")
(let ((orignode Info-current-node)
(rnode nil)
! (pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^.\n]*\\)\\.[
\t]*\\([0-9]*\\)"
(regexp-quote topic)))
node
(case-fold-search t))
Diff finished at Wed Nov 6 22:32:26
Re: ":" in Scheme names., Karl Berry, 2002/11/07
Re: ":" in Scheme names., Karl Berry, 2002/11/07