From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>,
emacs-devel@gnu.org
Subject: Re: Emacs server without emacsserver.
Date: Mon, 21 Oct 2002 08:55:03 -0400 [thread overview]
Message-ID: <200210211255.g9LCt3P15521@rum.cs.yale.edu> (raw)
In-Reply-To: m3smz0hgh1.fsf@loiso.podval.org
> the "offending code" (after ";; Ok, ...") should be abstracted to the
> function `server-switch-buffer-default' of one argument (the buffer to
> be displayed), and `server-switch-buffer' should call the function
> which is the value of the variable `server-display-function', which is
> by default set to `server-switch-buffer-default'.
>
> You and I will set `server-display-function' to `pop-to-buffer' and
> people who like the default will keep the default.
I was thinking instead of allowing server-window to be set to such
a function, so you can just (setq server-window 'pop-to-buffer).
Stefan
--- server.el.~1.84.~ Fri Sep 27 17:55:20 2002
+++ server.el Mon Oct 21 08:54:01 2002
@@ -117,7 +117,9 @@
(defvar server-window nil
"*The window to use for selecting Emacs server buffers.
If nil, use the selected window.
-If it is a frame, use the frame's selected window.")
+If it is a frame, use the frame's selected window.
+If it is a function, it should take one argument (a buffer)
+and display and select it.")
(defcustom server-temp-file-regexp "^/tmp/Re\\|/draft$"
"*Regexp which should match filenames of temporary files
@@ -540,6 +544,8 @@
;; and try the next surviving server buffer.
(apply 'server-switch-buffer (server-buffer-done next-buffer))
;; OK, we know next-buffer is live, let's display and select it.
+ (if (functionp server-window)
+ (funcall server-window next-buffer)
(let ((win (get-buffer-window next-buffer 0)))
(if (and win (not server-window))
;; The buffer is already displayed: just reuse the window.
@@ -571,7 +577,7 @@
(switch-to-buffer next-buffer)
;; After all the above, we might still have ended up with
;; a minibuffer/dedicated-window (if there's no other).
- (error (pop-to-buffer next-buffer))))))))
+ (error (pop-to-buffer next-buffer)))))))))
next prev parent reply other threads:[~2002-10-21 12:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-17 20:10 Emacs server without emacsserver Stefan Monnier
[not found] ` <E17s34A-0006oU-00@fencepost.gnu.org>
[not found] ` <200209191632.g8JGWV408480@rum.cs.yale.edu>
[not found] ` <E17sEim-00081r-00@fencepost.gnu.org>
2002-09-20 18:41 ` Stefan Monnier
2002-09-21 0:58 ` Kim F. Storm
2002-09-21 19:39 ` Richard Stallman
2002-09-22 22:30 ` Stefan Monnier
2002-09-23 15:59 ` Richard Stallman
2002-10-16 21:50 ` Sam Steingold
2002-10-20 5:34 ` Richard Stallman
2002-10-20 19:57 ` Stefan Monnier
2002-10-20 22:51 ` Sam Steingold
2002-10-21 12:55 ` Stefan Monnier [this message]
2002-10-21 14:11 ` Sam Steingold
2002-12-27 19:10 ` Richard Stallman
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=200210211255.g9LCt3P15521@rum.cs.yale.edu \
--to=monnier+gnu/emacs@rum.cs.yale.edu \
--cc=emacs-devel@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.