unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "Daniel Martín" <mardani29@yahoo.es>
Cc: 56772@debbugs.gnu.org
Subject: bug#56772: 29.0.50; regexp-builder window is very tall when temp-buffer-resize-mode is enabled
Date: Wed, 27 Jul 2022 10:35:23 +0300	[thread overview]
Message-ID: <86zggv9fes.fsf@mail.linkov.net> (raw)
In-Reply-To: <m11qu8eq5f.fsf@yahoo.es> ("Daniel Martín via \"Bug reports for GNU Emacs, the Swiss army knife of text editors\""'s message of "Tue, 26 Jul 2022 01:19:56 +0200")

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

> Expected result:
>
> The regexp-builder window takes 4 lines, just as when
> temp-buffer-resize-mode is not enabled.
>
> Workaround:
>
> Calling M-x fit-window-to-buffer after M-x regexp-builder resizes the
> window successfully.

Before 57354bc6 it was hard-coded to 4, so a possible fix would be

              (window-height . ,(+ (if header-line-format 1 0)
                                   (if tab-line-format 1 0)
                                   4))

But a better fix is this:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: re-builder-fit-window-to-buffer.patch --]
[-- Type: text/x-diff, Size: 520 bytes --]

diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 46b429ce6f..84018f06ac 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -369,7 +369,8 @@ re-builder
             (get-buffer-create reb-buffer)
             `((display-buffer-in-direction)
               (direction . ,dir)
-              (dedicated . t))))))
+              (dedicated . t)
+              (window-height . fit-window-to-buffer))))))
     (font-lock-mode 1)
     (reb-initialize-buffer)))
 

[-- Attachment #3: Type: text/plain, Size: 95 bytes --]


I don't know why it resizes to less lines with tab-line-mode,
but this is a separate problem.

  parent reply	other threads:[~2022-07-27  7:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m11qu8eq5f.fsf.ref@yahoo.es>
2022-07-25 23:19 ` bug#56772: 29.0.50; regexp-builder window is very tall when temp-buffer-resize-mode is enabled Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-26 12:38   ` Lars Ingebrigtsen
2022-07-26 13:03     ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-27  9:33       ` Lars Ingebrigtsen
2022-07-27  7:35   ` Juri Linkov [this message]
2022-09-05 18:58     ` Lars Ingebrigtsen

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=86zggv9fes.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=56772@debbugs.gnu.org \
    --cc=mardani29@yahoo.es \
    /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).