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:58:11 -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 1469735946 10399 80.91.229.3 (28 Jul 2016 19:59:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 28 Jul 2016 19:59:06 +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:59:05 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 1bSrSR-00016i-Ja for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 21:59:03 +0200 Original-Received: from localhost ([::1]:55426 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSrSL-0004O0-BG for geh-help-gnu-emacs@m.gmane.org; Thu, 28 Jul 2016 15:58:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59026) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSrRx-0004Nv-0v for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:58:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bSrRv-0005Kk-7w for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:58:32 -0400 Original-Received: from mail-qt0-x236.google.com ([2607:f8b0:400d:c0d::236]:33586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bSrRv-0005Kg-2o for help-gnu-emacs@gnu.org; Thu, 28 Jul 2016 15:58:31 -0400 Original-Received: by mail-qt0-x236.google.com with SMTP id w38so55024895qtb.0 for ; Thu, 28 Jul 2016 12:58:30 -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=VMwPiyXhTkzJppHEr7WoiPFNWQgSBTc0BAo4j8lRtAs=; b=e+h/ITQwzTTfgQhkAKrS3RThACCferKOMFffFfdptZJMfNovX6td7A5+Yq51hhSHH8 85vcxXnbdXG/JQ1+MiC8mIHAEFcVXmvr6b13CkgctICXb7L1leie1Zksh4nSMwSRajUZ NVxnVp+VHeBod9peUkDF+rb1OvpjvsAVj5R1VMbWR8rWki6ENH7g8lyi2UhPZgFYOXq1 HuBXuXWni9Pk5CgS5gmsM2bU23ROE+3HPkQ2/wmICc1ePiATVVGqfNRiwCCrgg1X5TfD RukNWt0xqLqk6GRbIBy76aACi5OvwhkkMWJPFrN8xMRLoiocJ+pGPlPJ37/fY41+tb49 BlIA== 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=VMwPiyXhTkzJppHEr7WoiPFNWQgSBTc0BAo4j8lRtAs=; b=CKSL9QVCLBZRzpnGY47GzB4a+ggQjxyPlKWKGaIbG9xw4wA1H5+iWD1bazanCj7dZ1 Pt7epW67i2RJR6Luba5Ltfg/1yzaI4rsW6TTxni3fI26gpc3mf8heQXfW7uapBZVgTX4 cG8uU8al0Y7GlP8pNLGnE91Zq0xAGd/zaGZ1/YW8UCMRDQZJXvDuf9KgrpqzK/gq05EN /dLtb7FJXOXb3Sb1c37jds1qE0eLmdGaM8B5vb2i/P5q2bl/bJr+MbgFcAwsz0qnLuQl 4JITGgQDIBRAWK/rmeMw1DoxeORII4tpyhXtxSKuk3nzQswcBcjN8oTYQLM2uaqJ9Gqn FvIA== X-Gm-Message-State: AEkoousSFLZSbJJvrybDCOfJJJyTLMveEptY1Gc6Qcl8alefjXEolDVTC3qLKagKlCKFiRZX0qU+skjaOTmn4Q== X-Received: by 10.200.54.107 with SMTP id n40mr60190838qtb.44.1469735910567; Thu, 28 Jul 2016 12:58:30 -0700 (PDT) Original-Received: by 10.237.33.46 with HTTP; Thu, 28 Jul 2016 12:58:11 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400d:c0d::236 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:110980 Archived-At: John Mastro wrote: > You could use `vc-backend', e.g. (vc-backend (buffer-file-name)). If the version control system in question isn't supported by VC, an alternative would be to use `locate-dominating-file'. Something like (using Git as an example, even though VC obviously does support it): (save-some-buffers nil (lambda () (let ((file (buffer-file-name))) (and file (locate-dominating-file file ".git"))))) John