From: Brian van den Broek <brian.van.den.broek@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: feature suggestion: apply datetime prompt magic to selected region
Date: Fri, 7 Oct 2011 16:36:27 +0200 [thread overview]
Message-ID: <CAF6Daj+HVoLH-n8M-bDYr2GN5Uu-QUgkqr4OTRGfYE-wL_cn4A@mail.gmail.com> (raw)
In-Reply-To: <CAMXnza09ZRkN6fb7-bQMOKLgjC5Ri9QA_z3KvwDNmi8fGcN+Xg@mail.gmail.com>
On 7 October 2011 10:12, suvayu ali <fatkasuvayu+linux@gmail.com> wrote:
> Hi Brian,
>
> On Fri, Oct 7, 2011 at 12:38 AM, Brian van den Broek
> <brian.van.den.broek@gmail.com> 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
next prev parent reply other threads:[~2011-10-07 14:36 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-06 12:48 feature suggestion: apply datetime prompt magic to selected region Brian van den Broek
2011-10-06 19:46 ` Achim Gratz
2011-10-06 22:38 ` Brian van den Broek
2011-10-07 8:12 ` suvayu ali
2011-10-07 14:36 ` Brian van den Broek [this message]
2011-10-07 15:42 ` Nick Dokos
2011-10-08 7:33 ` suvayu ali
2011-10-24 6:00 ` Bastien
2011-10-25 16:56 ` Brian van den Broek
2011-10-26 7:56 ` Eric S Fraga
2011-10-26 12:00 ` Brian van den Broek
-- strict thread matches above, loose matches on Subject: below --
2011-10-06 12:40 Brian van den Broek
2011-12-28 16:18 ` Bastien
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=CAF6Daj+HVoLH-n8M-bDYr2GN5Uu-QUgkqr4OTRGfYE-wL_cn4A@mail.gmail.com \
--to=brian.van.den.broek@gmail.com \
--cc=emacs-orgmode@gnu.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).