GNU bug report logs -
#21047
25.0.50; Make M-x woman respect display-buffer-alist
Previous Next
Reported by: Kaushal <kaushal.modi <at> gmail.com>
Date: Mon, 13 Jul 2015 15:07:02 UTC
Severity: normal
Found in version 25.0.50
Done: martin rudalics <rudalics <at> gmx.at>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 21 Aug 2015 17:58:40 +0200
with message-id <55D74AB0.1030601 <at> gmx.at>
and subject line Re: bug#21047: 25.0.50; Make M-x woman respect display-buffer-alist
has caused the debbugs.gnu.org bug report #21047,
regarding 25.0.50; Make M-x woman respect display-buffer-alist
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
21047: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=21047
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Hi,
This was posted on the emacs-devel list a while back and it was suggested
that this be posted on bug-gnu-emacs.
The aim of this patch is that opening M-x woman buffers be controlled using
display-buffer-alist. Using display-buffer function instead of
switch-to-buffer function will allow the user to control how they want to
open the WoMan buffers (same window, other window, popup, etc)
The patch is below:
Date: Mon, 13 Jul 2015 11:00:39 -0400
Subject: [PATCH] Allow display-buffer-alist to control woman bufs
---
lisp/woman.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lisp/woman.el b/lisp/woman.el
index 75c3d2e..e903caa 100644
--- a/lisp/woman.el
+++ b/lisp/woman.el
@@ -1651,7 +1651,7 @@ Do not call directly!"
(setq woman-frame (make-frame)))))
(set-buffer (get-buffer-create bufname))
(condition-case nil
- (switch-to-buffer (current-buffer))
+ (display-buffer (current-buffer))
(error (pop-to-buffer (current-buffer))))
(buffer-disable-undo)
(setq buffer-read-only nil)
@@ -2061,14 +2061,14 @@ alist in `woman-buffer-alist' and return nil."
(if (zerop woman-buffer-number)
(let ((buffer (get-buffer (cdr (car woman-buffer-alist)))))
(if buffer
- (switch-to-buffer buffer)
+ (display-buffer buffer)
;; Delete alist element:
(setq woman-buffer-alist (cdr woman-buffer-alist))
nil))
(let* ((prev-ptr (nthcdr (1- woman-buffer-number) woman-buffer-alist))
(buffer (get-buffer (cdr (car (cdr prev-ptr))))))
(if buffer
- (switch-to-buffer buffer)
+ (display-buffer buffer)
;; Delete alist element:
(setcdr prev-ptr (cdr (cdr prev-ptr)))
(if (>= woman-buffer-number (length woman-buffer-alist))
--
1.9.2
On Wed, Jun 24, 2015 at 12:03 PM Michael Heerdegen <michael_heerdegen <at> web.de>
wrote:
> Hi Kaushal,
>
> > I was trying to make the WoMan buffers open as I intend to using
> > display-buffer-alist. But that was not working.
>
> I guess your message got lost here, better make a bug report, and
> better include a patch than the whole changed code.
>
> > can that change be made in the master?
>
> I think it would be an improvement.
>
> The very same applies to eww:
>
> --8<---------------cut here---------------start------------->8---
> (defun eww-setup-buffer ()
> (switch-to-buffer (get-buffer-create "*eww*")) ; <-----
> (let ((inhibit-read-only t))
> (remove-overlays)
> (erase-buffer))
> (unless (eq major-mode 'eww-mode)
> (eww-mode)))
> --8<---------------cut here---------------end--------------->8---
>
> Maybe there are more cases. It's surely worth discussing.
>
>
> Regards,
>
> Michael.
>
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
> I don't know how to close a debbugs. I believe only a debbugs admin can do
> that?
It's easy. You have to append -done to the bug number in the recipient.
As I'm doing just now ...
martin
This bug report was last modified 9 years and 278 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.