From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Mastro Newsgroups: gmane.emacs.help Subject: Re: List of buffers under version control? Date: Thu, 28 Jul 2016 12:52:08 -0700 Message-ID: References: <877fc6wrv7.fsf@linux-qg7d.fritz.box> <006fed39-43f3-40aa-a72b-c736ba9bf86c@googlegroups.com> <87shutv9tr.fsf@linux-qg7d.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1469735589 7447 80.91.229.3 (28 Jul 2016 19:53:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 19:53:09 +0000 (UTC) Cc: Rolf Ade 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:53:09 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 1bSrMj-00075O-6K for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 21:53:09 +0200 Original-Received: from localhost ([::1]:55406 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSrMZ-0001Z9-QA for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 15:52:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSrM6-0001Vs-7x for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:52:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSrM4-0004DT-CO for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:52:29 -0400 Original-Received: from mail-qt0-x235.google.com ([2607:f8b0:400d:c0d::235]:33865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSrM4-0004DD-83 for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:52:28 -0400 Original-Received: by mail-qt0-x235.google.com with SMTP id u25so54591874qtb.1 for ; Thu, 28 Jul 2016 12:52:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=73pvI/n1R1jAmHS2nTRi8Rhl4r00qDZCHaowUcbLDsU=; b=S7hdSHKgGIlMtl8JaPR6wkKBFKMzxyEe/nEPYhGrbm0OEn+EJVWjz/i37C/++jNDqu +YNPS9Sf+Eswu3N2bJmOmAyLbRIC+OLACnmPi7n1C19qv/c3fTiuI3MzpA0B31hOrCkL l6EshFhnUCBKe5grSi4vCS9qUenxZOroWnHCjkq3zjdwm9wz+733qsPar+2MDRvDasyy VE/hWYn6cJegvRw0gm+2iXjHSU800T4DGuTsXOIJ7Zd3Xa8eSgUegU9FszzZSLToVzew K+vvzIhgsy5XOVO/SQBYPkgeLGbjlDVbnNQmRZDvWOrW0mVY0FcXWdbDVp2T5Qq32FPf ldaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=73pvI/n1R1jAmHS2nTRi8Rhl4r00qDZCHaowUcbLDsU=; b=DDMr/KgsevcBOXyrD6fX3sjgScVXcyl91AZQv5uhHofqcJez1zNrdLRwpVJqnAXbP1 kAwfrBl3hDdaGmJOqNYgV9ABSaeOkMDhwohXWGXm2QTb+NoyRuhK9wosERm8SSfug/lI iwql3o9/FuGx1Gtggzd0j9JM6thc1qkXAOOBaOq4GU9rNELg7+AFNkmXeznvrgd7B2n4 ywjq7YZNPws3AmRamcJNwqJTmrCUDtjtlOjbJxauzDgSy6xiXZeYd4gQA4xOarSMwJQh tFmtM8s490GU+m5vtIRlrswP7xSMy+ahn4lDc6v5UZ+JjK0Ld48Bik0YN3wOMlCLLPpS XYCA== X-Gm-Message-State: AEkoousx3ml7F4LRBdW5HjlrfoAow2V4MYPUhYWTzljqLLNrk/oZ0vP/cXLk0hXeLfj9cwbakdcU2fuXSHcdjw== X-Received: by 10.237.41.225 with SMTP id o88mr61441727qtd.18.1469735547643; Thu, 28 Jul 2016 12:52:27 -0700 (PDT) Original-Received: by 10.237.33.46 with HTTP; Thu, 28 Jul 2016 12:52:08 -0700 (PDT) In-Reply-To: <87shutv9tr.fsf@linux-qg7d.fritz.box> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::235 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:110978 Archived-At: Rolf Ade wrote: > 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? You could use `vc-backend', e.g. (vc-backend (buffer-file-name)). `save-some-buffers' accepts an argument PRED; you could also use `vc-backend' there: (save-some-buffers nil (lambda () (vc-backend (buffer-file-name)))) That way you don't need to loop through the buffer-list yourself. John