From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Anselm Helbig Newsgroups: gmane.emacs.help Subject: Re: elisp: howto save not-visible buffer Date: Fri, 24 Apr 2009 22:14:58 +0200 Organization: Freie Universitaet Berlin Message-ID: <87bpqln70d.wl%anselm.helbig+news2009@googlemail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1240626073 29910 80.91.229.12 (25 Apr 2009 02:21:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 25 Apr 2009 02:21:13 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Apr 25 04:22:33 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LxXXD-00006b-3I for geh-help-gnu-emacs@m.gmane.org; Sat, 25 Apr 2009 04:22:31 +0200 Original-Received: from localhost ([127.0.0.1]:53137 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LxXVn-00030w-QE for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Apr 2009 22:21:03 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!newshub.sdsu.edu!feeder.erje.net!news.netcologne.de!newsfeed-fusi2.netcologne.de!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 28 Original-X-Trace: news.uni-berlin.de g/x2Ve5yIgNY9ozeQz+QrQW8jHdf/etmS188lR1xjtCiyaXG0G4L7ommc1 Cancel-Lock: sha1:jSOPGmw9JdhYVbyEgYpD6W27gVA= In-Reply-To: Mail-Followup-To: anselm.helbig+news2009@googlemail.com User-Agent: SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (=?ISO-8859-4?Q?Shij=F2?=) APEL/10.7 Emacs/22.3 (i686-pc-linux-gnu) MULE/5.0 (SAKAKI) Original-Xref: news.stanford.edu gnu.emacs.help:168739 X-Mailman-Approved-At: Fri, 24 Apr 2009 22:19:50 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:64012 Archived-At: Hi! > Hallo, > can I save buffer that is not current one? > > something like that: > (setq buf (find-file-noselect "/some/file")) > (save-buffer buf) > > I see that 'save-buffer' does not get any parameter:( Well, then you should make the buffer you want to save the current one: (save-excursion (set-buffer (setq buf (find-file-noselect "/some/file"))) (save-buffer buf)) save-excursion will make sure that the current buffer is restored when you're done. HTH, Anselm -- Anselm Helbig mailto:anselm.helbig+news2009@googlemail.com