From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michal Nazarewicz Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Added an option to store content of the *scratch* buffer =?utf-8?b?aW4JYQ==?= file. Date: Fri, 7 Jun 2013 17:37:42 +0000 (UTC) Message-ID: References: <87bo7jwg2t.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1370628013 14484 80.91.229.3 (7 Jun 2013 18:00:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Jun 2013 18:00:13 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 07 20:00:14 2013 Return-path: Envelope-to: ged-emacs-devel@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 1Ul0xS-0002uq-8I for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 20:00:14 +0200 Original-Received: from localhost ([::1]:40375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul0xR-0007BK-V4 for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 14:00:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul0xO-00079Q-4P for emacs-devel@gnu.org; Fri, 07 Jun 2013 14:00:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ul0xJ-0001Y1-E6 for emacs-devel@gnu.org; Fri, 07 Jun 2013 14:00:10 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:55211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul0xJ-0001V7-7E for emacs-devel@gnu.org; Fri, 07 Jun 2013 14:00:05 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ul0xH-0002kJ-Vl for emacs-devel@gnu.org; Fri, 07 Jun 2013 20:00:04 +0200 Original-Received: from 74.125.122.33 ([74.125.122.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Jun 2013 20:00:03 +0200 Original-Received: from mina86 by 74.125.122.33 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Jun 2013 20:00:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 33 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 74.125.122.33 (Opera/9.80 (X11; Linux x86_64) Presto/2.12.388 Version/12.15) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:160244 Archived-At: > On Wed, 5 Jun 2013 23:00:40 +0200 Michal Nazarewicz wrote: > MN> I've been using this functionality for years now and, in my opinion, > MN> it's absolutely awesome. It makes *scratch* to extremely useful > MN> buffer indeed! Ted Zlatanov lifelogs.com> writes: > I like it! > > I would make the parameter accept a string (a file name) instead of > 'file: > > nil => old default behavior > t => concat(emacs-directory "scratch") > "filename" => use that file > > That way I can save my scratch buffer in a custom directory (something > available over the network for instance). It is doable except probably with a new variable. initial-scratch-message already accepts string as value which means to insert that string to the *scratch* buffer, so it cannot be reused as a file name. Of course, a list could be used to indicate file, eg.: (null initial-scratch-message) ⇒ don't do anything with *scratch* (old behaviour) (stringp initial-scratch-message) ⇒ insert the string to *scratch* (old behaviour) (listp initial-scratch-message) ⇒ insert content of (car initial-scratch-message) (new behaviour) I'm not entirely convinced that's user-friendly though so alternatively a new scratch-file-name defcustom could be added.