* vc-rename-file() if possible otherwise rename-file()
@ 2008-03-18 18:23 Nordlöw
2008-03-18 19:13 ` Thierry Volpiatto
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nordlöw @ 2008-03-18 18:23 UTC (permalink / raw)
To: help-gnu-emacs
Looking for a small snippet that does vc-rename-file() when possible
(source file is under version control) otherwise default to rename-
file(). The question is: How do I check if a file is under version
control or not?
Thanks in advance,
Nordlöw
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vc-rename-file() if possible otherwise rename-file()
2008-03-18 18:23 vc-rename-file() if possible otherwise rename-file() Nordlöw
@ 2008-03-18 19:13 ` Thierry Volpiatto
2008-03-18 19:26 ` Nikolaj Schumacher
[not found] ` <2fd1cf38-57e5-4ce1-b79c-8eee6aa25b8e@s13g2000prd.googlegro ups.com>
2 siblings, 0 replies; 4+ messages in thread
From: Thierry Volpiatto @ 2008-03-18 19:13 UTC (permalink / raw)
To: Nordlow; +Cc: help-gnu-emacs
Nordlow <per.nordlow@gmail.com> writes:
> Looking for a small snippet that does vc-rename-file() when possible
> (source file is under version control) otherwise default to rename-
> file(). The question is: How do I check if a file is under version
> control or not?
Look in the modeline you will see the name of the version-system backend and the
number of version. Like SVN:123 for a file under subversion version no123.
But the file didn't come under version-control alone... ;)
--
A + Thierry
Pub key: http://pgp.mit.edu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vc-rename-file() if possible otherwise rename-file()
2008-03-18 18:23 vc-rename-file() if possible otherwise rename-file() Nordlöw
2008-03-18 19:13 ` Thierry Volpiatto
@ 2008-03-18 19:26 ` Nikolaj Schumacher
[not found] ` <2fd1cf38-57e5-4ce1-b79c-8eee6aa25b8e@s13g2000prd.googlegro ups.com>
2 siblings, 0 replies; 4+ messages in thread
From: Nikolaj Schumacher @ 2008-03-18 19:26 UTC (permalink / raw)
To: Nordlöw; +Cc: help-gnu-emacs
Nordlöw <per.nordlow@gmail.com> wrote:
> Looking for a small snippet that does vc-rename-file() when possible
> (source file is under version control) otherwise default to rename-
> file(). The question is: How do I check if a file is under version
> control or not?
(if (vc-backend buffer-file-name)
(vc-rename-file buffer-file-name new-name)
(rename-file buffer-file-name new-name))
regards,
Nikolaj Schumacher
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: vc-rename-file() if possible otherwise rename-file()
[not found] ` <2fd1cf38-57e5-4ce1-b79c-8eee6aa25b8e@s13g2000prd.googlegro ups.com>
@ 2008-03-19 0:40 ` Johan Lindström
0 siblings, 0 replies; 4+ messages in thread
From: Johan Lindström @ 2008-03-19 0:40 UTC (permalink / raw)
To: help-gnu-emacs
At 18:23 2008-03-18, Nordlöw wrote:
>Looking for a small snippet that does vc-rename-file() when possible
>(source file is under version control) otherwise default to rename-
>file().
That sounds very useful. Something I've been missing for some time is
the same thing but for delete, so I can easily get rid of all
irrelevant files listed in the *svn-status* buffer.
/J
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-19 0:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-18 18:23 vc-rename-file() if possible otherwise rename-file() Nordlöw
2008-03-18 19:13 ` Thierry Volpiatto
2008-03-18 19:26 ` Nikolaj Schumacher
[not found] ` <2fd1cf38-57e5-4ce1-b79c-8eee6aa25b8e@s13g2000prd.googlegro ups.com>
2008-03-19 0:40 ` Johan Lindström
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.