emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: dynamically calculated timestamps?
Date: Thu, 2 Sep 2010 13:31:38 -0400	[thread overview]
Message-ID: <AANLkTi=VNN5XU_7DjAUKVoRWPAOohNn8zDRFuGAZW24F@mail.gmail.com> (raw)
In-Reply-To: <AANLkTikrHqCUd=1WAq1rdXShK0GGY_jYFF9FBxS+kV4h@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1881 bytes --]

On Thu, Sep 2, 2010 at 1:15 PM, Matt Price <moptop99@gmail.com> wrote:

>
> > (there are subheadings and text in between). While i'm planning I like
>> > to move the headings around quite a bit, but it would be nice, while
>> > I'm doing that, to still know what date the class meeting will take
>> > place on. So I would like to do something like this:
>> > * Outline: Semester 1
>> > ** Introduction: What is History For? <2010-09-16 Thu>
>> > ** History and the Public Sphere <<last timestamp+7 days >>
>> > ** Recursive Publics<<last timestamp+7 days >>
>> >
>>
>> "last timestamp" here refers to the date in previous item or last date
>> class was held?
>>
>> to the previous timestamp, sorry.
>
>
>>  > So essentially, have something like a spreadsheet formula embedded in
>> the
>> > timestamp.  Does anyone have any ideas how I might jerryrig something
>> like
>> > that? It would certainly be helpful to me.
>>
>> The reference to spreadsheet like formula suggests that you want the
>> date from previous item to be used to calculate the date for current
>> item and a change in the former should cause an appropriate change on
>> the latter. org-depend.el (in contrib/lisp) can be used to define the
>> relationships but I don't know how you could link dates that way.
>>
>> Thanks for the pointer, but that file remains a little opaque to me! maybe
> someone will explain itto me.  Thanks much for the help though.
>

i've just been htinking about it and it seems this ought to be pretty
simple:
- find the last timestamp
- read its value
- go back to point
- update timestamp of current headin

so, in broken syntactically flawed pseudocode:
(defun change-stamp
(save-excursion (goto-last-timestamp)
(save-timestamp-value))
(set-timestamp-to-saved))
something like that.  but of course those functions would have to be
written.  any ideas?

 thanks,
matt

> .
> matt
>

[-- Attachment #1.2: Type: text/html, Size: 2946 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

  reply	other threads:[~2010-09-02 17:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-02 13:14 dynamically calculated timestamps? Matt Price
2010-09-02 16:52 ` Manish
2010-09-02 17:15   ` Matt Price
2010-09-02 17:31     ` Matt Price [this message]
2010-09-02 22:42 ` Bastien

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='AANLkTi=VNN5XU_7DjAUKVoRWPAOohNn8zDRFuGAZW24F@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --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).