From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: Re: bug#8225: 23.3; wish: hook to run when manually creating a buffer with C-x b (be able to save all created buffers at creation time) Date: Fri, 11 Mar 2011 13:27:37 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87pqpxfoeu.fsf@lifelogs.com> References: <87mxl2k1al.fsf@yahoo.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1299872418 11604 80.91.229.12 (11 Mar 2011 19:40:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 11 Mar 2011 19:40:18 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Mar 11 20:40:14 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Py8C0-0006Fd-K3 for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2011 20:40:08 +0100 Original-Received: from localhost ([127.0.0.1]:49462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Py8C0-0002G9-3F for geb-bug-gnu-emacs@m.gmane.org; Fri, 11 Mar 2011 14:40:08 -0500 Original-Path: usenet.stanford.edu!news-transit.tcx.org.uk!news.albasani.net!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 24 Original-X-Trace: news.albasani.net YUTZcnp5Cr82QlPvQbcZIKRfVe/b4n/U4av74VuZcnjOxpSF6xhk/c97qkMldM3GM+z2r6rI6uPLHA3GwU6y/G9ekLuGjCNjGyYdgN0fTmAgNCEn5eGj6D3GxUUSHDmG Original-NNTP-Posting-Date: Fri, 11 Mar 2011 19:27:37 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="m6UmNXwC+0kv5ZOhHgtVBcChTlK240BcEQxphYATwhXEGYxpHoWh/tuvkI10pISEK/Zi2713Pnx9lbqMZnt+W81XMnUAudUCvOyaoEkU9gvnJ7VeAK7QShrQj1fEFFo+"; mail-complaints-to="abuse@albasani.net" User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:YgQMz1MxwKl1SDRnU+RM3xx/qqM= sha1:sL8Kxta8v4gvSyOKLwpelQ9rVR0= Original-Xref: usenet.stanford.edu gnu.emacs.bug:72231 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:44926 Archived-At: On Thu, 10 Mar 2011 21:29:01 -0500 Stefan Monnier wrote: >> Essentially I want to turn the manual creation of a new buffer into a >> persistent new-file creation so I as user don’t have to think about the >> target location (this is in line with basket and KJots and other quick >> note programs which make it unnecessary for the user to think about save >> locations before writing content - but still save the content). SM> Since internal buffers get created all the time, it seems clear you SM> really only want to do that in response to C-x b, right. SM> Or are there other cases? SM> One simple approach is to replace C-x b by a new command that does SM> little more than (find-file (format "~/.emacs.d/data/%s-%s" name date)). Would it be useful to add saving the buffer contents to session.el instead? So any buffers with a visible name (not starting with SPC or `*') are saved as part of your session? session.el already saves the user's place in the buffer so this is probably not too hard to add. It feels like it could be useful functionality, for information that's useful but not yet permanent, like temporary notes or code snippets. Ted