Subject: bug#57936: closed (Re: bug#57936: 29.0.50; Make info treat "\n" in node names as "\s")

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 13 Oct 2022 14:04:02 +0000

Your bug report

#57936: 29.0.50; Make info treat "\n" in node names as "\s"

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
57936: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57936
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#57936: 29.0.50; Make info treat "\n" in node names as "\s"
From: Stefan Kangas <[email-masked]>
To: Lars Ingebrigtsen <[email-masked]>
Cc: [email-masked]
Date: Thu, 13 Oct 2022 16:03:48 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Lars Ingebrigtsen <[email-masked]> writes:

> Stefan Kangas <[email-masked]> writes:
>
>> So I think it would be nice if `info' would just treat the node name
>> "(elisp) Interactive\nExamples" as "(elisp) Interactive Examples".  See
>> the attached patch.
>>
>> Thoughts?
>
> Makes sense to me, but:
>
>> +  (setq file-or-node
>> +        (replace-regexp-in-string "\n" " " file-or-node))
>
> `string-replace', I think.

Thanks, pushed with that change.

Subject: 29.0.50; Make info treat "\n" in node names as "\s"
From: Stefan Kangas <[email-masked]>
To: [email-masked]
Date: Mon, 19 Sep 2022 12:12:38 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Severity: wishlist
Tags: patch

I often find myself writing an email, and I paste something like:

(info "(elisp) Interactive Examples")

But it sometimes ends up wrapped over two lines and I need to manually
adjust it back from something like:

(info "(elisp) Interactive
Examples")

And then I have to fiddle around with the formatting, which is just a
bit boring.

So I think it would be nice if `info' would just treat the node name
"(elisp) Interactive\nExamples" as "(elisp) Interactive Examples".  See
the attached patch.

Thoughts?
From e48e2dafe66900c5ad4fcd8e45bfce8a5b55fe3c Mon Sep 17 00:00:00 2001
From: Stefan Kangas <[email-masked]>
Date: Mon, 19 Sep 2022 18:08:47 +0200
Subject: [PATCH] Make info treat "\n" in node names as "\s"

---
 lisp/info.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lisp/info.el b/lisp/info.el
index 292bf93a6f..864f812fd6 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -763,6 +763,10 @@ info
                     (read-file-name "Info file name: " nil nil t))
                 (if (numberp current-prefix-arg)
                     (format "*info*<%s>" current-prefix-arg))))
+  ;; Info nodes don't contain newlines, so allow for easier use of
+  ;; wrapped info node names in emails, etc.
+  (setq file-or-node
+        (replace-regexp-in-string "\n" " " file-or-node))
   (info-setup file-or-node
 	      (pop-to-buffer-same-window (or buffer "*info*"))))
 
-- 
2.30.2