emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] feature suggestion: apply datetime prompt magic to selected regi


From: Brian van den Broek
Subject: Re: [O] feature suggestion: apply datetime prompt magic to selected region
Date: Fri, 7 Oct 2011 16:36:27 +0200

On 7 October 2011 10:12, suvayu ali <address@hidden> wrote:
> Hi Brian,
>
> On Fri, Oct 7, 2011 at 12:38 AM, Brian van den Broek
> <address@hidden> wrote:
>> It just seemed that since orgmode parse text yanked into the dt prompt, it
>> would be in keeping with the general spirit of the mode to parse selected
>> text, too. But, as I said, it isn't a big deal.
>
> I don't quite understand this, are you saying when I yank text into an
> org buffer it converts any random time stamp like information into
> proper org format timestamps? So if I were to kill the following text
> from some buffer,
>
> some random time stamp 2011/10/07
>
> and yank it into an org buffer, it will be converted to
>
> some random time stamp <2011-10-07>
>
> I have been using org for quite sometime, but I don't think there is
> any such feature. And if there was, I would say that's too intrusive
> to assume I want every time information to be stored as timestamps. Or
> on the other hand, do you mean that the text doesn't change but the
> text face does? I would think that is a fontlocking issue.
>
> If I am misunderstanding, could you please illustrate with a small example?


Hi Suvayu and all,

It is clear that I've not been clear. I'll explain and then let it go. :-)

Say I have a buffer with the following contents:

<------>
Some text in a buffer with orgmode enabled.

Blah blah, Tuesday at 3pm blah blah September 19, 2003, 14:00-15:00 blah blah
<------>

As it is now, if I kill the text "Tuesday at 3pm", and with cursor
where I killed hit C-u C-c . to invoke org-time-stamp with prefix
argument, and then yank the just killed text into the resulting
prompt, and repeat for the text "Sept. ... 15:00", I get

<------>
Some text in a buffer with orgmode enabled.

Blah blah, <2011-10-11 Tue 15:00> blah blah <2003-09-19 Fri
14:00-15:00> blah blah
<------>

(the exact way the org-time-stamp command interprets the text is a
function of the date that it is run and of the value of
org-read-date-prefer-future, and possibly other variables, too.)

What I was suggesting was it would be cool and a small time-saver if I
could select the text "Tuesday at 3pm" and hit C-u C-c . and have the
region replaced with the stamp <2011-10-11 Tue 15:00>, entirely
bypassing the kill and yank steps. (Achim correctly suggested that
what I want to do could be done with a keyboard macro. I still think
it would be neat.)

The reason that I suggested it is that I'd tried it, half-expecting it
to work. It seems to me that orgmode is pretty good at making my life
easier and this is a (very small) way in which it could, but doesn't
currently. Certainly, if I am killing text to yank into the datetime
prompt, there is a high likelihood that what I really want to do is to
replace that text with a timestamp that org derives from it. So, why
not enable that in one swell foop?

I hope that has made my suggestion clear. I'm sorry I was unclear
earlier and thus created a bit of noise.

Best,

Brian vdB



reply via email to

[Prev in Thread] Current Thread [Next in Thread]