unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Sebastian Rose <sebastian_rose@gmx.de>
Subject: add-log.el
Date: Sat, 16 Dec 2006 18:15:20 +0100	[thread overview]
Message-ID: <1166289320.6771.51.camel@localhost.localdomain> (raw)

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 <sebastian_rose@gmx.de>

             reply	other threads:[~2006-12-16 17:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-16 17:15 Sebastian Rose [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-10-28 11:16 add-log.el Karl Chen
2005-10-28 12:28 ` add-log.el Miles Bader
2005-10-28 13:16   ` add-log.el Karl Chen
2005-10-28 13:28     ` add-log.el Karl Chen
2005-10-29  5:13   ` add-log.el Richard M. Stallman

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=1166289320.6771.51.camel@localhost.localdomain \
    --to=sebastian_rose@gmx.de \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).