From: Joseph Turner via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 70213@debbugs.gnu.org
Subject: bug#70213: Info-mode side window fit-window-to-buffer issue
Date: Fri, 05 Apr 2024 18:34:11 -0700 [thread overview]
Message-ID: <87sezzs20t.fsf@breatheoutbreathe.in> (raw)
In-Reply-To: <87sezzfo22.fsf@gmx.net>
[-- Attachment #1: Type: text/plain, Size: 930 bytes --]
Stephen Berman <stephen.berman@gmx.net> writes:
> On Fri, 05 Apr 2024 14:58:27 -0700 Joseph Turner <joseph@breatheoutbreathe.in> wrote:
>
>> Stephen Berman <stephen.berman@gmx.net> writes:
>>> FWIW, I get the expected result with your recipe on master (GNU/Linux,
>>> Gtk3; I don't have emacs-29 at hand to test).
>>
>> According to the issue that Juri linked to (bug#68081), this issue was
>> resolved on master.
>
> Yes, I saw Juri's post after I sent mine; I had missed that bug report.
>
>> Was your Emacs build since January 6 (since
>> d3a4fe5694f7bd1a09546d67d2cddc0f444d41ca )?
>
> Yep, I'm currently at
> 09f381d70d8..: Michael Albinus 2024-03-31 Fix wildcard signals in dbusbind.c
The attached patch fixes this issue, but more would need to be done for
fit-window-to-buffer to be a meaningful value in display-buffer-alist,
since navigating between info nodes doesn't cause the window to resize.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Display-buffer-after-ensuring-it-contains-text.patch --]
[-- Type: text/x-diff, Size: 2436 bytes --]
From f8a2584e3927c149eb2b008de5cb27fb148f08e1 Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
Date: Fri, 5 Apr 2024 18:32:36 -0700
Subject: [PATCH] Display buffer after ensuring it contains text
* lisp/info.el (info-pop-to-buffer):
bug#70213
---
lisp/info.el | 44 +++++++++++++++++++++-----------------------
1 file changed, 21 insertions(+), 23 deletions(-)
diff --git a/lisp/info.el b/lisp/info.el
index 1e478cdbee9..fe134161af4 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -807,30 +807,28 @@ info-pop-to-buffer
(get-buffer-create "*info*")))))
(with-current-buffer buffer
(unless (derived-mode-p 'Info-mode)
- (Info-mode)))
+ (Info-mode))
+
+ (if file-or-node
+ ;; If argument already contains parentheses, don't add another set
+ ;; since the argument will then be parsed improperly. This also
+ ;; has the added benefit of allowing node names to be included
+ ;; following the parenthesized filename.
+ (Info-goto-node
+ (if (and (stringp file-or-node) (string-match "(.*)" file-or-node))
+ file-or-node
+ (concat "(" file-or-node ")")))
+ (if (and (zerop (buffer-size))
+ (null Info-history))
+ ;; If we just created the Info buffer, go to the directory.
+ (Info-directory))))
+
+ (when-let ((window (display-buffer buffer
+ (if other-window
+ '(nil (inhibit-same-window . t))
+ '(display-buffer-same-window)))))
+ (select-window window))))
- (let* ((window
- (display-buffer buffer
- (if other-window
- '(nil (inhibit-same-window . t))
- '(display-buffer-same-window)))))
- (with-current-buffer buffer
- (if file-or-node
- ;; If argument already contains parentheses, don't add another set
- ;; since the argument will then be parsed improperly. This also
- ;; has the added benefit of allowing node names to be included
- ;; following the parenthesized filename.
- (Info-goto-node
- (if (and (stringp file-or-node) (string-match "(.*)" file-or-node))
- file-or-node
- (concat "(" file-or-node ")")))
- (if (and (zerop (buffer-size))
- (null Info-history))
- ;; If we just created the Info buffer, go to the directory.
- (Info-directory))))
-
- (when window
- (select-window window)))))
;;;###autoload (put 'info 'info-file (purecopy "emacs"))
;;;###autoload
--
2.41.0
next prev parent reply other threads:[~2024-04-06 1:34 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 8:57 bug#70213: Info-mode side window fit-window-to-buffer issue Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-05 12:30 ` Eli Zaretskii
2024-04-05 15:04 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-05 15:33 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-05 21:58 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-05 22:21 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-06 1:34 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2024-04-06 1:55 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-06 2:36 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-06 11:39 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-06 17:19 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-06 18:39 ` Juri Linkov
2024-04-07 8:52 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 17:53 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 19:29 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 23:11 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-08 7:56 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-08 9:08 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-09 6:24 ` Juri Linkov
2024-04-09 9:03 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-08 11:04 ` Eli Zaretskii
[not found] ` <87ttkaij8v.fsf@breatheoutbreathe.in>
2024-04-09 18:24 ` Eli Zaretskii
2024-04-10 5:12 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-10 8:47 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-10 17:40 ` Juri Linkov
2024-04-11 9:17 ` martin rudalics via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-12 6:45 ` Juri Linkov
2024-04-12 7:12 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-06 19:19 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 1:59 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 9:30 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 17:47 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 19:29 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 20:07 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 20:51 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 22:13 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 22:35 ` Stephen Berman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-07 23:06 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-05 16:09 ` Juri Linkov
2024-04-05 21:57 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sezzs20t.fsf@breatheoutbreathe.in \
--to=bug-gnu-emacs@gnu.org \
--cc=70213@debbugs.gnu.org \
--cc=joseph@breatheoutbreathe.in \
--cc=stephen.berman@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).