Received: by 10.66.80.98 with SMTP id q2mr4928553pax.33.1352482374581; Fri, 09 Nov 2012 09:32:54 -0800 (PST) Path: 6ni71611pbd.1!nntp.google.com!news.glorb.com!usenet.stanford.edu!not-for-mail From: Thorsten Jolitz Newsgroups: gnu.emacs.help Subject: Re: How to set 'buffer-save-without-query' from external program? Date: Fri, 09 Nov 2012 18:32:49 +0100 Lines: 35 Approved: help-gnu-em...@gnu.org Message-ID: References: <87fw4ivhe1.fsf@googlemail.com> <87bof6vgvj.fsf@googlemail.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 X-Trace: usenet.stanford.edu 1352482374 13886 208.118.235.17 (9 Nov 2012 17:32:54 GMT) X-Complaints-To: action@cs.stanford.edu To: help-gnu-em...@gnu.org Envelope-to: help-gnu-em...@gnu.org X-Injected-Via-Gmane: http://gmane.org/ X-Gmane-NNTP-Posting-Host: g231111005.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.0.93 (gnu/linux) Cancel-Lock: sha1:iF182DQp7jJljHiIEkJxnq6QMD0= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-em...@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain "Drew Adams" writes: >> > You should be able to use (set-buffer-modified-p nil) to >> > prevent such checks. >> >> But I want the buffer to be reverted and saved - only without being >> queried. Would this still happen if I set the set-buffer-modified-p >> flag to nil? > > Sorry, I don't have the time right now to get into it. > Hopefully someone else can help more. > > But "revert and save" doesn't mean much to me. > After reverting there is no need to save. > > Setting the modified-p flag just pretends that you have not modified > the buffer. So you get no queries about wanting to save it. > > If you instead do want to save it, then just save it, systematically. Ok, thanks for your help, I think this would do the job, but the error is probably in the emacsclient call, because it does not take effect on the buffer that should be closed without querying. If an external program opened a new emacsclient instance for editing, and the file opened in the editing buffer is set as the input channel for the external program - isn't that buffer automatically the target buffer for further emacsclient calls that evaluate elisp code via the "-e" option? -- cheers, Thorsten