From: Doug Lewan <dougl@shubertticketing.com>
To: Marcin Borkowski <mbork@wmi.amu.edu.pl>,
"help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: Project idea: a poor man's VC backend
Date: Thu, 15 Jan 2015 13:10:23 +0000 [thread overview]
Message-ID: <155DEC68569B714B86C2C7075F5EDA9892BBDB7C@DAKIYA1.pegasus.local> (raw)
In-Reply-To: <87iog9hwgo.fsf@wmi.amu.edu.pl>
> -----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.
next prev parent reply other threads:[~2015-01-15 13:10 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
[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
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=155DEC68569B714B86C2C7075F5EDA9892BBDB7C@DAKIYA1.pegasus.local \
--to=dougl@shubertticketing.com \
--cc=help-gnu-emacs@gnu.org \
--cc=mbork@wmi.amu.edu.pl \
/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.
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).