From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rusi Newsgroups: gmane.emacs.help Subject: Re: List of buffers under version control? Date: Wed, 27 Jul 2016 21:05:21 -0700 (PDT) Message-ID: <006fed39-43f3-40aa-a72b-c736ba9bf86c@googlegroups.com> References: <877fc6wrv7.fsf@linux-qg7d.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1469679032 15769 80.91.229.3 (28 Jul 2016 04:10:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 04:10:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 28 06:10:32 2016 Return-path: Envelope-to: geh-help-gnu-emacs@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 1bSceV-0006XK-TW for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 06:10:32 +0200 Original-Received: from localhost ([::1]:50734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSceR-0001KM-84 for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 00:10:27 -0400 X-Received: by 10.157.47.242 with SMTP id b47mr18446165otd.24.1469678724896; Wed, 27 Jul 2016 21:05:24 -0700 (PDT) X-Received: by 10.36.227.207 with SMTP id d198mr1338565ith.4.1469678722178; Wed, 27 Jul 2016 21:05:22 -0700 (PDT) Original-Path: usenet.stanford.edu!f6no5304472ith.0!news-out.google.com!d130ni16791ith.0!nntp.google.com!f6no5304466ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: <877fc6wrv7.fsf@linux-qg7d.fritz.box> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=123.201.119.24; posting-account=mBpa7woAAAAGLEWUUKpmbxm-Quu5D8ui Original-NNTP-Posting-Host: 123.201.119.24 User-Agent: G2/1.0 Injection-Date: Thu, 28 Jul 2016 04:05:24 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:218643 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:110954 Archived-At: On Thursday, July 28, 2016 at 5:33:59 AM UTC+5:30, Rolf Ade wrote: > I often edit files in emacs, that are under version control. It should > not, but it happens, that I haven#t save-buffer some buffer, while > check-in on the cmd line. >=20 > Since I already sometimes use a wrapper around my scm cmd line tool I > imagined, that my wrapper could ask the running emacs about unsaved > buffers under version control and warn me before actually checking in. >=20 > Looks, emacsclient -e is the most general interpretation of 'query the > running emacs' and emacsclient already works for me. Although I didn't > was aware of -e so far less than five Minutes and it still looks easily > done. >=20 > But from that, it started to get swampy. I'd like to get a yes / no > answer from emacs, if one (or more) of 'some buffers' is unsaved. I don't > want to provide, what 'some buffers' mean. A good heuristic for my usage > habits would be: some buffers are all files under version control. >=20 > I tinkered araound more than a half hour, but wasn't able to come up > with a few simple lines of emacs lisp that do that. How should I do? Not an answer=E2=80=A6 Still if you are using git, magit will deal with all (or most) of this Of course you need to invert your workflow and do the command-line stuff=20 from inside emacs