From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Constantin Kulikov Newsgroups: gmane.emacs.bugs Subject: bug#13251: Wishlist: Add ability to set initial buffer for new frames. Date: Sat, 22 Dec 2012 23:18:28 +0300 Message-ID: References: <50D5D4DD.5020905@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=f46d044280e8cf8aec04d176aafb X-Trace: ger.gmane.org 1356207529 4350 80.91.229.3 (22 Dec 2012 20:18:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Dec 2012 20:18:49 +0000 (UTC) Cc: 13251@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 22 21:19:03 2012 Return-path: Envelope-to: geb-bug-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 1TmVXB-0002IT-Ih for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Dec 2012 21:19:01 +0100 Original-Received: from localhost ([::1]:38189 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmVWx-0008H5-Lw for geb-bug-gnu-emacs@m.gmane.org; Sat, 22 Dec 2012 15:18:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:51101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmVWt-0008G9-54 for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 15:18:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TmVWr-0008IW-Oo for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 15:18:43 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45631) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TmVWr-0008IS-Ka for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 15:18:41 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TmVXC-0002MP-5w for bug-gnu-emacs@gnu.org; Sat, 22 Dec 2012 15:19:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Constantin Kulikov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 22 Dec 2012 20:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13251 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13251-submit@debbugs.gnu.org id=B13251.13562075339053 (code B ref 13251); Sat, 22 Dec 2012 20:19:02 +0000 Original-Received: (at 13251) by debbugs.gnu.org; 22 Dec 2012 20:18:53 +0000 Original-Received: from localhost ([127.0.0.1]:55882 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TmVX2-0002Lx-Qu for submit@debbugs.gnu.org; Sat, 22 Dec 2012 15:18:53 -0500 Original-Received: from mail-wi0-f175.google.com ([209.85.212.175]:34797) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TmVX0-0002Lp-Bp for 13251@debbugs.gnu.org; Sat, 22 Dec 2012 15:18:51 -0500 Original-Received: by mail-wi0-f175.google.com with SMTP id hm11so5796776wib.2 for <13251@debbugs.gnu.org>; Sat, 22 Dec 2012 12:18:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=2py6H3ip3RJ6ANcX/lIZIEiEG9bEWvGbFouAI+cr3Io=; b=e4ZdlmSNSHTfb7iBzbzLlBCAeMwowXc3ZVEKwEavNe0NolaOR+0BKf9FggPeW/9U6B 5ikSQ86CDQrDTZdQLRxGADkd/6H5kbiFLUAbatnBoHg/o6E9geVOf9bxQYm7YytKXjIB 7K5l5qx7gAJuyW2FpRZL37tz+yfYBg/jQNC6cHoAkNNW7AuqhkxVjW3DaJZHn+S42Y5e znC+kCzqyYSQseS4qg/9yT6uydsvkrkVWW0C4eBoiDAYbaneF9iK+wC9BQtGrXpeY7Ha 8YCZLZTuJvad3OZ42hi7uGyWWBCtX2yHaKIZ1sEx5JydMyzMyhamSSFJqSlXD8VM9fjL oriQ== Original-Received: by 10.180.101.99 with SMTP id ff3mr28962929wib.21.1356207508916; Sat, 22 Dec 2012 12:18:28 -0800 (PST) Original-Received: by 10.217.47.138 with HTTP; Sat, 22 Dec 2012 12:18:28 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:68923 Archived-At: --f46d044280e8cf8aec04d176aafb Content-Type: multipart/alternative; boundary=f46d044280e8cf8ae704d176aaf9 --f46d044280e8cf8ae704d176aaf9 Content-Type: text/plain; charset=UTF-8 argh. :( Sorry made a small typo in patch attached in previous message. 2012/12/22 Constantin Kulikov > Thanks for the tips. > > > > 2012/12/22 martin rudalics > >> > (defcustom initial-buffer-choice nil >> > "Buffer to show after starting Emacs. >> > If the value is nil and `inhibit-startup-screen' is nil, show the >> > startup screen. If the value is a string, visit the specified file >> > or directory using `find-file'. If t, open the `*scratch*' >> > buffer. If function, switch to a buffer returned by this function. >> >> As for the last sentence I'd prefer "If it is a function, switch to the >> buffer returned by that function." >> >> > A string value also causes emacsclient to open the specified file >> > or directory when no target file is specified." >> > :type '(choice >> > (const :tag "Startup screen" nil) >> > (directory :tag "Directory" :value "~/") >> > (file :tag "File" :value "~/.emacs") >> > (function :tag "Function") >> > (const :tag "Lisp scratch buffer" t)) >> > :version "23.1" >> >> Too late for "23.1" use "24.4" instead. >> >> > :group 'initialization) >> > >> > This code allows setting `initial-buffer-choice' to a function returning >> > needed buffer. >> >> Could you please send us a patch based on these remarks (including the >> change you sketched in your second mail)? >> >> Thanks, martin >> > > --f46d044280e8cf8ae704d176aaf9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
argh. :( Sorry made a small typo in patch attached in= previous message.



2012/12/22 Constantin Kulikov &l= t;zxnotdead@gmail.= com>
Thanks for the tips.


2012/12/22 martin rudalics <rudalics@gmx.= at>
> (defcustom initial-buffer-choice nil > =C2=A0 "Buffer to show after starting Emacs.
> If the value is nil and `inhibit-startup-screen' is nil, show the<= br> > startup screen. =C2=A0If the value is a string, visit the specified fi= le
> or directory using `find-file'. =C2=A0If t, open the `*scratch*= 9;
> buffer. If function, switch to a buffer returned by this function.

As for the last sentence I'd prefer "If it is a function, switch t= o the
buffer returned by that function."

> A string value also causes emacsclient to open the specified file
> or directory when no target file is specified."
> =C2=A0 :type '(choice
> =C2=A0 =C2=A0 =C2=A0 (const =C2=A0 =C2=A0 :tag "Startup screen&qu= ot; nil)
> =C2=A0 =C2=A0 =C2=A0 (directory :tag "Directory" :value &quo= t;~/")
> =C2=A0 =C2=A0 =C2=A0 (file =C2=A0 =C2=A0 =C2=A0:tag "File" := value "~/.emacs")
> =C2=A0 =C2=A0 =C2=A0 (function =C2=A0:tag "Function")
> =C2=A0 =C2=A0 =C2=A0 (const =C2=A0 =C2=A0 :tag "Lisp scratch buff= er" t))
> =C2=A0 :version "23.1"

Too late for "23.1" use "24.4" instead.

> =C2=A0 :group 'initialization)
>
> This code allows setting `initial-buffer-choice' to a function ret= urning
> needed buffer.

Could you please send us a patch based on these remarks (including the
change you sketched in your second mail)?

Thanks, martin


--f46d044280e8cf8ae704d176aaf9-- --f46d044280e8cf8aec04d176aafb Content-Type: application/octet-stream; name="initial-buffer-choice-as-function.patch" Content-Disposition: attachment; filename="initial-buffer-choice-as-function.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hb16q6ww1 PT09IG1vZGlmaWVkIGZpbGUgJ2xpc3Avc2VydmVyLmVsJwotLS0gbGlzcC9zZXJ2ZXIuZWwJMjAx Mi0xMS0wOSAwNjoyODoyNyArMDAwMAorKysgbGlzcC9zZXJ2ZXIuZWwJMjAxMi0xMi0yMiAxOToz Njo1NyArMDAwMApAQCAtMTI1NiwxMiArMTI1NiwxOCBAQAogICAgICAgICAgIChtYXBjICdmdW5j YWxsIChucmV2ZXJzZSBjb21tYW5kcykpCiAKIAkgIDs7IElmIHdlIHdlcmUgdG9sZCBvbmx5IHRv IG9wZW4gYSBuZXcgY2xpZW50LCBvYmV5Ci0JICA7OyBgaW5pdGlhbC1idWZmZXItY2hvaWNlJyBp ZiBpdCBzcGVjaWZpZXMgYSBmaWxlLgotCSAgKHVubGVzcyAob3IgZmlsZXMgY29tbWFuZHMpCi0J ICAgIChpZiAoc3RyaW5ncCBpbml0aWFsLWJ1ZmZlci1jaG9pY2UpCi0JCShmaW5kLWZpbGUgaW5p dGlhbC1idWZmZXItY2hvaWNlKQotCSAgICAgIChzd2l0Y2gtdG8tYnVmZmVyIChnZXQtYnVmZmVy LWNyZWF0ZSAiKnNjcmF0Y2gqIikKLQkJCQknbm9yZWNvcmQpKSkKKwkgIDs7IGBpbml0aWFsLWJ1 ZmZlci1jaG9pY2UnIGlmIGl0IHNwZWNpZmllcyBhIGZpbGUKKyAgICAgICAgICA7OyBvciBhIGZ1 bmN0aW9uCisgICAgICAgICAgKHVubGVzcyAob3IgZmlsZXMgY29tbWFuZHMpCisgICAgICAgICAg ICAoc3dpdGNoLXRvLWJ1ZmZlcgorICAgICAgICAgICAgIChnZXQtYnVmZmVyLWNy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