unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* master 30d4011b8a: Use substitute-command-keys in Info-index error
@ 2022-11-26 14:10 Eli Zaretskii
  2022-11-28  0:44 ` Stefan Kangas
  0 siblings, 1 reply; 2+ messages in thread
From: Eli Zaretskii @ 2022-11-26 14:10 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

> From: emacs-diffs-request@gnu.org
> Date: Sat, 26 Nov 2022 03:56:27 -0500
> 
> diff --git a/lisp/info.el b/lisp/info.el
> index 8860a664bd..7d44a1cec1 100644
> --- a/lisp/info.el
> +++ b/lisp/info.el
> @@ -3329,6 +3329,12 @@ If FILE is nil, check the current Info file."
>      (or node (error "No index"))
>      (Info-goto-node node)))
>  
> +(defun info--ensure-not-in-directory-node ()
> +  (if (equal Info-current-file "dir")
> +      (error (substitute-command-keys
> +              (concat "The Info directory node has no index; "
> +                      "type \\[Info-menu] to select a manual")))))

The new code doesn't handle the case where "DIR" is in upper-case, nor if
Info-current-file is something like "/usr/share/info/dir" (which can happen
if you say "C-u C-h i /usr/share/info/dir RET").

(Yes, the original code didn't handle these cases either.)



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

* Re: master 30d4011b8a: Use substitute-command-keys in Info-index error
  2022-11-26 14:10 master 30d4011b8a: Use substitute-command-keys in Info-index error Eli Zaretskii
@ 2022-11-28  0:44 ` Stefan Kangas
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Kangas @ 2022-11-28  0:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: emacs-diffs-request@gnu.org
>> Date: Sat, 26 Nov 2022 03:56:27 -0500
>>
>> diff --git a/lisp/info.el b/lisp/info.el
>> index 8860a664bd..7d44a1cec1 100644
>> --- a/lisp/info.el
>> +++ b/lisp/info.el
>> @@ -3329,6 +3329,12 @@ If FILE is nil, check the current Info file."
>>      (or node (error "No index"))
>>      (Info-goto-node node)))
>>
>> +(defun info--ensure-not-in-directory-node ()
>> +  (if (equal Info-current-file "dir")
>> +      (error (substitute-command-keys
>> +              (concat "The Info directory node has no index; "
>> +                      "type \\[Info-menu] to select a manual")))))
>
> The new code doesn't handle the case where "DIR" is in upper-case, nor if
> Info-current-file is something like "/usr/share/info/dir" (which can happen
> if you say "C-u C-h i /usr/share/info/dir RET").

Good catch.  I believe this has now been fixed with commit 059467ddc2.



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

end of thread, other threads:[~2022-11-28  0:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-26 14:10 master 30d4011b8a: Use substitute-command-keys in Info-index error Eli Zaretskii
2022-11-28  0:44 ` Stefan Kangas

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).