From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: Overriding switch to *scratch* buffer after creating new frame with 'emacsclient -c' Date: Thu, 20 Dec 2012 15:46:07 +0100 Message-ID: <8738z0ok7k.fsf@zigzag.favinet> References: <50D2F0FD.30804@gmx.at> <50D3181F.6010008@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1356014721 27951 80.91.229.3 (20 Dec 2012 14:45:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Dec 2012 14:45:21 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: martin rudalics Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 20 15:45:34 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TlhNL-0006ZY-Jr for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Dec 2012 15:45:31 +0100 Original-Received: from localhost ([::1]:54337 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlhN7-0004zu-M1 for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Dec 2012 09:45:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40076) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlhMx-0004xh-95 for help-gnu-emacs@gnu.org; Thu, 20 Dec 2012 09:45:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TlhMw-0001x5-3I for help-gnu-emacs@gnu.org; Thu, 20 Dec 2012 09:45:07 -0500 Original-Received: from smtp209.alice.it ([82.57.200.105]:46352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TlhMv-0001pe-Ox for help-gnu-emacs@gnu.org; Thu, 20 Dec 2012 09:45:06 -0500 Original-Received: from zigzag.favinet (79.40.15.131) by smtp209.alice.it (8.6.058.01) id 50AA08F4053D42DB; Thu, 20 Dec 2012 15:45:01 +0100 Original-Received: from ttn by zigzag.favinet with local (Exim 4.72) (envelope-from ) id 1TlhO4-0000g4-6X; Thu, 20 Dec 2012 15:46:16 +0100 In-Reply-To: <50D3181F.6010008@gmx.at> (martin rudalics's message of "Thu, 20 Dec 2012 14:52:31 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 82.57.200.105 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:88249 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () martin rudalics () Thu, 20 Dec 2012 14:52:31 +0100 > (unless (or files commands) > (let ((type (type-of initial-buffer-choice)) > (buf "*scratch*")) > (cond > ((eq 'string type) (setq buf (find-file-noselect initial-buffer-c= hoice))) > ((eq 'buffer type) (when (buffer-live-p initial-buffer-choice) > (setq buf initial-buffer-choice)))) > (switch-to-buffer (get-buffer-create buf) 'norecord))) Looks good to me. It would be better w/o local vars and =E2=80=98setq=E2=80=99, though. =2D-=20 Thien-Thi Nguyen ..................................... GPG key: 4C807502 . NB: ttn at glug dot org is not me . . (and has not been since 2007 or so) . . ACCEPT NO SUBSTITUTES . ........... please send technical questions to mailing lists ........... --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAlDTJLIACgkQZwMiJEyAdQJt1ACdGEpKmoF5EJTJOpVGA8XSeN3c 0l4AnAj13py3j81nUYpNpvnpkkMFxxVq =KSfJ -----END PGP SIGNATURE----- --=-=-=--