From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Rose Newsgroups: gmane.emacs.devel Subject: add-log.el Date: Sat, 16 Dec 2006 18:15:20 +0100 Message-ID: <1166289320.6771.51.camel@localhost.localdomain> NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1166289250 11164 80.91.229.10 (16 Dec 2006 17:14:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Dec 2006 17:14:10 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 16 18:14:08 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1Gvd6t-0008GW-Jk for ged-emacs-devel@m.gmane.org; Sat, 16 Dec 2006 18:14:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gvd6s-0007x9-N2 for ged-emacs-devel@m.gmane.org; Sat, 16 Dec 2006 12:14:06 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Gvd6g-0007wT-8f for emacs-devel@gnu.org; Sat, 16 Dec 2006 12:13:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Gvd6e-0007vc-PO for emacs-devel@gnu.org; Sat, 16 Dec 2006 12:13:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Gvd6e-0007vZ-Ia for emacs-devel@gnu.org; Sat, 16 Dec 2006 12:13:52 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.52) id 1Gvd6e-0000ow-9Y for emacs-devel@gnu.org; Sat, 16 Dec 2006 12:13:52 -0500 Original-Received: (qmail invoked by alias); 16 Dec 2006 17:13:50 -0000 Original-Received: from gprs-pool-1-016.eplus-online.de (EHLO [10.129.7.87]) [212.23.126.16] by mail.gmx.net (mp046) with SMTP; 16 Dec 2006 18:13:50 +0100 X-Authenticated: #8529601 Original-To: emacs-devel@gnu.org X-Mailer: Evolution 2.6.3 X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:63836 Archived-At: Hi there, pardon me for posting to this group, but after searching for a way to contact someone who probably feels responsable for add-log.el, I think this is the place to start. The problem: I wrote a small peace of code, that shall hold for add-log.el's add-log-file-name-function and customized change-log according to this. Everythting works fine so far. Unfortunately the code relies on a local variable in add-log.el: logfile, one of the parameters to add-log-file-name(), that is originally a local variable in add-change-log-entry(). The Question: Is there an other way to find out the path and filename of the logfile the user has choosen? My add-log.el has no version... but it came with emacs-21.4.1 on my Debian. If not - how about using a more global, documented and reliable technic to achieve this? How about sending patches? The Code: mtn-get-parent-directory is a helperfunction, that returns the real name (no linknames) of the arguments parent directory. The whole of it can be reviewed at http://venge.net/monotone/wiki/ChangeLog. -------------------------------------------------------- (defun mtn-add-log-file-name(original-name) "Return the filename printed in _MTN/log (or ChangeLog) relative to the projects root. That is the driectory the file ChangeLog lives in, if not a monotone project, _MTN/../ otherwise." (let ((directory (mtn-get-parent-directory log-file)) (file (file-truename original-name))) (if (string= change-log-default-name "log") ;; monotone (let ((directory (mtn-get-parent-directory directory))) (file-relative-name file directory)) ;; else no monotone: (file-relative-name file directory)))) -------------------------------------------------------- -- Sebastian Rose