From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: How to log changes to orgmode files? Date: Wed, 29 Nov 2017 14:10:48 -0500 Message-ID: <87d140rjd3.fsf@kyleam.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK7l4-0005aO-Jl for emacs-orgmode@gnu.org; Wed, 29 Nov 2017 14:10:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eK7l0-0002cp-Kb for emacs-orgmode@gnu.org; Wed, 29 Nov 2017 14:10:58 -0500 Received: from pb-smtp1.pobox.com ([64.147.108.70]:55711 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eK7l0-0002ar-EP for emacs-orgmode@gnu.org; Wed, 29 Nov 2017 14:10:54 -0500 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Mirko Vukovic , "emacs-orgmode@gnu.org" Mirko Vukovic writes: > When I invoke ChangeLog, it is pre-populated with the file name only. > There is no finer information about the location of the modification. For > instance, I would like to use the tree heading name or ID. > > Is there a standard way of logging changes? If I understand correctly what you want, I think you can get it by setting add-log-current-defun-function. For example, (add-hook 'org-mode-hook (lambda () (setq-local add-log-current-defun-function (lambda () (ignore-errors (org-get-heading t)))))) Untested, and you probably don't want to add an anonymous function to org-mode-hook, but hopefully it helps. -- Kyle