GNU bug report logs - #15189
24.3.50; display-buffer does not work well with custom frames.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Mon, 26 Aug 2013 00:52:02 UTC

Severity: normal

Found in version 24.3.50

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Keith David Bershatsky <esq <at> lawlist.com>
Cc: 15189 <at> debbugs.gnu.org
Subject: bug#15189: 24.3.50; display-buffer does not work well with custom frames.
Date: Tue, 27 Aug 2013 08:47:19 +0200
> Using your suggestion of find-file-noselect works well with the initial example, and then just adding (switch-to-buffer (get-file-buffer buffer-filename)) to the tail end of the lawlist-display-buffer-function.

If you want to show a file-visiting buffer in the selected window, yes.
I'd rather add a rule that calls `display-buffer-same-window' and rewrite
the code

(when (lawlist-regexps-match-p ...)
  ...)
(when (lawlist-regexps-match-p ...)
  ...)

as

(cond
  ((lawlist-regexps-match-p ...)
   ...)
  ((lawlist-regexps-match-p ...)
   ...)
  (t
    (display-buffer-same-window ...)))

BTW you should also make code like

          (if (and
              (not (equal "MAIN" (frame-parameter frame 'name)))
              (not (equal "SYSTEM" (frame-parameter frame 'name)))
              (not (equal "ORG" (frame-parameter frame 'name)))
              (not (equal "WANDERLUST" (frame-parameter frame 'name)))
              (not (equal "MISCELLANEOUS" (frame-parameter frame 'name))) )

more readable by defining a variable like

(defvar my-regexp "^\\(?:MAIN\\|SYSTEM\\|ORG\\|WANDERLUST\\| MISCELLANEOUS\\)$"
  "My doc-string.")

and using
	    (not (string-match my-regexp (frame-parameter frame 'name)))

instead.

martin




This bug report was last modified 11 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.