emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Org-mode version 6.32trans (release_6.32b.190.g1818); LAST


From: Carsten Dominik
Subject: Re: [Orgmode] Org-mode version 6.32trans (release_6.32b.190.g1818); LAST_MOBILE_CHANGE line bumps local variable line
Date: Fri, 13 Nov 2009 00:51:49 +0100

Hi Charles,

good catch, thank you!

- Carsten

On Nov 12, 2009, at 6:28 PM, Charles Sebold wrote:

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/


_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

- Carsten







reply via email to

[Prev in Thread] Current Thread [Next in Thread]