* bug#17476: 24.3.91; [PATCH] unimplemented info entry
@ 2014-05-12 15:54 Shigeru Fukaya
2014-05-12 16:54 ` Eli Zaretskii
0 siblings, 1 reply; 7+ messages in thread
From: Shigeru Fukaya @ 2014-05-12 15:54 UTC (permalink / raw)
To: 17476
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
Emacs info doesn't recognize info file entries without parentheses in
dir node. In Cygwin, libc and libm entries in dir are just like:;
* libc:: The ANSI C library.
* libm:: An ANSI-C conforming mathematical library.
Cygwin info command treat them as info files.
With the attached patch, Emacs regards the above format in a dir node
as info file names.
-- Shigeru
[-- Attachment #2: info.diff --]
[-- Type: application/octet-stream, Size: 1207 bytes --]
--- orig/info.el 2014-03-21 14:34:40.000000000 +0900
+++ ./info.el 2014-05-13 00:33:22.388414600 +0900
@@ -2633,8 +2633,10 @@ Because of ambiguities, this should be c
(or (and (not (equal (match-string-no-properties 2) ""))
(match-string-no-properties 2))
;; If the node name is the menu entry name (using `entry::').
- (buffer-substring-no-properties
- (match-beginning 0) (1- (match-beginning 1)))))))
+ ;; In "dir" node, `* name::' to "(name)" node.
+ (format (if (equal Info-current-file "dir") "(%s)" "%s")
+ (buffer-substring-no-properties
+ (match-beginning 0) (1- (match-beginning 1))))))))
;; No one calls this.
;;(defun Info-menu-item-sequence (list)
@@ -3898,7 +3900,11 @@ If FORK is non-nil, it is passed to `Inf
(setq node nil))))
;; menu item: node name
((setq node (Info-get-token (point) "\\* +" "\\* +\\([^:]*\\)::"))
- (Info-goto-node node fork))
+ ;; `* name::' to "(name)" in "dir" node.
+ (Info-goto-node (if (equal Info-current-node "dir")
+ (format "(%s)" node)
+ node)
+ fork))
;; menu item: node name or index entry
((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ")
(beginning-of-line)
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#17476: 24.3.91; [PATCH] unimplemented info entry
2014-05-12 15:54 bug#17476: 24.3.91; [PATCH] unimplemented info entry Shigeru Fukaya
@ 2014-05-12 16:54 ` Eli Zaretskii
2014-05-12 17:34 ` Eli Zaretskii
2014-05-12 17:53 ` Shigeru Fukaya
0 siblings, 2 replies; 7+ messages in thread
From: Eli Zaretskii @ 2014-05-12 16:54 UTC (permalink / raw)
To: Shigeru Fukaya; +Cc: 17476
> From: Shigeru Fukaya <shigeru.fukaya@gmail.com>
> Date: Tue, 13 May 2014 00:54:29 +0900
>
> Emacs info doesn't recognize info file entries without parentheses in
> dir node. In Cygwin, libc and libm entries in dir are just like:;
>
> * libc:: The ANSI C library.
> * libm:: An ANSI-C conforming mathematical library.
This is invalid Info. Please ask Cygwin maintainers to fix that.
> Cygwin info command treat them as info files.
No, it doesn't. A reference such as 'foo::' is parsed as a _node_
named "foo" in the 'dir' file. Info then searches for such a node in
the file 'dir', and doesn't find it. It then falls back on a kludgy
feature, whereby typing "info foo" from the shell prompt looks for a
_file_ 'foo' or 'foo.info', on the assumption that the
bozo^H^H^H^Huser forgot to type -f, as in "info -f foo".
IOW, the above dir file abuses a kludge in the Info reader introduced
to shut up all those who complain because they cannot be bothered to
invoke the reader as prescribed in the documentation.
In any case, this kludge is for invoking the Info reader from the
shell prompt, not for navigating inside Info files. IOW, this is
actually a buglet in Info, which therefore can disappear without
notice.
> With the attached patch, Emacs regards the above format in a dir node
> as info file names.
This patch is incorrect. It treats the dir file specially, whereas it
is simply an Info file with a menu, and nothing prevents the Cygwin
maintainers from putting such menu items in any other Info files.
More importantly, it tramps on a useful feature, whereby a reference
such as "foo::" is actually a shortcut for "(dir)foo::".
So I hope we will not accept this change.
But thanks for reporting the problem and for working on it.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#17476: 24.3.91; [PATCH] unimplemented info entry
2014-05-12 16:54 ` Eli Zaretskii
@ 2014-05-12 17:34 ` Eli Zaretskii
2014-05-12 17:53 ` Shigeru Fukaya
1 sibling, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2014-05-12 17:34 UTC (permalink / raw)
To: shigeru.fukaya; +Cc: 17476
> Date: Mon, 12 May 2014 19:54:05 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 17476@debbugs.gnu.org
>
> > Cygwin info command treat them as info files.
>
> No, it doesn't. A reference such as 'foo::' is parsed as a _node_
> named "foo" in the 'dir' file. Info then searches for such a node in
> the file 'dir', and doesn't find it. It then falls back on a kludgy
> feature, whereby typing "info foo" from the shell prompt looks for a
> _file_ 'foo' or 'foo.info', on the assumption that the
> bozo^H^H^H^Huser forgot to type -f, as in "info -f foo".
>
> IOW, the above dir file abuses a kludge in the Info reader introduced
> to shut up all those who complain because they cannot be bothered to
> invoke the reader as prescribed in the documentation.
>
> In any case, this kludge is for invoking the Info reader from the
> shell prompt, not for navigating inside Info files. IOW, this is
> actually a buglet in Info, which therefore can disappear without
> notice.
>
> > With the attached patch, Emacs regards the above format in a dir node
> > as info file names.
>
> This patch is incorrect. It treats the dir file specially, whereas it
> is simply an Info file with a menu, and nothing prevents the Cygwin
> maintainers from putting such menu items in any other Info files.
> More importantly, it tramps on a useful feature, whereby a reference
> such as "foo::" is actually a shortcut for "(dir)foo::".
>
> So I hope we will not accept this change.
Maybe I should explain why I'm so agitated about this. You see, I
wrote the code which is responsible for interpreting "foo::" as a
reference to a file "foo" if there's no menu item by that name. I
wrote that code, under protest, more than 12 years ago, only because
the head maintainer asked for that, in order to stop complaints that
"info SOMETHING" didn't show the manual for that SOMETHING.
So imagine how I feel 12 years later when I see that a kludge
concocted in order to cater to some user sloppiness is now treated as
a first-class feature, and Emacs is requested to follow suit.
Sorry if my response sounded harsh.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#17476: 24.3.91; [PATCH] unimplemented info entry
2014-05-12 16:54 ` Eli Zaretskii
2014-05-12 17:34 ` Eli Zaretskii
@ 2014-05-12 17:53 ` Shigeru Fukaya
2014-05-12 18:20 ` Shigeru Fukaya
` (2 more replies)
1 sibling, 3 replies; 7+ messages in thread
From: Shigeru Fukaya @ 2014-05-12 17:53 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 17476
>This is invalid Info. Please ask Cygwin maintainers to fix that.
It's valid, maybe even in non-dir nodes.
(Info-goto-node "(texinfo)Less Cluttered Menu Entry" nil)
-- Shigeru
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#17476: 24.3.91; [PATCH] unimplemented info entry
2014-05-12 17:53 ` Shigeru Fukaya
@ 2014-05-12 18:20 ` Shigeru Fukaya
2014-05-12 18:30 ` Eli Zaretskii
2014-05-12 19:01 ` Andreas Schwab
2 siblings, 0 replies; 7+ messages in thread
From: Shigeru Fukaya @ 2014-05-12 18:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 17476
>>This is invalid Info. Please ask Cygwin maintainers to fix that.
>
>It's valid, maybe even in non-dir nodes.
>
>(Info-goto-node "(texinfo)Less Cluttered Menu Entry" nil)
I forgot (texinfo) is not in Emacs distribution.
The contents is below.
7.4 Less Cluttered Menu Entry
=============================
When the menu entry name and node name are the same, you can write the
name immediately after the asterisk and space at the beginning of the
line and follow the name with two colons.
For example, write
* Name:: DESCRIPTION
instead of
* Name: Name. DESCRIPTION
We recommend using the node name for the menu entry name whenever
possible, since it reduces visual clutter in the menu.
-- Shigeru
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#17476: 24.3.91; [PATCH] unimplemented info entry
2014-05-12 17:53 ` Shigeru Fukaya
2014-05-12 18:20 ` Shigeru Fukaya
@ 2014-05-12 18:30 ` Eli Zaretskii
2014-05-12 19:01 ` Andreas Schwab
2 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2014-05-12 18:30 UTC (permalink / raw)
To: Shigeru Fukaya; +Cc: 17476
> From: Shigeru Fukaya <shigeru.fukaya@gmail.com>
> Cc: 17476@debbugs.gnu.org
> Date: Tue, 13 May 2014 02:53:10 +0900
>
> >This is invalid Info. Please ask Cygwin maintainers to fix that.
>
> It's valid, maybe even in non-dir nodes.
Valid, assuming the menu item is a _node_ name:
When the menu entry name and node name are the same, you can write the
name immediately after the asterisk and space at the beginning of the
line and follow the name with two colons.
For example, write
* Name:: DESCRIPTION
instead of
* Name: Name. DESCRIPTION
As you see, "Name" here is the name of a node, not of a file.
What is invalid is to write
* foobar::
and assume that Info will look for a _file_ named "foobar".
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#17476: 24.3.91; [PATCH] unimplemented info entry
2014-05-12 17:53 ` Shigeru Fukaya
2014-05-12 18:20 ` Shigeru Fukaya
2014-05-12 18:30 ` Eli Zaretskii
@ 2014-05-12 19:01 ` Andreas Schwab
2 siblings, 0 replies; 7+ messages in thread
From: Andreas Schwab @ 2014-05-12 19:01 UTC (permalink / raw)
To: Shigeru Fukaya; +Cc: 17476
Shigeru Fukaya <shigeru.fukaya@gmail.com> writes:
>>This is invalid Info. Please ask Cygwin maintainers to fix that.
>
> It's valid, maybe even in non-dir nodes.
But the entry doesn't point to an existing node.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-05-12 19:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-12 15:54 bug#17476: 24.3.91; [PATCH] unimplemented info entry Shigeru Fukaya
2014-05-12 16:54 ` Eli Zaretskii
2014-05-12 17:34 ` Eli Zaretskii
2014-05-12 17:53 ` Shigeru Fukaya
2014-05-12 18:20 ` Shigeru Fukaya
2014-05-12 18:30 ` Eli Zaretskii
2014-05-12 19:01 ` Andreas Schwab
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).