From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: [RFC] Added an option to store content of the *scratch* buffer in a file. Date: Fri, 07 Jun 2013 14:06:14 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1370628381 17724 80.91.229.3 (7 Jun 2013 18:06:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Jun 2013 18:06:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michal Nazarewicz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jun 07 20:06:22 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 1Ul13N-0008Sk-76 for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 20:06:21 +0200 Original-Received: from localhost ([::1]:42410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul13M-0000F1-Pq for ged-emacs-devel@m.gmane.org; Fri, 07 Jun 2013 14:06:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48456) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul13I-0000Ew-MP for emacs-devel@gnu.org; Fri, 07 Jun 2013 14:06:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ul13H-0003XW-Q0 for emacs-devel@gnu.org; Fri, 07 Jun 2013 14:06:16 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58739) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ul13H-0003XP-Mh for emacs-devel@gnu.org; Fri, 07 Jun 2013 14:06:15 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Ul13G-0006OR-Sb; Fri, 07 Jun 2013 14:06:14 -0400 X-Spook: South Africa COSCO Aladdin ASLET quarter Ft. Bragg CIDA X-Ran: )hT5tyc,6d9T+OI:>F|xtX|c5kf4#Aq|^$~OpMk!ZN.4E[0G|JGq"&QmsN~27[H5LDY,VH X-Hue: magenta X-Attribution: GM In-Reply-To: (Michal Nazarewicz's message of "Wed, 5 Jun 2013 23:00:40 +0200") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e 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:160245 Archived-At: Michal Nazarewicz wrote: > +** `initial-scratch-message' can now be 'file which makes content of > +the *scratch* buffer to be kept in a file. This makes it possible to > +keep notes which will persist even when Emacs restarts in that buffer. Seems like a bad UI to (ab)use initial-scratch-message for this. Also, it's not really a scratch buffer if it gets saved, is it? Maybe extending `initial-buffer-choice' would be better? > +(defun scratch--custom-set (symbol value) > + (set-default symbol value) > + ;; This function is called by defcustom so > + ;; set-scratch-buffer-variables may be unbound yet. > + (when (fboundp 'set-scratch-buffer-variables) > + (set-scratch-buffer-variables))) Probably you don't need that dance if you use: :set 'scratch--custom-set :initialize: 'custom-initialize-default