From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rolf Ade Newsgroups: gmane.emacs.help Subject: Re: List of buffers under version control? Date: Thu, 28 Jul 2016 21:31:12 +0200 Organization: Me Message-ID: <87shutv9tr.fsf@linux-qg7d.fritz.box> References: <877fc6wrv7.fsf@linux-qg7d.fritz.box> <006fed39-43f3-40aa-a72b-c736ba9bf86c@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1469734569 31163 80.91.229.3 (28 Jul 2016 19:36:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 19:36:09 +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 21:36:04 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 1bSr6B-0007oP-Aq for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 21:36:03 +0200 Original-Received: from localhost ([::1]:55326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSr64-0004Oy-Vk for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 15:35:57 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-1.dfn.de!news.dfn.de!news.informatik.hu-berlin.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-X-Trace: individual.net Rj6hDA2MoH4ZHagK7VW1KwfC+kHgy+sZhRVlof6fNiFktE2UQ= Cancel-Lock: sha1:fC+AKBFqp8rjPhegZkWZwoEIQ4g= sha1:hKgic+t1/Fi+E9c5HOFpjjLIiHU= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:218663 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:110975 Archived-At: Rusi writes: > 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. >> >> 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. >> >> [...] > > Not an answer… > 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 > from inside emacs No, I'm (mostly) not using git, but fossil. There is a vc backend for fossil controled files which provides useful things like vc-diff, but doesn't has as mighty commit features as magit. I prefer to use the command line to do the check-ins. The paragraph above includes one bit of information, that I've missed to provide, so far. Emacs knows, that the buffers (files) I'm interested in are under version control. Since emacs show me in the mode line of that buffers, that the file is under version control, there must be a way with elisp to determine, if the file shown in a buffer is under version control. How could that be done?