From mboxrd@z Thu Jan 1 00:00:00 1970 From: Brian van den Broek Subject: Re: feature suggestion: apply datetime prompt magic to selected region Date: Fri, 7 Oct 2011 16:36:27 +0200 Message-ID: References: <87ehypx5s1.fsf@Rainer.invalid> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:35388) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCBXO-0003F4-6w for emacs-orgmode@gnu.org; Fri, 07 Oct 2011 10:36:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RCBXJ-0008Q6-G3 for emacs-orgmode@gnu.org; Fri, 07 Oct 2011 10:36:34 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:57905) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RCBXJ-0008Pt-Da for emacs-orgmode@gnu.org; Fri, 07 Oct 2011 10:36:29 -0400 Received: by vcbfo14 with SMTP id fo14so3948321vcb.0 for ; Fri, 07 Oct 2011 07:36:28 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On 7 October 2011 10:12, suvayu ali wrote: > Hi Brian, > > On Fri, Oct 7, 2011 at 12:38 AM, Brian van den Broek > 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