all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* List of buffers under version control?
@ 2016-07-28  0:03 Rolf Ade
  2016-07-28  4:05 ` Rusi
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Rolf Ade @ 2016-07-28  0:03 UTC (permalink / raw)
  To: help-gnu-emacs


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.

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.

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.

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?


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2016-07-29  1:42 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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.