From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Eglen Subject: Re: icalendar: exporting times of day specified in heading? Date: Wed, 17 Mar 2010 15:28:48 +0000 Message-ID: <6670.1268839728@maps> References: <15490.1263652716@cpc1-cmbg14-2-0-cust6.5-4.cable.virginmedia.com> <11681.1265116614@maps> <87ocinuljo.fsf@fastmail.fm> <5606.1268833242@maps> Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NrvAz-0007O2-Ly for emacs-orgmode@gnu.org; Wed, 17 Mar 2010 11:28:53 -0400 Received: from [140.186.70.92] (port=43635 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NrvAy-0007ND-5P for emacs-orgmode@gnu.org; Wed, 17 Mar 2010 11:28:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NrvAw-0004Ec-CZ for emacs-orgmode@gnu.org; Wed, 17 Mar 2010 11:28:52 -0400 Received: from ppsw-1.csi.cam.ac.uk ([131.111.8.131]:40031) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NrvAw-0004EU-4O for emacs-orgmode@gnu.org; Wed, 17 Mar 2010 11:28:50 -0400 In-reply-to: <5606.1268833242@maps> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Stephen Eglen Cc: Matt Lundin , emacs-orgmode@gnu.org, Carsten Dominik 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 * 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)