From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Point jumps when changing timestamps Date: Thu, 04 Aug 2011 11:39:00 -0500 Message-ID: <87oc05f7x7.fsf@fastmail.fm> References: <87d3gmy3w9.fsf@fastmail.fm> <87ei11yxm2.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:51183) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qp0wr-0007tY-JG for emacs-orgmode@gnu.org; Thu, 04 Aug 2011 12:39:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qp0wq-0002rd-0k for emacs-orgmode@gnu.org; Thu, 04 Aug 2011 12:39:05 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:40893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qp0wp-0002rQ-Ug for emacs-orgmode@gnu.org; Thu, 04 Aug 2011 12:39:03 -0400 In-Reply-To: <87ei11yxm2.fsf@gmail.com> (Nicolas Goaziou's message of "Thu, 04 Aug 2011 18:01:25 +0200") 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: Nicolas Goaziou Cc: Org Mode Nicolas Goaziou writes: > Hello, > > Matt Lundin writes: > >> I often change timestamps with S-Left or S-Right when the cursor is at >> the point immediately following the timestamp: >> >> <2011-08-03 Wed .+1d> >> ^ cursor here >> >> When I call S-Left or S-Right at this point, the cursor jumps to the >> last character of the day of week abbreviation: >> >> <2011-08-04 Thu .+1d> >> ^ cursor now here >> >> The cursor does not jump if it is already located within the brackets. > > I understand your point but I think Org shouldn't let you use > `org-shiftleft' at this place in the first place. In my opinion, > `org-at-timestamp-p' is faulty here. A bit more generous org-at-timestamp-p does have some practical advantages: it can save cursor movement when navigating an org document. For instance, when navigating the following headline, I would typically type C-n C-e to go to the end of the scheduled line. That puts the cursor at the point directly after the scheduled timestamp: * A headline SCHEDULED: <2011-08-04 Thu> ^ i.e., here Having to move the cursor backwards one point would add a little bit of inconvenience. > I know there is currently in that function a workaround to return t when > point is at the char just after the time-stamp, but it just doesn't > sound right to me. I believe the current behavior of org-at-timestamp-p is consistent with that of the *-at-point functions. For instance if I call M-: (word-at-point) on the example below with the cursor immediately following the word, emacs returns "word". word ^ cursor here Best, Matt