* Project idea: a poor man's VC backend @ 2014-12-11 16:09 Marcin Borkowski 2014-12-11 16:38 ` Stefan Monnier 2014-12-11 17:59 ` Eli Zaretskii 0 siblings, 2 replies; 15+ messages in thread From: Marcin Borkowski @ 2014-12-11 16:09 UTC (permalink / raw) To: Help Gnu Emacs mailing list In a recent question on ESE (http://emacs.stackexchange.com/questions/2849/save-current-file-with-a-slightly-different-name) the topic of versioning by means of putting a timestamp into the filename came up again (it does have its place, especially when communicating with people unable to learn a real VCS). Just wondering: would it be possible/easy/reasonable to provide something like this within the Emacs VC framework? Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-11 16:09 Project idea: a poor man's VC backend Marcin Borkowski @ 2014-12-11 16:38 ` Stefan Monnier 2014-12-11 19:46 ` Marcin Borkowski 2014-12-11 17:59 ` Eli Zaretskii 1 sibling, 1 reply; 15+ messages in thread From: Stefan Monnier @ 2014-12-11 16:38 UTC (permalink / raw) To: help-gnu-emacs > Just wondering: would it be possible/easy/reasonable to provide > something like this within the Emacs VC framework? Yes. Stefan ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-11 16:38 ` Stefan Monnier @ 2014-12-11 19:46 ` Marcin Borkowski 2014-12-11 20:17 ` Stefan Monnier 0 siblings, 1 reply; 15+ messages in thread From: Marcin Borkowski @ 2014-12-11 19:46 UTC (permalink / raw) To: help-gnu-emacs On 2014-12-11, at 17:38, Stefan Monnier wrote: >> Just wondering: would it be possible/easy/reasonable to provide >> something like this within the Emacs VC framework? > > Yes. You mean yes/yes/yes or some other combination? I might be tempted to try to implement this, but my time and Elisp-fu are limited. > Stefan Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-11 19:46 ` Marcin Borkowski @ 2014-12-11 20:17 ` Stefan Monnier 2014-12-11 20:48 ` Marcin Borkowski 0 siblings, 1 reply; 15+ messages in thread From: Stefan Monnier @ 2014-12-11 20:17 UTC (permalink / raw) To: help-gnu-emacs >>> Just wondering: would it be possible/easy/reasonable to provide >>> something like this within the Emacs VC framework? > You mean yes/yes/yes or some other combination? I might be tempted to > try to implement this, but my time and Elisp-fu are limited. I haven't tried, but AFAICT it should be yes/yes/yes. Stefan ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-11 20:17 ` Stefan Monnier @ 2014-12-11 20:48 ` Marcin Borkowski 0 siblings, 0 replies; 15+ messages in thread From: Marcin Borkowski @ 2014-12-11 20:48 UTC (permalink / raw) To: help-gnu-emacs On 2014-12-11, at 21:17, Stefan Monnier wrote: >>>> Just wondering: would it be possible/easy/reasonable to provide >>>> something like this within the Emacs VC framework? >> You mean yes/yes/yes or some other combination? I might be tempted to >> try to implement this, but my time and Elisp-fu are limited. > > I haven't tried, but AFAICT it should be yes/yes/yes. Great. So when I have some spare time, I'll try to look into this. > Stefan Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-11 16:09 Project idea: a poor man's VC backend Marcin Borkowski 2014-12-11 16:38 ` Stefan Monnier @ 2014-12-11 17:59 ` Eli Zaretskii 2014-12-11 19:44 ` Marcin Borkowski [not found] ` <mailman.15879.1418327119.1147.help-gnu-emacs@gnu.org> 1 sibling, 2 replies; 15+ messages in thread From: Eli Zaretskii @ 2014-12-11 17:59 UTC (permalink / raw) To: help-gnu-emacs > From: Marcin Borkowski <mbork@wmi.amu.edu.pl> > Date: Thu, 11 Dec 2014 17:09:05 +0100 > > In a recent question on ESE > (http://emacs.stackexchange.com/questions/2849/save-current-file-with-a-slightly-different-name) > the topic of versioning by means of putting a timestamp into the > filename came up again (it does have its place, especially when > communicating with people unable to learn a real VCS). > > Just wondering: would it be possible/easy/reasonable to provide > something like this within the Emacs VC framework? Are you talking about time-stamp.el? ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-11 17:59 ` Eli Zaretskii @ 2014-12-11 19:44 ` Marcin Borkowski 2014-12-12 8:11 ` Rainer M Krug [not found] ` <mailman.15879.1418327119.1147.help-gnu-emacs@gnu.org> 1 sibling, 1 reply; 15+ messages in thread From: Marcin Borkowski @ 2014-12-11 19:44 UTC (permalink / raw) To: help-gnu-emacs On 2014-12-11, at 18:59, Eli Zaretskii wrote: >> From: Marcin Borkowski <mbork@wmi.amu.edu.pl> >> Date: Thu, 11 Dec 2014 17:09:05 +0100 >> >> In a recent question on ESE >> (http://emacs.stackexchange.com/questions/2849/save-current-file-with-a-slightly-different-name) >> the topic of versioning by means of putting a timestamp into the >> filename came up again (it does have its place, especially when >> communicating with people unable to learn a real VCS). >> >> Just wondering: would it be possible/easy/reasonable to provide >> something like this within the Emacs VC framework? > > Are you talking about time-stamp.el? Not really. I mean that e.g. C-x v v will "do the right thing", for instance: I'm editing file.el (the only file in the current directory). I press C-x v v. I'm asked for a "commit message" and the current contents of file.el are save as e.g. file.el.2014-12-11-20:39:01-CET or something like that, with the "commit message" put at the beginning in a comment (for example). I edit it further, and C-x v v behaves similarly. Then, I can press C-x v =, and see the diff between the current version and the last stamped one. Or C-u C-x v = and be asked (with autocompletion) for the timestamp. Then, have similar commands for analogs of blame/annotate, revert to earlier versions etc. Of course, it's impossible to recreate the functionality of Git in this way. Or even RCS, I'm afraid. But for many use cases this might be enough (for instance, one/two authors working on a single LaTeX file of the paper). (One paticular functionality that would be difficult to implement would be branching; while possible, it might be even misleading and hence dangerous. Remember, the target would be the users, uhm, not wise enough to use a real VCS;-).) The rationale would be that e.g. if I work with a non-computer-savvy researcher, any "real" VCS might be confusing; I might be expected to e.g. send him file versions with a timestamp in the filename etc. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-11 19:44 ` Marcin Borkowski @ 2014-12-12 8:11 ` Rainer M Krug 2015-01-14 21:41 ` Marcin Borkowski 0 siblings, 1 reply; 15+ messages in thread From: Rainer M Krug @ 2014-12-12 8:11 UTC (permalink / raw) To: Marcin Borkowski; +Cc: help-gnu-emacs [-- Attachment #1: Type: text/plain, Size: 2787 bytes --] Marcin Borkowski <mbork@wmi.amu.edu.pl> writes: > On 2014-12-11, at 18:59, Eli Zaretskii wrote: > >>> From: Marcin Borkowski <mbork@wmi.amu.edu.pl> >>> Date: Thu, 11 Dec 2014 17:09:05 +0100 >>> >>> In a recent question on ESE >>> (http://emacs.stackexchange.com/questions/2849/save-current-file-with-a-slightly-different-name) >>> the topic of versioning by means of putting a timestamp into the >>> filename came up again (it does have its place, especially when >>> communicating with people unable to learn a real VCS). >>> >>> Just wondering: would it be possible/easy/reasonable to provide >>> something like this within the Emacs VC framework? >> >> Are you talking about time-stamp.el? > > Not really. > > I mean that e.g. C-x v v will "do the right thing", for instance: > > I'm editing file.el (the only file in the current directory). I press > C-x v v. I'm asked for a "commit message" and the current contents of > file.el are save as e.g. file.el.2014-12-11-20:39:01-CET or something > like that, with the "commit message" put at the beginning in a comment > (for example). I edit it further, and C-x v v behaves similarly. Then, > I can press C-x v =, and see the diff between the current version and > the last stamped one. Or C-u C-x v = and be asked (with autocompletion) > for the timestamp. Then, have similar commands for analogs of > blame/annotate, revert to earlier versions etc. > > Of course, it's impossible to recreate the functionality of Git in this > way. Or even RCS, I'm afraid. But for many use cases this might be > enough (for instance, one/two authors working on a single LaTeX file of > the paper). (One paticular functionality that would be difficult to > implement would be branching; while possible, it might be even > misleading and hence dangerous. Remember, the target would be the > users, uhm, not wise enough to use a real VCS;-).) > > The rationale would be that e.g. if I work with a non-computer-savvy > researcher, any "real" VCS might be confusing; I might be expected to > e.g. send him file versions with a timestamp in the filename etc. As it seems you are really aware of the pitfalls and dangers of using this approach, I would suggest to not look into creating a "time-stamp-file-based" VCS, but rather use on your side e.g. git, and write some batch files which will be create time-stamped versions based on git and also add a new time-stamped (time of check in) file to git. In this way, you will have a good working VCS (git) with all the advantages, but also the possibility to create consistent time-stamped files and check in new time-stamped files. Cheers, Rainer > > Best, -- Rainer M. Krug email: Rainer<at>krugs<dot>de PGP: 0x0F52F982 [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 494 bytes --] ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2014-12-12 8:11 ` Rainer M Krug @ 2015-01-14 21:41 ` Marcin Borkowski 2015-01-14 21:58 ` Dmitry Gutov 2015-01-15 13:10 ` Doug Lewan 0 siblings, 2 replies; 15+ messages in thread From: Marcin Borkowski @ 2015-01-14 21:41 UTC (permalink / raw) To: help-gnu-emacs On 2014-12-12, at 09:11, Rainer M Krug <Rainer@krugs.de> wrote: > Marcin Borkowski <mbork@wmi.amu.edu.pl> writes: > >> On 2014-12-11, at 18:59, Eli Zaretskii wrote: >> >>>> From: Marcin Borkowski <mbork@wmi.amu.edu.pl> >>>> Date: Thu, 11 Dec 2014 17:09:05 +0100 >>>> >>>> In a recent question on ESE >>>> (http://emacs.stackexchange.com/questions/2849/save-current-file-with-a-slightly-different-name) >>>> the topic of versioning by means of putting a timestamp into the >>>> filename came up again (it does have its place, especially when >>>> communicating with people unable to learn a real VCS). >>>> >>>> Just wondering: would it be possible/easy/reasonable to provide >>>> something like this within the Emacs VC framework? >>> >>> Are you talking about time-stamp.el? >> >> Not really. >> >> I mean that e.g. C-x v v will "do the right thing", for instance: >> >> I'm editing file.el (the only file in the current directory). I press >> C-x v v. I'm asked for a "commit message" and the current contents of >> file.el are save as e.g. file.el.2014-12-11-20:39:01-CET or something >> like that, with the "commit message" put at the beginning in a comment >> (for example). I edit it further, and C-x v v behaves similarly. Then, >> I can press C-x v =, and see the diff between the current version and >> the last stamped one. Or C-u C-x v = and be asked (with autocompletion) >> for the timestamp. Then, have similar commands for analogs of >> blame/annotate, revert to earlier versions etc. >> >> Of course, it's impossible to recreate the functionality of Git in this >> way. Or even RCS, I'm afraid. But for many use cases this might be >> enough (for instance, one/two authors working on a single LaTeX file of >> the paper). (One paticular functionality that would be difficult to >> implement would be branching; while possible, it might be even >> misleading and hence dangerous. Remember, the target would be the >> users, uhm, not wise enough to use a real VCS;-).) >> >> The rationale would be that e.g. if I work with a non-computer-savvy >> researcher, any "real" VCS might be confusing; I might be expected to >> e.g. send him file versions with a timestamp in the filename etc. > > As it seems you are really aware of the pitfalls and dangers of using > this approach, I would suggest to not look into creating a > "time-stamp-file-based" VCS, but rather use on your side e.g. git, and > write some batch files which will be create time-stamped versions based > on git and also add a new time-stamped (time of check in) file to git. In this way, you > will have a good working VCS (git) with all the advantages, but also the > possibility to create consistent time-stamped files and check in new > time-stamped files. Let me necromance this thread. Thanks for this suggestion; it is a very good one. However, what I *really* would like to do is learning how Emacs' VC works. Now I have another problem. I decided to start reading the code for VC, and after seeing the lisp/vc directory with its 41 files, felt a bit overwhelmed. Any suggestions on where to start reading to actually understand anything? > Cheers, > > Rainer Regards, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2015-01-14 21:41 ` Marcin Borkowski @ 2015-01-14 21:58 ` Dmitry Gutov 2015-01-15 13:10 ` Doug Lewan 1 sibling, 0 replies; 15+ messages in thread From: Dmitry Gutov @ 2015-01-14 21:58 UTC (permalink / raw) To: Marcin Borkowski, help-gnu-emacs On 01/15/2015 12:41 AM, Marcin Borkowski wrote: > Now I have another problem. I decided to start reading the code for VC, > and after seeing the lisp/vc directory with its 41 files, felt a bit > overwhelmed. Any suggestions on where to start reading to actually > understand anything? You should start with the header commentary in lisp/vc/vc.el, and you can pretty much skip all VC backends you're not interested in. ^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: Project idea: a poor man's VC backend 2015-01-14 21:41 ` Marcin Borkowski 2015-01-14 21:58 ` Dmitry Gutov @ 2015-01-15 13:10 ` Doug Lewan 1 sibling, 0 replies; 15+ messages in thread From: Doug Lewan @ 2015-01-15 13:10 UTC (permalink / raw) To: Marcin Borkowski, help-gnu-emacs@gnu.org > -----Original Message----- > From: help-gnu-emacs-bounces+dougl > To: help-gnu-emacs@gnu.org > Subject: Re: Project idea: a poor man's VC backend > > Thanks for this suggestion; it is a very good one. However, what > I *really* would like to do is learning how Emacs' VC works. Excellent! That is a major part of the GNU philosophy. Emphasize it! I once had the task of designing a debugger and GDB was the only thing around to learn from. > > Now I have another problem. I decided to start reading the code for > VC, > and after seeing the lisp/vc directory with its 41 files, felt a bit > overwhelmed. Any suggestions on where to start reading to actually > understand anything? First, look at the names of all those files and understand which ones you shouldn't care about at the beginning. (All those ediff files, for example, probably don't offer the big picture.) Next I'd recommend that you look inside vc.el. The commentary in the top matter alone gives good hints about the history and design. A significant part of this is to understand that VC never calls a function for a specific version control system directly. Instead, it figures out what the VC system is and then picks the right set of functions and variables to use and then assign them to a common set of variables. (This is a common lisp technique and well worth learning if you don't already know it.) To delve into the code proper I might look at the help for C-x C-v C-v (M-x vc-next-action). It's a vague concept, essentially "do the right thing". Figure out how it decides what the next action should be. Then study that action to see what variables (see above) it uses. Those are your hooks into adding to the mode. I hope this helps. -- ,Doug Douglas Lewan Shubert Ticketing (201) 489-8600 ext 224 or ext 4335 "This is a slow pup," he said continuing his ascent. ^ permalink raw reply [flat|nested] 15+ messages in thread
[parent not found: <mailman.15879.1418327119.1147.help-gnu-emacs@gnu.org>]
* Re: Project idea: a poor man's VC backend [not found] ` <mailman.15879.1418327119.1147.help-gnu-emacs@gnu.org> @ 2015-01-15 13:48 ` Damien Wyart 2015-01-15 20:17 ` Joost Kremers 0 siblings, 1 reply; 15+ messages in thread From: Damien Wyart @ 2015-01-15 13:48 UTC (permalink / raw) To: help-gnu-emacs * Marcin Borkowski <mbork@wmi.amu.edu.pl> in gnu.emacs.help: > The rationale would be that e.g. if I work with a non-computer-savvy > researcher, any "real" VCS might be confusing; I might be expected to > e.g. send him file versions with a timestamp in the filename etc. You might want to have a look at this: http://www.catb.org/esr/src/ The interface is really simple, and vc-src.el has already been added in Emacs (devel). -- DW ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2015-01-15 13:48 ` Damien Wyart @ 2015-01-15 20:17 ` Joost Kremers 2015-01-15 23:35 ` Marcin Borkowski 2015-01-16 17:17 ` Bob Proulx 0 siblings, 2 replies; 15+ messages in thread From: Joost Kremers @ 2015-01-15 20:17 UTC (permalink / raw) To: help-gnu-emacs Damien Wyart wrote: > * Marcin Borkowski <mbork@wmi.amu.edu.pl> in gnu.emacs.help: >> The rationale would be that e.g. if I work with a non-computer-savvy >> researcher, any "real" VCS might be confusing; I might be expected to >> e.g. send him file versions with a timestamp in the filename etc. > > You might want to have a look at this: > http://www.catb.org/esr/src/ SRC. Great name for a revision control system ... Lowest googleability ever. ;-) -- Joost Kremers joostkremers@fastmail.fm Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2015-01-15 20:17 ` Joost Kremers @ 2015-01-15 23:35 ` Marcin Borkowski 2015-01-16 17:17 ` Bob Proulx 1 sibling, 0 replies; 15+ messages in thread From: Marcin Borkowski @ 2015-01-15 23:35 UTC (permalink / raw) To: help-gnu-emacs On 2015-01-15, at 21:17, Joost Kremers <joost.m.kremers@gmail.com> wrote: > Damien Wyart wrote: >> * Marcin Borkowski <mbork@wmi.amu.edu.pl> in gnu.emacs.help: >>> The rationale would be that e.g. if I work with a non-computer-savvy >>> researcher, any "real" VCS might be confusing; I might be expected to >>> e.g. send him file versions with a timestamp in the filename etc. >> >> You might want to have a look at this: >> http://www.catb.org/esr/src/ > > SRC. Great name for a revision control system ... Lowest googleability > ever. ;-) Take that, LaTeX. -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: Project idea: a poor man's VC backend 2015-01-15 20:17 ` Joost Kremers 2015-01-15 23:35 ` Marcin Borkowski @ 2015-01-16 17:17 ` Bob Proulx 1 sibling, 0 replies; 15+ messages in thread From: Bob Proulx @ 2015-01-16 17:17 UTC (permalink / raw) To: help-gnu-emacs Joost Kremers wrote: > Damien Wyart wrote: > > * Marcin Borkowski <mbork@wmi.amu.edu.pl> in gnu.emacs.help: > >> The rationale would be that e.g. if I work with a non-computer-savvy > >> researcher, any "real" VCS might be confusing; I might be expected to > >> e.g. send him file versions with a timestamp in the filename etc. > > > > You might want to have a look at this: > > http://www.catb.org/esr/src/ > > SRC. Great name for a revision control system ... Lowest googleability > ever. ;-) I know what you mean. I immediately think of the "links" web browser. http://links.twibright.com/ Bob ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2015-01-16 17:17 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-12-11 16:09 Project idea: a poor man's VC backend Marcin Borkowski 2014-12-11 16:38 ` Stefan Monnier 2014-12-11 19:46 ` Marcin Borkowski 2014-12-11 20:17 ` Stefan Monnier 2014-12-11 20:48 ` Marcin Borkowski 2014-12-11 17:59 ` Eli Zaretskii 2014-12-11 19:44 ` Marcin Borkowski 2014-12-12 8:11 ` Rainer M Krug 2015-01-14 21:41 ` Marcin Borkowski 2015-01-14 21:58 ` Dmitry Gutov 2015-01-15 13:10 ` Doug Lewan [not found] ` <mailman.15879.1418327119.1147.help-gnu-emacs@gnu.org> 2015-01-15 13:48 ` Damien Wyart 2015-01-15 20:17 ` Joost Kremers 2015-01-15 23:35 ` Marcin Borkowski 2015-01-16 17:17 ` Bob Proulx
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).