|
@@ -33,15 +33,12 @@
|
|
|
|
|
|
(require 'org)
|
|
(require 'org)
|
|
(require 'org-agenda)
|
|
(require 'org-agenda)
|
|
|
|
+(require 'cl-lib)
|
|
|
|
+
|
|
(defvar org-agenda-keep-restricted-file-list)
|
|
(defvar org-agenda-keep-restricted-file-list)
|
|
|
|
|
|
;;; Code:
|
|
;;; Code:
|
|
|
|
|
|
-(eval-when-compile (require 'cl))
|
|
|
|
-
|
|
|
|
-(declare-function org-pop-to-buffer-same-window
|
|
|
|
- "org-compat" (&optional buffer-or-name norecord label))
|
|
|
|
-
|
|
|
|
(defgroup org-mobile nil
|
|
(defgroup org-mobile nil
|
|
"Options concerning support for a viewer/editor on a mobile device."
|
|
"Options concerning support for a viewer/editor on a mobile device."
|
|
:tag "Org Mobile"
|
|
:tag "Org Mobile"
|
|
@@ -817,7 +814,7 @@ If BEG and END are given, only do this in that region."
|
|
(while (re-search-forward "^\\* \\(.*\\)" end t)
|
|
(while (re-search-forward "^\\* \\(.*\\)" end t)
|
|
(and (>= (- (match-end 1) (match-beginning 1)) 2)
|
|
(and (>= (- (match-end 1) (match-beginning 1)) 2)
|
|
(not (equal (downcase (substring (match-string 1) 0 2)) "f("))
|
|
(not (equal (downcase (substring (match-string 1) 0 2)) "f("))
|
|
- (incf cnt-new)))
|
|
|
|
|
|
+ (cl-incf cnt-new)))
|
|
|
|
|
|
;; Find and apply the edits
|
|
;; Find and apply the edits
|
|
(goto-char beg)
|
|
(goto-char beg)
|
|
@@ -833,11 +830,11 @@ If BEG and END are given, only do this in that region."
|
|
(eos (save-excursion (org-end-of-subtree t t)))
|
|
(eos (save-excursion (org-end-of-subtree t t)))
|
|
(cmd (if (equal action "")
|
|
(cmd (if (equal action "")
|
|
'(progn
|
|
'(progn
|
|
- (incf cnt-flag)
|
|
|
|
|
|
+ (cl-incf cnt-flag)
|
|
(org-toggle-tag "FLAGGED" 'on)
|
|
(org-toggle-tag "FLAGGED" 'on)
|
|
(and note
|
|
(and note
|
|
(org-entry-put nil "THEFLAGGINGNOTE" note)))
|
|
(org-entry-put nil "THEFLAGGINGNOTE" note)))
|
|
- (incf cnt-edit)
|
|
|
|
|
|
+ (cl-incf cnt-edit)
|
|
(cdr (assoc action org-mobile-action-alist))))
|
|
(cdr (assoc action org-mobile-action-alist))))
|
|
(note (and (equal action "")
|
|
(note (and (equal action "")
|
|
(buffer-substring (1+ (point-at-eol)) eos)))
|
|
(buffer-substring (1+ (point-at-eol)) eos)))
|
|
@@ -854,11 +851,11 @@ If BEG and END are given, only do this in that region."
|
|
(if (stringp id-pos)
|
|
(if (stringp id-pos)
|
|
(insert id-pos " ")
|
|
(insert id-pos " ")
|
|
(insert "BAD REFERENCE "))
|
|
(insert "BAD REFERENCE "))
|
|
- (incf cnt-error)
|
|
|
|
|
|
+ (cl-incf cnt-error)
|
|
(throw 'next t))
|
|
(throw 'next t))
|
|
(unless cmd
|
|
(unless cmd
|
|
(insert "BAD FLAG ")
|
|
(insert "BAD FLAG ")
|
|
- (incf cnt-error)
|
|
|
|
|
|
+ (cl-incf cnt-error)
|
|
(throw 'next t))
|
|
(throw 'next t))
|
|
(move-marker bos-marker (point))
|
|
(move-marker bos-marker (point))
|
|
(if (re-search-forward "^** Old value[ \t]*$" eos t)
|
|
(if (re-search-forward "^** Old value[ \t]*$" eos t)
|
|
@@ -898,7 +895,7 @@ If BEG and END are given, only do this in that region."
|
|
(when org-mobile-error
|
|
(when org-mobile-error
|
|
(pop-to-buffer-same-window (marker-buffer marker))
|
|
(pop-to-buffer-same-window (marker-buffer marker))
|
|
(goto-char marker)
|
|
(goto-char marker)
|
|
- (incf cnt-error)
|
|
|
|
|
|
+ (cl-incf cnt-error)
|
|
(insert (if (stringp (nth 1 org-mobile-error))
|
|
(insert (if (stringp (nth 1 org-mobile-error))
|
|
(nth 1 org-mobile-error)
|
|
(nth 1 org-mobile-error)
|
|
"EXECUTION FAILED")
|
|
"EXECUTION FAILED")
|