From: pillule <pillule@riseup.net>
To: 49069@debbugs.gnu.org
Subject: bug#49069: 28.0.50; [PATCH] Use display-buffer for re-builder
Date: Thu, 17 Jun 2021 03:16:43 +0200 [thread overview]
Message-ID: <87r1h1jnf2.fsf@riseup.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
Hi, I wished re-builder was in a dedicated window (otherwise killing its buffer let you with an unwanted buffer in a narrow window), so I wrote a patch about it.
It also have the benefit to uses display-buffer and so, to allow user-customization.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: re-builder with display-buffer --]
[-- Type: text/x-diff, Size: 1589 bytes --]
From 388e4e63646af79b537e25fc92f3c3933819a18c Mon Sep 17 00:00:00 2001
From: Trust me I am a doctor <pillule@riseup.net>
Date: Thu, 17 Jun 2021 03:07:57 +0200
Subject: [PATCH] Use display-buffer for re-builder
* lisp/emacs-lisp/re-builder.el (re-builder): Uses 'display-buffer'
with 'display-buffer-in-direction' to display the reb-buffer. This
allow user-customizations. Add a dedication to its window so
killing this buffer actually quit its window.
---
lisp/emacs-lisp/re-builder.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 7d042a9102..39bb0b36ba 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -355,11 +355,13 @@ re-builder
(reb-delete-overlays))
(setq reb-target-buffer (current-buffer)
reb-target-window (selected-window))
- (select-window (or (get-buffer-window reb-buffer)
- (progn
- (setq reb-window-config (current-window-configuration))
- (split-window (selected-window) (- (window-height) 4)))))
- (switch-to-buffer (get-buffer-create reb-buffer))
+ (select-window
+ (or (get-buffer-window reb-buffer)
+ (progn (setq reb-window-config (current-window-configuration))
+ (display-buffer (get-buffer-create reb-buffer)
+ '((display-buffer-in-direction)
+ (direction . down)
+ (dedicated . t))))))
(font-lock-mode 1)
(reb-initialize-buffer)))
--
2.20.1
[-- Attachment #3: Type: text/plain, Size: 4 bytes --]
--
next reply other threads:[~2021-06-17 1:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 1:16 pillule [this message]
2021-06-17 4:10 ` bug#49069: 28.0.50; [PATCH] Use display-buffer for re-builder pillule
2021-06-17 14:50 ` pillule
2021-06-29 15:51 ` Trust me I am a Doctor
2021-06-29 20:47 ` Juri Linkov
2021-06-29 21:50 ` Trust me I am a Doctor
2021-06-30 19:49 ` Juri Linkov
2021-07-08 15:18 ` Trust me I am a Doctor
2021-07-08 17:40 ` Juri Linkov
2021-07-08 21:12 ` Trust me I am a Doctor
[not found] ` <87bl7c5wgl.fsf@riseup.net>
[not found] ` <7355eaf3-5ae2-46e7-80f5-d3d23ffff7d8@Spark>
2021-07-09 9:00 ` bug#49069: Fwd: " Trust me I am a Doctor
2021-07-08 18:38 ` Constantine Vetoshev
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r1h1jnf2.fsf@riseup.net \
--to=pillule@riseup.net \
--cc=49069@debbugs.gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.