emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: Automatic mtime and ctime on all or select group of trees?
Date: Fri, 01 Sep 2017 20:09:40 -0500	[thread overview]
Message-ID: <8760d1j48b.fsf@alphapapa.net> (raw)
In-Reply-To: 87inh24u7m.fsf@pinto.chemeng.ucl.ac.uk

As Eric mentioned, a heading can be created by simply typing, so making
that detect whether a new heading is created is possible, but I guess it
would require some ugly hacks.  Maybe if you could hook into the
font-lock code, but like I said...ugly hacks.  :)

However, it would be easy to add advice to the heading-creating
commands, so if you always use those to create headings, that would do
it for you.

For modification time, that would be more challenging.  I guess you
could use post-command-hook and update an mtime property in the current
node with every keystroke.  Another way might be to add a function to
the before-save-hook that would diff the buffer with the file and update
the mtime in each node that has been changed.

  reply	other threads:[~2017-09-02  1:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 11:55 Automatic mtime and ctime on all or select group of trees? Tim Visher
2017-08-31 13:44 ` Eric S Fraga
2017-08-31 14:20   ` Tim Visher
2017-09-01  9:57     ` Eric S Fraga
2017-09-02  1:09       ` Adam Porter [this message]
2017-09-02 23:18 ` Jorge Morais Neto
2017-09-03  1:10   ` Adam Porter
2017-09-05 16:47     ` Jorge Morais Neto
2017-09-07  1:38       ` Adam Porter
2017-09-02 23:34 ` Samuel Wales
2017-09-03  1:06   ` Adam Porter

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.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760d1j48b.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \
    /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/org-mode.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).