bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#15189: 24.3.50; display-buffer does not work well with custom frames


From: martin rudalics
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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]