From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Lewan Newsgroups: gmane.emacs.help Subject: RE: Project idea: a poor man's VC backend Date: Thu, 15 Jan 2015 13:10:23 +0000 Message-ID: <155DEC68569B714B86C2C7075F5EDA9892BBDB7C@DAKIYA1.pegasus.local> References: <87h9x26ue6.fsf@wmi.amu.edu.pl> <83388mt6dp.fsf@gnu.org> <87egs66keh.fsf@wmi.amu.edu.pl> <87iog9hwgo.fsf@wmi.amu.edu.pl> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1421327458 13330 80.91.229.3 (15 Jan 2015 13:10:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2015 13:10:58 +0000 (UTC) To: Marcin Borkowski , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 15 14:10:52 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YBkCI-0005OI-ST for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2015 14:10:51 +0100 Original-Received: from localhost ([::1]:50657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBkCH-0007Vy-He for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2015 08:10:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBkBy-0007V2-SU for help-gnu-emacs@gnu.org; Thu, 15 Jan 2015 08:10:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YBkBs-0004lE-65 for help-gnu-emacs@gnu.org; Thu, 15 Jan 2015 08:10:30 -0500 Original-Received: from webmail.shubertorg.com ([207.246.209.200]:40825 helo=livemail.shubertorg.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YBkBs-0004kw-1k for help-gnu-emacs@gnu.org; Thu, 15 Jan 2015 08:10:24 -0500 Original-Received: from dakiya1.pegasus.local ([172.16.208.201]) by DAKIYA1.pegasus.local ([172.16.208.201]) with mapi id 14.03.0123.003; Thu, 15 Jan 2015 08:10:24 -0500 Thread-Topic: Project idea: a poor man's VC backend Thread-Index: AQHQFVzbTAIYYTApNUGaDL8BQN8k3JyLm+7TgDUSvwCAAKv0EA== In-Reply-To: <87iog9hwgo.fsf@wmi.amu.edu.pl> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.21.202] X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 X-Received-From: 207.246.209.200 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:102090 Archived-At: > -----Original Message----- > From: help-gnu-emacs-bounces+dougl > To: help-gnu-emacs@gnu.org > Subject: Re: Project idea: a poor man's VC backend >=20 > 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. >=20 > 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 direct= ly. 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=20 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. --=20 ,Doug Douglas Lewan Shubert Ticketing (201) 489-8600 ext 224 or ext 4335 "This is a slow pup," he said continuing his ascent.