From mboxrd@z Thu Jan 1 00:00:00 1970 From: Charles Sebold Subject: Org-mode version 6.32trans (release_6.32b.190.g1818); LAST_MOBILE_CHANGE line bumps local variable line Date: Thu, 12 Nov 2009 11:28:33 -0600 Message-ID: <87hbsz8x01.fsf@zancanda.staticcling.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8dcN-0007CO-3Z for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 12:37:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8dcL-0007Ba-N9 for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 12:37:58 -0500 Received: from [199.232.76.173] (port=38863 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8dcL-0007BO-Fn for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 12:37:57 -0500 Received: from fg-out-1718.google.com ([72.14.220.159]:8205) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N8dcL-0001tN-0H for emacs-orgmode@gnu.org; Thu, 12 Nov 2009 12:37:57 -0500 Received: by fg-out-1718.google.com with SMTP id e21so2017613fga.12 for ; Thu, 12 Nov 2009 09:37:55 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org In org-mobile-timestamp-buffer(), it tries to insert the LAST_MOBILE_CHANGE timestamp on the first line if there isn't already one. I think this should check first to see if the first line has local variables, for example: # -*- mode: org; coding: utf-8; -*- ...and it should skip past that line if it's there. Any chance of changing that? (The workaround for the moment is to make sure that there is always a timestamp line present already, and that's fine, but this could surprise somebody who wasn't expecting it - like me, until I tracked this down.) Maybe it could be something like: --- a/lisp/org-mobile.el +++ b/lisp/org-mobile.el @@ -738,10 +738,13 @@ If BEG and END are given, only do this in that region." (save-restriction (widen) (goto-char (point-min)) - (when (re-search-forward + (if (re-search-forward "^\\([ \t]*\\)#\\+LAST_MOBILE_CHANGE:.*\n?" nil t) - (goto-char (match-end 1)) - (delete-region (point) (match-end 0))) + (progn + (goto-char (match-end 1)) + (delete-region (point) (match-end 0))) + (if (looking-at ".*-\\*-.*-\\*-") + (forward-line 1))) (insert "#+LAST_MOBILE_CHANGE: " (format-time-string "%Y-%m-%d %T") "\n"))))) Emacs : GNU Emacs 23.1.50.1 (i386-mingw-nt5.1.2600) of 2009-11-11 on CT-SEBOLDCR-T4C Package: Org-mode version 6.32trans (release_6.32b.190.g1818) -- Charles Sebold http://merbc.invigorated.org/ http://triablogue.blogspot.com/