emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>
To: Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>
Cc: Matt Lundin <mdl@imapmail.org>,
	emacs-orgmode@gnu.org,
	Carsten Dominik <carsten.dominik@gmail.com>
Subject: Re: icalendar: exporting times of day specified in heading?
Date: Wed, 17 Mar 2010 15:28:48 +0000	[thread overview]
Message-ID: <6670.1268839728@maps> (raw)
In-Reply-To: <5606.1268833242@maps>

Ok, here is a patch that introduces a new variable so that the code to
extract times from diary entries entered using 'i d' is off by default.

2010-03-17  Stephen Eglen  <stephen@gnu.org>

	* org-agenda.el (org-agenda-insert-diary-extract-time): New
	variable.
	(org-agenda-add-entry-to-org-agenda-diary-file): Use this new
	variable rather than org-agenda-search-headline-for-time.

*** /tmp/ediff23195Zk	2010-03-17 15:22:42.000000000 +0000
--- /home/stephen/langs/emacs/elisp-ds/org-mode/lisp/org-agenda.el	2010-03-17 15:20:56.000000000 +0000
***************
*** 7066,7071 ****
--- 7066,7076 ----
  	  (const :tag "in a date tree" date-tree)
  	  (const :tag "as top level at end of file" top-level)))
  
+ (defcustom org-agenda-insert-diary-extract-time nil
+   "Non-nil means extract any time specification from the diary entry."
+   :group 'org-agenda
+   :type 'boolean)
+ 
  (defun org-agenda-add-entry-to-org-agenda-diary-file (type text &optional d1 d2)
    "Add a diary entry with TYPE to `org-agenda-diary-file'.
  If TEXT is not empty, it will become the headline of the new entry, and
***************
*** 7103,7109 ****
        (let*
  	  (fmt time time2
  	       (org-agenda-time-leading-zero t))
! 	(if org-agenda-search-headline-for-time
  	    ;; Use org-format-agenda-item to parse text for a time-range and
  	    ;; remove it.  
  	    (setq fmt (org-format-agenda-item nil text nil nil t)
--- 7108,7114 ----
        (let*
  	  (fmt time time2
  	       (org-agenda-time-leading-zero t))
! 	(if org-agenda-insert-diary-extract-time
  	    ;; Use org-format-agenda-item to parse text for a time-range and
  	    ;; remove it.  
  	    (setq fmt (org-format-agenda-item nil text nil nil t)

  reply	other threads:[~2010-03-17 15:28 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-16 14:38 icalendar: exporting times of day specified in heading? Stephen Eglen
2010-01-28 14:17 ` Carsten Dominik
2010-01-28 15:22   ` Stephen Eglen
2010-01-28 16:03     ` Eric S Fraga
2010-01-28 18:31     ` Carsten Dominik
2010-01-29 13:04       ` Eric S Fraga
2010-01-29 13:10       ` Stephen Eglen
2010-02-01 12:41       ` Stephen Eglen
2010-02-01 13:31         ` Carsten Dominik
2010-02-01 13:49           ` Eric S Fraga
2010-02-01 14:00           ` Stephen Eglen
2010-02-01 14:08             ` Stephen Eglen
2010-02-02 13:16 ` Stephen Eglen
2010-02-03 15:25   ` Carsten Dominik
2010-03-17 13:26   ` Matt Lundin
2010-03-17 13:40     ` Stephen Eglen
2010-03-17 15:28       ` Stephen Eglen [this message]
2010-03-17 15:55         ` Carsten Dominik
2010-03-17 18:51           ` Stephen Eglen
     [not found]             ` <0F399028-B7BE-4C90-AEA7-099AC05E9040@tsdye.com>
2010-03-17 20:15               ` Stephen Eglen
2010-03-18  2:17       ` Matthew Lundin
2010-03-18  5:37         ` Carsten Dominik

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=6670.1268839728@maps \
    --to=s.j.eglen@damtp.cam.ac.uk \
    --cc=carsten.dominik@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mdl@imapmail.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).