emacs-devel
[Top][All Lists]
Advanced

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

Re: [RFC] Added an option to store content of the *scratch* buffer in a


From: Michal Nazarewicz
Subject: Re: [RFC] Added an option to store content of the *scratch* buffer in a file.
Date: Fri, 7 Jun 2013 17:37:42 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

> On Wed,  5 Jun 2013 23:00:40 +0200 Michal Nazarewicz <address@hidden> 
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 <tzz <at> 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.




reply via email to

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