emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <carsten.dominik@gmail.com>
To: Matthew Lundin <mdl@imapmail.org>
Cc: emacs-orgmode@gnu.org, Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk>
Subject: Re: icalendar: exporting times of day specified in heading?
Date: Thu, 18 Mar 2010 06:37:09 +0100	[thread overview]
Message-ID: <EB304A4D-435A-4437-966B-290C2E304FE7@gmail.com> (raw)
In-Reply-To: <87aau6id9x.fsf@fastmail.fm>

Applied, thanks.

- Carsten

On Mar 18, 2010, at 3:17 AM, Matthew Lundin wrote:

> Hi Stephen,
>
> Stephen Eglen <S.J.Eglen@damtp.cam.ac.uk> writes:
>
>>> When I enter the time of day after typing "i d", the time of day is
>>> added to the timestamp (as above) but is *not* removed the headline.
>>> E.g.,
>>>
>>> "Day entry: 9:00am go shopping [RET]"
>>>
>>> ...results in the following headline...
>>>
>>> * 9:00am go shopping
>>>  <2010-03-17 Wed 09:00>
>>
>> that's odd; I just tried that and got:
>>
>> ******* go shopping
>> 	<2010-03-17 Wed 09:00>
>> which then shows in the agenda as:
>>
>>  agenda:      9:00...... go shopping
>>
>>> I'd be curious to know whether others can duplicate this bug.
>> me too!
>>
>> Do you get any better behaviour if you just put 9:00 or 09:00?   
>> Would be
>> good to resolve this in case there is a bug lurking elsewhere...
>
> I believe I've pinned down the cause of the reported behavior.
>
> My default agenda buffer is a custom agenda block, which consists of  
> an
> agenda view and a todo view. The inclusion of the todo view caused the
> variable org-prefix-has-time to be set to nil, which in turn prevented
> org-format-agenda-item from removing the time of day string from the
> headline (see lines 4857-64 of org-agenda.el). Thus, when I called  
> "i d"
> from the block agenda, the time was not removed from the headline;  
> when
> I called "i d" from the default agenda or the calendar, it was  
> removed.
>
> Here's a patch that ensures the time of day is removed regardless of  
> the
> current value of org-prefix-has-time:
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index a50a364..9d4a4c4 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -7107,6 +7107,7 @@ the resulting entry will not be shown.  When  
> TEXT is empty, switch to
>      ((eq type 'day)
>       (let*
> 	  (fmt time time2
> +	       (org-prefix-has-time t)
> 	       (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
> --8<---------------cut here---------------end--------------->8---
>
>> Currently, org-agenda.el has (l 7079)
>>
>> 	(if org-agenda-search-headline-for-time
>>
>> to check whether we should extract the time; how about if I  
>> replaced it
>> with a variable called org-agenda-extract-time-from-entry which  
>> defaults
>> to nil so this behaviour is normally off?
>
> Many thanks for adding this new variable.
>
> Best,
> Matt

- Carsten

      reply	other threads:[~2010-03-18  7:00 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
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 [this message]

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=EB304A4D-435A-4437-966B-290C2E304FE7@gmail.com \
    --to=carsten.dominik@gmail.com \
    --cc=S.J.Eglen@damtp.cam.ac.uk \
    --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).