* Re: Indices in Info.
@ 2003-06-24 13:26 Karl Berry
2003-06-24 14:04 ` Andreas Schwab
2003-06-25 1:35 ` Luc Teirlinck
0 siblings, 2 replies; 10+ messages in thread
From: Karl Berry @ 2003-06-24 13:26 UTC (permalink / raw)
> * $Id:: GNU Sample Texts.
I removed the :'s from these index entries in texinfo.txi.
"Emacs should be able to handle this correctly"
Yes it should. Regardless of the (newline) example (see below),
consider this index entry:
@cindex (dir) as Up node of Top node
Here, the parentheses are meaningful and correct. I could also imagine
wanting to index ( in a programming language manual. I'm sure there are
other index entries that start with ( out there as well, since it's
always been allowed.
or "starting an index entry with a parenthetical remark makes no sense"?
In this particular instance, it definitely would
seem more logical to have entries named "newline", "space" and "tab",
This is in the command index. The manual is not talking about a command
@newline. It's talking about @<the-newline-character>. That's why I
put the parentheses in. I suppose angle brackets instead of parentheses
might be slightly better. I changed it.
But that's irrelevant to the question of whether index entries can start
with (. They should be able to. And the leading parentheses work in
Emacs 21.3, at least they do for me. So perhaps this got broken in the
current source code ...
IMHO, these tricky cases should be solved by a change in the Info file
format
Yes, I agree, as we've discussed before. We shouldn't make complicated
rules about when colons are acceptable and when they're not, according
to the regexp du jour. Instead, we should just support everything.
Until that glorious day arrives, I'm not worried about discrepancies
between emacs-info and standalone-info in this regard. I don't see any
need to document exactly which cases work and which don't in which
reader, since it all changes from version to version anyway.
Thanks,
karl
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Indices in Info.
2003-06-24 13:26 Indices in Info Karl Berry
@ 2003-06-24 14:04 ` Andreas Schwab
2003-06-25 1:35 ` Luc Teirlinck
1 sibling, 0 replies; 10+ messages in thread
From: Andreas Schwab @ 2003-06-24 14:04 UTC (permalink / raw)
Cc: emacs-devel
karl@freefriends.org (Karl Berry) writes:
|> Yes, I agree, as we've discussed before. We shouldn't make complicated
|> rules about when colons are acceptable and when they're not, according
|> to the regexp du jour. Instead, we should just support everything.
The problem with that is that the info format does not have a way to quote
special characters, so you will always come up with cases that fail.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Indices in Info.
2003-06-24 13:26 Indices in Info Karl Berry
2003-06-24 14:04 ` Andreas Schwab
@ 2003-06-25 1:35 ` Luc Teirlinck
2003-06-25 1:55 ` Luc Teirlinck
2003-06-25 19:53 ` Richard Stallman
1 sibling, 2 replies; 10+ messages in thread
From: Luc Teirlinck @ 2003-06-25 1:35 UTC (permalink / raw)
Cc: emacs-devel
Karl Berry wrote:
"Emacs should be able to handle this correctly"
Yes it should.
Meant was leading `(' and `)' in index entries and menu subtopic
names. There were similar problems with other leading characters,
such as `;'.
I believe that the bug was a badly initialized while loop in
`Info-extract-menu-node-name'.
I would like to commit the following patch, which takes care of these
problems. Is this OK?
===File ~/infodiff==========================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/info.old.el /usr/local/share/emacs/21.3.50/lisp/info.el
*** /usr/local/share/emacs/21.3.50/lisp/info.old.el Mon Jun 23 16:25:22 2003
--- /usr/local/share/emacs/21.3.50/lisp/info.el Tue Jun 24 20:06:59 2003
***************
*** 1564,1569 ****
--- 1564,1571 ----
(skip-chars-forward " \t\n")
(let ((beg (point))
str)
+ (skip-chars-forward "^:")
+ (forward-char 1)
(while (not (looking-at ":*[,.;() \t\n]"))
(skip-chars-forward "^:")
(forward-char 1))
Diff finished at Tue Jun 24 20:10:55
============================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Indices in Info.
2003-06-25 1:35 ` Luc Teirlinck
@ 2003-06-25 1:55 ` Luc Teirlinck
2003-06-25 3:26 ` Luc Teirlinck
2003-06-25 17:50 ` Stefan Monnier
2003-06-25 19:53 ` Richard Stallman
1 sibling, 2 replies; 10+ messages in thread
From: Luc Teirlinck @ 2003-06-25 1:55 UTC (permalink / raw)
Cc: karl
Or is the following style considered preferable? (There is no
difference in functionality between the two diffs, just a matter of
style.)
===File ~/infodiff2=========================================
cd /usr/local/share/emacs/21.3.50/lisp/
diff -c /usr/local/share/emacs/21.3.50/lisp/info.old.el /usr/local/share/emacs/21.3.50/lisp/info.el
*** /usr/local/share/emacs/21.3.50/lisp/info.old.el Mon Jun 23 16:25:22 2003
--- /usr/local/share/emacs/21.3.50/lisp/info.el Tue Jun 24 20:36:37 2003
***************
*** 1564,1572 ****
(skip-chars-forward " \t\n")
(let ((beg (point))
str)
! (while (not (looking-at ":*[,.;() \t\n]"))
! (skip-chars-forward "^:")
! (forward-char 1))
(setq str
(if (looking-at ":")
(buffer-substring-no-properties beg (1- (point)))
--- 1564,1574 ----
(skip-chars-forward " \t\n")
(let ((beg (point))
str)
! (while
! (progn
! (skip-chars-forward "^:")
! (forward-char 1)
! (not (looking-at ":*[,.;() \t\n]"))))
(setq str
(if (looking-at ":")
(buffer-substring-no-properties beg (1- (point)))
Diff finished at Tue Jun 24 20:42:14
============================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Indices in Info.
2003-06-25 1:35 ` Luc Teirlinck
2003-06-25 1:55 ` Luc Teirlinck
@ 2003-06-25 19:53 ` Richard Stallman
1 sibling, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2003-06-25 19:53 UTC (permalink / raw)
Cc: karl
I believe that the bug was a badly initialized while loop in
`Info-extract-menu-node-name'.
I would like to commit the following patch, which takes care of these
problems. Is this OK?
If nobody reports problems with it in 2 days, please install it.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Indices in Info.
@ 2003-06-24 14:08 Karl Berry
0 siblings, 0 replies; 10+ messages in thread
From: Karl Berry @ 2003-06-24 14:08 UTC (permalink / raw)
Cc: emacs-devel
The problem with that is that the info format does not have a way to quote
special characters, so you will always come up with cases that fail.
Yes, and that is why the info format has to be changed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Indices in Info.
@ 2003-06-24 3:42 Luc Teirlinck
2003-06-24 4:17 ` Eli Zaretskii
0 siblings, 1 reply; 10+ messages in thread
From: Luc Teirlinck @ 2003-06-24 3:42 UTC (permalink / raw)
Cc: karl
Both Emacs Info and stand-alone Info have some trouble with various
index entries. In many cases, the conclusion might be that we should
just "outlaw" such entries.
Problem 1: both Emacs and stand-alone, or maybe just texinfo.txi
g (texinfo)Concept Index
Click on:
* $Id:: GNU Sample Texts.
Result:
byte-code: No such anchor in tag table or node in tag table or file: $Id
(Emacs)
$Id: No such file or directory (stand-alone).
Proposed solution: Just institute a convention that an index entry
should never end in a colon. Those two colons in an index entry look
weird anyway, even if they would not produce a bug. Of course, also
follow that convention.
Problem 2: Emacs, or maybe texinfo.txi
g (texinfo)Command and Variable Index
Click on:
* (newline): Multiple Spaces.
Result:
Info-find-node: Info file newline does not exist
Reason: Index entry starting with a parenthetical remark.
The stand-alone Info correctly visits Multiple Spaces.
What is the conclusion here: "Emacs should be able to handle this
correctly" or "starting an index entry with a parenthetical remark
makes no sense"? In this particular instance, it definitely would
seem more logical to have entries named "newline", "space" and "tab",
rather than "(newline)", "(space)" and "(tab)". (I guess these were
just typos, or not?)
Problem 3: No real problem but maybe worth mentioning. Also, should be
compared with problem 4.
I produced the following index for experimentation purposes:
Index
*****
* Menu:
* Aha: oho: Top.
* Oho:ihi: Top.
Both Emacs and stand-alone fail to visit "Top" in the first entry. Of
course, no bug, but it might be worth emphasizing in
(texinfo)Index Entries that an index entry should *never* contain a
colon followed by a space or tab.
Problem 4:
Emacs visits Top in the _second_ entry above, stand-alone Info does not.
>From info.el:
;; - a menu item MAY contain colons but not colon-space ": "
;; - a menu item ending with ": " (but not ":: ") is an index entry
;; - a node name MAY NOT contain a colon
;; This distinction is to support indexing of computer programming
;; language terms that may contain ":" but not ": ".
If it is worth while for Emacs Info to support those computer
programming language terms, it might also be worth while for the
stand-alone version to do so. People constructing index entries do so
for both versions, so one should be consistent.
All conventions we decide on for index entries could be described in
(texinfo)Index Entries.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Indices in Info.
2003-06-24 3:42 Luc Teirlinck
@ 2003-06-24 4:17 ` Eli Zaretskii
0 siblings, 0 replies; 10+ messages in thread
From: Eli Zaretskii @ 2003-06-24 4:17 UTC (permalink / raw)
Cc: emacs-devel
> Date: Mon, 23 Jun 2003 22:42:56 -0500 (CDT)
> From: Luc Teirlinck <teirllm@dms.auburn.edu>
>
> g (texinfo)Concept Index
>
> Click on:
>
> * $Id:: GNU Sample Texts.
This menu entry should not be there. It's a bug in texinfo.txi and/or
makeinfo.
> Proposed solution: Just institute a convention that an index entry
> should never end in a colon.
The Texinfo manual already disallows such cases. But there's a need
to support node names with colons (think about a manual about a C++
library, for example), so there are various hacks out there to get
Info readers to have some support for that.
> If it is worth while for Emacs Info to support those computer
> programming language terms, it might also be worth while for the
> stand-alone version to do so.
True; but doing that is not easy. The stand-alone Info doesn't use
regexps when it searches for specific text patterns such as the one in
a menu, and the same code is used for cross-references and whatsnot.
IMHO, these tricky cases should be solved by a change in the Info file
format, not by hacks specific to this or that reader.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-06-25 19:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-24 13:26 Indices in Info Karl Berry
2003-06-24 14:04 ` Andreas Schwab
2003-06-25 1:35 ` Luc Teirlinck
2003-06-25 1:55 ` Luc Teirlinck
2003-06-25 3:26 ` Luc Teirlinck
2003-06-25 17:50 ` Stefan Monnier
2003-06-25 19:53 ` Richard Stallman
-- strict thread matches above, loose matches on Subject: below --
2003-06-24 14:08 Karl Berry
2003-06-24 3:42 Luc Teirlinck
2003-06-24 4:17 ` Eli Zaretskii
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.