emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How exactly does "C-c ." work in an existing timestamp?
@ 2016-01-05 13:19 Jarmo Hurri
  2016-01-05 15:14 ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2016-01-05 13:19 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]


Greetings.

Consider the following org file

# ----------------------------------
* testing
  <2016-01-07 Thu 15:00-16:15>
# ----------------------------------

When I move my cursor inside the timestamp and press "C-c .", control
jumps to a minibuffer in the echo area. But when I try, in the echo
area, to modify the date in the timestamp, it gets a bit weird to me.

1. If I try to use the method specified in the documentation to bump the
   date one day forward by typing +1d, nothing sensible happens. It
   doesn't matter if I type "+1d" directly, or " +1d" with a leading
   space.

2. If I type " 8" (note leading space), the date will move to the 8th,
   that is, forward by one day. But a leading space is required.

3. If I move my cursor on top of the current date, still in the echo
   area, the start time of the meeting and the duration start jumping
   forward in the echo area. Please find attached a screenshot of what
   the situation looks like. (This at least looks like a bug, or a
   "feature.")

How exactly does modifying the timestamp with "C-c ." work? I know it is
possible to modify the timestamp with other commands, such as S-up, but
I like the idea of modifying it with "C-c .", because the latter shows
the calendar automatically.

Thanks for help in advance,

Jarmo


[-- Attachment #2: screenshot --]
[-- Type: image/jpeg, Size: 31315 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How exactly does "C-c ." work in an existing timestamp?
  2016-01-05 13:19 How exactly does "C-c ." work in an existing timestamp? Jarmo Hurri
@ 2016-01-05 15:14 ` Nick Dokos
  2016-01-05 18:16   ` Jarmo Hurri
  0 siblings, 1 reply; 4+ messages in thread
From: Nick Dokos @ 2016-01-05 15:14 UTC (permalink / raw)
  To: emacs-orgmode

Jarmo Hurri <jarmo.hurri@iki.fi> writes:

> Greetings.
>
> Consider the following org file
>
> # ----------------------------------
> * testing
>   <2016-01-07 Thu 15:00-16:15>
> # ----------------------------------
>
> When I move my cursor inside the timestamp and press "C-c .", control
> jumps to a minibuffer in the echo area. But when I try, in the echo
> area, to modify the date in the timestamp, it gets a bit weird to me.
>
> 1. If I try to use the method specified in the documentation to bump the
>    date one day forward by typing +1d, nothing sensible happens. It
>    doesn't matter if I type "+1d" directly, or " +1d" with a leading
>    space.
>

That's relative to *today*, not relative to the existing timestamp.
+1d changes it to tomorrow. Does that not work for you?

> 2. If I type " 8" (note leading space), the date will move to the 8th,
>    that is, forward by one day. But a leading space is required.
>

Not here - with or without space, it changes it to next Friday
2016-01-08.

> 3. If I move my cursor on top of the current date, still in the echo
>    area, the start time of the meeting and the duration start jumping
>    forward in the echo area. Please find attached a screenshot of what
>    the situation looks like. (This at least looks like a bug, or a
>    "feature.")

Yes, that's weird - not sure what causes this.

--
Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How exactly does "C-c ." work in an existing timestamp?
  2016-01-05 15:14 ` Nick Dokos
@ 2016-01-05 18:16   ` Jarmo Hurri
  2016-01-05 21:00     ` Nick Dokos
  0 siblings, 1 reply; 4+ messages in thread
From: Jarmo Hurri @ 2016-01-05 18:16 UTC (permalink / raw)
  To: emacs-orgmode

Nick Dokos <ndokos@gmail.com> writes:

> Jarmo Hurri <jarmo.hurri@iki.fi> writes:
>
>> # ----------------------------------
>> * testing
>>   <2016-01-07 Thu 15:00-16:15>
>> # ----------------------------------
>>
>> When I move my cursor inside the timestamp and press "C-c .", control
>> jumps to a minibuffer in the echo area. But when I try, in the echo
>> area, to modify the date in the timestamp, it gets a bit weird to me.
>>
>> 1. If I try to use the method specified in the documentation to bump the
>>    date one day forward by typing +1d, nothing sensible happens. It
>>    doesn't matter if I type "+1d" directly, or " +1d" with a leading
>>    space.
>>
>
> That's relative to *today*, not relative to the existing timestamp.
> +1d changes it to tomorrow. Does that not work for you?

No it doesn't. What's happening...? Are you sure that you are using
_exactly_ the same timestamp I am using, with the time included in
addition to the date:

<2016-01-07 Thu 15:00-16:15>

So if you in this timestamp do "C-c ." followed by _nothing else_ than
"+1d", date switches to tomorrow?

A related thing: the documentation on timestamps says that "Org mode
will find whatever information is in there and derive anything you have
not specified from the default date and time. The default is usually the
current date and time, but when modifying an existing timestamp, or when
entering the second stamp of a range, it is taken from the stamp in the
buffer." So does this imply that "+1d" - if it would work - should
actually add one day to the given timestamp, not today?

>> 2. If I type " 8" (note leading space), the date will move to the 8th,
>>    that is, forward by one day. But a leading space is required.
>>
>
> Not here - with or without space, it changes it to next Friday
> 2016-01-08.

Nope, doesn't work here without the space, using the timestamp I wrote
above. I am in GNU Emacs 24.5.1, running the latest Org from git repo.

>> 3. If I move my cursor on top of the current date, still in the echo
>>    area, the start time of the meeting and the duration start jumping
>>    forward in the echo area. Please find attached a screenshot of what
>>    the situation looks like. (This at least looks like a bug, or a
>>    "feature.")
>
> Yes, that's weird - not sure what causes this.

Ok, but it is actually a secondary - or tertiary - issue.

Jarmo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How exactly does "C-c ." work in an existing timestamp?
  2016-01-05 18:16   ` Jarmo Hurri
@ 2016-01-05 21:00     ` Nick Dokos
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Dokos @ 2016-01-05 21:00 UTC (permalink / raw)
  To: emacs-orgmode

Jarmo Hurri <jarmo.hurri@iki.fi> writes:

> Nick Dokos <ndokos@gmail.com> writes:
>
>> Jarmo Hurri <jarmo.hurri@iki.fi> writes:
>>
>>> # ----------------------------------
>>> * testing
>>>   <2016-01-07 Thu 15:00-16:15>
>>> # ----------------------------------
>>>
>>> When I move my cursor inside the timestamp and press "C-c .", control
>>> jumps to a minibuffer in the echo area. But when I try, in the echo
>>> area, to modify the date in the timestamp, it gets a bit weird to me.
>>>
>>> 1. If I try to use the method specified in the documentation to bump the
>>>    date one day forward by typing +1d, nothing sensible happens. It
>>>    doesn't matter if I type "+1d" directly, or " +1d" with a leading
>>>    space.
>>>
>>
>> That's relative to *today*, not relative to the existing timestamp.
>> +1d changes it to tomorrow. Does that not work for you?
>
> No it doesn't. What's happening...? Are you sure that you are using
> _exactly_ the same timestamp I am using, with the time included in
> addition to the date:
>
> <2016-01-07 Thu 15:00-16:15>
>
> So if you in this timestamp do "C-c ." followed by _nothing else_ than
> "+1d", date switches to tomorrow?
>

As you guessed, I wasn't using your timestamp. The problem is that there
is junk in the minibuffer already (the 15:00-16:15 part) and the cursor
is left right after that without a space. I guess that causes parsing
errors and the date is left unchanged unless you add the space manually
(using the 8 spec, not the +1d spec - the latter does not change
anything, but I haven't chased it through to see if it gets an error in
parsing or there is something else going on).

OTOH, doing a C-a and then entering either "8 " or "+1d " (the space is
necessary to separate the days part from the hour:minutes part)
works. The point is that the time part has to follow the date part.

> A related thing: the documentation on timestamps says that "Org mode
> will find whatever information is in there and derive anything you have
> not specified from the default date and time. The default is usually the
> current date and time, but when modifying an existing timestamp, or when
> entering the second stamp of a range, it is taken from the stamp in the
> buffer." So does this imply that "+1d" - if it would work - should
> actually add one day to the given timestamp, not today?
>

Maybe.

>>> 2. If I type " 8" (note leading space), the date will move to the 8th,
>>>    that is, forward by one day. But a leading space is required.
>>>
>>
>> Not here - with or without space, it changes it to next Friday
>> 2016-01-08.
>
> Nope, doesn't work here without the space, using the timestamp I wrote
> above. I am in GNU Emacs 24.5.1, running the latest Org from git repo.
>
>>> 3. If I move my cursor on top of the current date, still in the echo
>>>    area, the start time of the meeting and the duration start jumping
>>>    forward in the echo area. Please find attached a screenshot of what
>>>    the situation looks like. (This at least looks like a bug, or a
>>>    "feature.")
>>
>> Yes, that's weird - not sure what causes this.
>
> Ok, but it is actually a secondary - or tertiary - issue.
>
> Jarmo
>
>
>

-- 
Nick

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-05 21:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-05 13:19 How exactly does "C-c ." work in an existing timestamp? Jarmo Hurri
2016-01-05 15:14 ` Nick Dokos
2016-01-05 18:16   ` Jarmo Hurri
2016-01-05 21:00     ` Nick Dokos

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).