From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Cursor jumps unexpectedly when calling org-agenda-todo Date: Fri, 24 Jan 2014 20:50:11 -0600 Message-ID: <87fvoczsf0.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6tK8-0000X4-1J for emacs-orgmode@gnu.org; Fri, 24 Jan 2014 21:50:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6tK2-0007H8-HA for emacs-orgmode@gnu.org; Fri, 24 Jan 2014 21:50:19 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:56156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6tK2-0007Gc-CC for emacs-orgmode@gnu.org; Fri, 24 Jan 2014 21:50:14 -0500 Received: from archeee (unknown [50.172.132.15]) by mail.messagingengine.com (Postfix) with ESMTPA id 20D79C00E87 for ; Fri, 24 Jan 2014 21:50:12 -0500 (EST) 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: Org Mode Hi Bastien, Commit e5259962f61c398d84d43d33c29a6f021c9b326a introduced a change (perhaps unintentional) in the function org-agenda-todo. Line 8870 added another... (setq col (current-column)) Is this supposed to be there? The problem is that this is called in the actual org buffer at the location of org-marker, thus overriding the earlier value set in line 8757. Thus, when org-agenda-todo attempts places the cursor with org-move-to-column (line 8796), it does so on the basis of the position in the org file rather than the original position in the agenda. In other words, no matter what column the cursor is at in the agenda buffer (e.g., 0, 28, 30), it gets moved to the column of org-marker in the org buffer (e.g., 13). For instance, a cursor here in the agenda... inbox: Scheduled: TODO Do something :errands: ^ gets moved to here after calling org-agenda-todo... inbox: Scheduled: TODO Do something :errands: ^ Thanks, Matt