From: John Mastro <john.b.mastro@gmail.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Cc: Rolf Ade <rolf@pointsman.de>
Subject: Re: List of buffers under version control?
Date: Thu, 28 Jul 2016 12:58:11 -0700 [thread overview]
Message-ID: <CAOj2CQSUVkUGrDXv=5t6Yvkbg_sijtR_zaOB1w-oTM=Q8omBvw@mail.gmail.com> (raw)
In-Reply-To: <CAOj2CQTs-bAW8ZJDfQd_J8Kdct2FS=AgftYZxVaFrKX0VH8w3w@mail.gmail.com>
John Mastro <john.b.mastro@gmail.com> 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
next prev parent reply other threads:[~2016-07-28 19:58 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-28 0:03 List of buffers under version control? Rolf Ade
2016-07-28 4:05 ` Rusi
2016-07-28 19:31 ` Rolf Ade
2016-07-28 19:52 ` John Mastro
2016-07-28 19:58 ` John Mastro [this message]
2016-07-28 19:56 ` Marcin Borkowski
[not found] ` <mailman.2241.1469735551.26859.help-gnu-emacs@gnu.org>
2016-07-28 21:01 ` Rolf Ade
2016-07-28 21:14 ` John Mastro
2016-07-28 21:25 ` Drew Adams
[not found] ` <mailman.2253.1469741176.26859.help-gnu-emacs@gnu.org>
2016-07-28 22:27 ` Rolf Ade
[not found] ` <mailman.2252.1469740513.26859.help-gnu-emacs@gnu.org>
2016-07-28 21:52 ` Rolf Ade
2016-07-29 1:42 ` Stefan Monnier
2016-07-28 5:12 ` Yuri Khan
[not found] ` <mailman.2177.1469682795.26859.help-gnu-emacs@gnu.org>
2016-07-28 19:31 ` Rolf Ade
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOj2CQSUVkUGrDXv=5t6Yvkbg_sijtR_zaOB1w-oTM=Q8omBvw@mail.gmail.com' \
--to=john.b.mastro@gmail.com \
--cc=help-gnu-emacs@gnu.org \
--cc=rolf@pointsman.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.