From: Michal Nazarewicz <mina86@mina86.com>
To: emacs-devel@gnu.org
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) [thread overview]
Message-ID: <loom.20130607T192838-4@post.gmane.org> (raw)
In-Reply-To: 87bo7jwg2t.fsf@lifelogs.com
> On Wed, 5 Jun 2013 23:00:40 +0200 Michal Nazarewicz <mpn@google.com>
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.
next prev parent reply other threads:[~2013-06-07 17:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-05 21:00 [RFC] Added an option to store content of the *scratch* buffer in a file Michal Nazarewicz
2013-06-06 12:59 ` Ted Zlatanov
2013-06-07 17:37 ` Michal Nazarewicz [this message]
2013-06-07 21:46 ` Ted Zlatanov
2013-06-07 18:06 ` Glenn Morris
2013-06-07 22:42 ` Michal Nazarewicz
2013-06-08 1:25 ` Stefan Monnier
2013-06-10 9:33 ` Michal Nazarewicz
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=loom.20130607T192838-4@post.gmane.org \
--to=mina86@mina86.com \
--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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).