Re: [PATCH] org-mac-link: Disable Evernote capture by default

2021-02-27 Thread Aaron Jensen
On Wed, Feb 17, 2021 at 9:55 AM Aaron Jensen  wrote:
>
> The two `shell-command-to-string` invocations during eval are
> extremely slow. Users of Evernote should `org-mac-grab-Evernote-app-p`
> and `org-mac-evernote-path` explicitly.

Hi all,

Any chance of getting this merged in? It's a pretty nasty one for mac users.

Thanks,

Aaron



[PATCH] org-mac-link: Disable Evernote capture by default

2021-02-17 Thread Aaron Jensen
The two `shell-command-to-string` invocations during eval are
extremely slow. Users of Evernote should `org-mac-grab-Evernote-app-p`
and `org-mac-evernote-path` explicitly.

* contrib/lisp/org-mac-link.el (org-mac-grab-Evernote-app-p): Default
to nil
(org-mac-evernote-path): Default to nil and add a function of the same
name that will either use the variable or a shell invocation to mdfind
(org-mac-evernote-note-open): Use the function version of org-mac-evernote-path
(org-as-get-selected-evernote-notes): Use the function version of
org-mac-evernote-path
---
 contrib/lisp/org-mac-link.el | 23 ++-
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/contrib/lisp/org-mac-link.el b/contrib/lisp/org-mac-link.el
index e56354c4f..ec004d8b9 100644
--- a/contrib/lisp/org-mac-link.el
+++ b/contrib/lisp/org-mac-link.el
@@ -207,18 +207,13 @@
   :group 'org-mac-flagged-mail
   :type 'string)
 
-(defcustom org-mac-grab-Evernote-app-p
-  (< 0 (length (shell-command-to-string
-"mdfind kMDItemCFBundleIdentifier == 
'com.evernote.Evernote'")))
+(defcustom org-mac-grab-Evernote-app-p nil
   "Add menu option [e]vernote to grab note links from Evernote.app."
   :tag "Grab Evernote.app note links"
   :group 'org-mac-link
   :type 'boolean)
 
-(defcustom org-mac-evernote-path (replace-regexp-in-string (rx (* (any " 
\t\n")) eos)
-   ""
-   
(shell-command-to-string
-"mdfind 
kMDItemCFBundleIdentifier == 'com.evernote.Evernote'"))
+(defcustom org-mac-evernote-path nil
   "The path to the installed copy of Evernote.app. Do not escape spaces as the 
AppleScript call will quote this string."
   :tag "Path to Evernote"
   :group 'org-mac-link
@@ -809,11 +804,21 @@ after heading."
 
 (org-link-set-parameters "mac-evernote" :follow #'org-mac-evernote-note-open)
 
+(defun org-mac-evernote-path ()
+  "Get path to evernote.
+First consider the value of ORG-MAC-EVERNOTE-PATH, then attempt to find it.
+Finding the path can be slow."
+  (or org-mac-evernote-path
+  (replace-regexp-in-string (rx (* (any " \t\n")) eos)
+""
+(shell-command-to-string
+ "mdfind kMDItemCFBundleIdentifier == 
'com.evernote.Evernote'"
+
 (defun org-mac-evernote-note-open (noteid _)
   "Open a note in Evernote"
   (do-applescript
(concat
-"tell application \"" org-mac-evernote-path "\"\n"
+"tell application \"" (org-mac-evernote-path) "\"\n"
 "set theNotes to get every note of every notebook where its local id 
is \"" (substring-no-properties noteid) "\"\n"
 "repeat with _note in theNotes\n"
 "if length of _note is not 0 then\n"
@@ -828,7 +833,7 @@ after heading."
   "AppleScript to create links to selected notes in Evernote.app."
   (do-applescript
(concat
-"tell application \"" org-mac-evernote-path "\"\n"
+"tell application \"" (org-mac-evernote-path) "\"\n"
  "set noteCount to count selection\n"
  "if (noteCount < 1) then\n"
  "return\n"
-- 
2.28.0




Re: [PATCH] lisp/org-refile.el: Add mandatory when argument

2021-01-10 Thread Aaron Jensen
On Sun, Jan 10, 2021 at 4:12 PM Kyle Meyer  wrote:
> > * lisp/org-refile.el (org-copy): When argument added
>
> Thanks, but this was handled by 248dfcd71 earlier this week.

Ah, excellent!



[PATCH] lisp/org-refile.el: Add mandatory when argument

2021-01-10 Thread Aaron Jensen
* lisp/org-refile.el (org-copy): When argument added
---
 lisp/org-refile.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/org-refile.el b/lisp/org-refile.el
index 0b44fdfa5..47f22ecc0 100644
--- a/lisp/org-refile.el
+++ b/lisp/org-refile.el
@@ -373,7 +373,7 @@ the *old* location.")
 (defvar org-refile-keep nil
   "Non-nil means `org-refile' will copy instead of refile.")

-(define-obsolete-function-alias 'org-copy 'org-refile-copy)
+(define-obsolete-function-alias 'org-copy 'org-refile-copy "Org 9.4")

 ;;;###autoload
 (defun org-refile-copy ()
-- 
2.28.0



Re: Src block fontification when scrolled off window

2020-01-20 Thread Aaron Jensen
On Tue, Jan 14, 2020 at 8:20 AM Fraga, Eric  wrote:
>
> On Tuesday, 14 Jan 2020 at 07:21, Aaron Jensen wrote:
> > In one of my org files, I will occasionally see src blocks lose their
> > formatting. [...]
> >
> > Is this expected behavior? Is there a way to increase the lookback amount?
>
> I don't see this behaviour.  You might want to look at
> jit-lock-chunk-size but that's me grasping at straws...

I'm trying this out. I've also started opening src edit blocks in a
different window. I haven't seen the behavior since making these
changes, so I'm happy. Thanks!



Src block fontification when scrolled off window

2020-01-14 Thread Aaron Jensen
Hi,

In one of my org files, I will occasionally see src blocks lose their
formatting. Specifically, if I switch to editing the src block, or I
first open an org file that is expanded to a section with a src block,
if the beginning #+begin_src is scrolled above the window, but part of
the block itself is still visible, the src block will be fontified as
if it were regular text in org. I have org-src-fontify-natively. If I
scroll up so that #+begin_src is in view, it fontifies as expected.

Is this expected behavior? Is there a way to increase the lookback amount?

Thanks,

Aaron



Re: [O] [PATCH] Add support for Brave to org-mac-link

2018-11-25 Thread Aaron Jensen
On November 25, 2018 at 1:08:35 AM, Nicolas Goaziou
(m...@nicolasgoaziou.fr(mailto:m...@nicolasgoaziou.fr)) wrote:

> Hello,
> Applied.
> Fixed.

Thank you for the quick response!

Aaron



[O] [PATCH] Add support for Brave to org-mac-link

2018-11-24 Thread Aaron Jensen
Hi all,

Brave is a chromium-based browser, so the existing Chrome code works
with slight modifications.

By the way, I’ve signed FSF papers though
https://orgmode.org/worg/org-contribute.html currently has me listed
in the wrong place.

Best,

Aaron


0001-org-mac-link-Add-support-for-Brave.patch
Description: Binary data


[O] Bug: C-c C-c on deadline timestamp can do nothing useful [9.1.2 (9.1.2-elpaplus @ /Users/aaronjensen/.emacs.d/elpa/26.0/org-plus-contrib-20171004/)]

2017-10-07 Thread Aaron Jensen

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


>From emacs -Q:

M-x org-mode
Insert the following:

* Test
  DEADLINE: <2017-10-06 Sat>

Place point on timestamp and hit C-c C-c

Expected:

Timestamp updated to <2017-10-06 Fri>

Actual:

This is displayed in *Messages*:

user-error: ‘C-c C-c’ can do nothing useful here


Emacs  : GNU Emacs 26.0.60 (build 1, x86_64-apple-darwin17.0.0, NS 
appkit-1561.00 Version 10.13 (Build 17A365))
 of 2017-09-30
Package: Org mode version 9.1.2 (9.1.2-elpaplus @ 
/Users/aaronjensen/.emacs.d/elpa/26.0/org-plus-contrib-20171004/)



[O] org-plot on multiple y axes

2017-04-12 Thread Aaron Jensen
Hi,

Is it possible to use org-plot to plot on multiple y axes? gnuplot
supports y2range, and I can specify that, but I don't know how (or if
it is possible) to specify which deps should be plotted against which
axis.

If this is not possible, is it possible to have two charts plotted
against the same table? Thanks!

Aaron



Re: [O] Fontification error

2017-03-19 Thread Aaron Jensen
On Sun, Mar 19, 2017 at 3:58 PM, Nicolas Goaziou  wrote:
> Hello,
>
> Applied. Thank you.
>
> I added TINYCHANGE at the end of the commit message since I don't know
> whether you signed FSF papers or not.

Thank you! I have not yet.

Aaron



[O] [PATCH] Reduce scope of inhibit-modification-hooks

2017-03-19 Thread Aaron Jensen
This fixes the fontification error discussed here:

http://lists.gnu.org/archive/html/emacs-orgmode/2017-03/msg00423.html

and here:

http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00280.html
---
 lisp/org-src.el | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index dfc422b..b0f952f 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -525,19 +525,19 @@ as `org-src-fontify-natively' is non-nil."
  (let ((inhibit-modification-hooks nil))
(erase-buffer)
;; Add string and a final space to ensure property change.
-   (insert string " ")
-   (unless (eq major-mode lang-mode) (funcall lang-mode))
-   (org-font-lock-ensure)
-   (let ((pos (point-min)) next)
- (while (setq next (next-property-change pos))
-   ;; Handle additional properties from font-lock, so as to
-   ;; preserve, e.g., composition.
-   (dolist (prop (cons 'face font-lock-extra-managed-props))
- (let ((new-prop (get-text-property pos prop)))
-   (put-text-property
-(+ start (1- pos)) (1- (+ start next)) prop new-prop
-org-buffer)))
-   (setq pos next)
+   (insert string " "))
+ (unless (eq major-mode lang-mode) (funcall lang-mode))
+ (org-font-lock-ensure)
+ (let ((pos (point-min)) next)
+   (while (setq next (next-property-change pos))
+ ;; Handle additional properties from font-lock, so as to
+ ;; preserve, e.g., composition.
+ (dolist (prop (cons 'face font-lock-extra-managed-props))
+   (let ((new-prop (get-text-property pos prop)))
+ (put-text-property
+  (+ start (1- pos)) (1- (+ start next)) prop new-prop
+  org-buffer)))
+ (setq pos next
;; Add Org faces.
(let ((src-face (nth 1 (assoc-string lang org-src-block-faces t
   (when (or (facep src-face) (listp src-face))
--
2.10.0



Re: [O] Fontification error

2017-03-19 Thread Aaron Jensen
That appeared to fix it for me! Thanks.

>From cdf2c445e46d5691ee82adb1a6ca0bb0ae6bbd1b Mon Sep 17 00:00:00 2001
From: Aaron Jensen <aaronjen...@gmail.com>
Date: Sun, 19 Mar 2017 12:49:18 -0700
Subject: [PATCH] Reduce scope of inhibit-modification-hooks

This fixes a fontification error that some users were having.
---
 lisp/org-src.el | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/lisp/org-src.el b/lisp/org-src.el
index dfc422b..b0f952f 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -525,19 +525,19 @@ as `org-src-fontify-natively' is non-nil."
  (let ((inhibit-modification-hooks nil))
(erase-buffer)
;; Add string and a final space to ensure property change.
-   (insert string " ")
-   (unless (eq major-mode lang-mode) (funcall lang-mode))
-   (org-font-lock-ensure)
-   (let ((pos (point-min)) next)
- (while (setq next (next-property-change pos))
-   ;; Handle additional properties from font-lock, so as to
-   ;; preserve, e.g., composition.
-   (dolist (prop (cons 'face font-lock-extra-managed-props))
- (let ((new-prop (get-text-property pos prop)))
-   (put-text-property
-(+ start (1- pos)) (1- (+ start next)) prop new-prop
-org-buffer)))
-   (setq pos next)
+   (insert string " "))
+ (unless (eq major-mode lang-mode) (funcall lang-mode))
+ (org-font-lock-ensure)
+ (let ((pos (point-min)) next)
+   (while (setq next (next-property-change pos))
+ ;; Handle additional properties from font-lock, so as to
+ ;; preserve, e.g., composition.
+ (dolist (prop (cons 'face font-lock-extra-managed-props))
+   (let ((new-prop (get-text-property pos prop)))
+ (put-text-property
+  (+ start (1- pos)) (1- (+ start next)) prop new-prop
+  org-buffer)))
+ (setq pos next
;; Add Org faces.
(let ((src-face (nth 1 (assoc-string lang org-src-block-faces t
   (when (or (facep src-face) (listp src-face))
--
2.10.0

On Sun, Mar 19, 2017 at 11:04 AM, Noam Postavsky <npost...@gmail.com> wrote:
> On Sun, Mar 19, 2017 at 1:05 PM, Kyle Meyer <k...@kyleam.com> wrote:
>>>
>>> * lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
>>> `inhibit-modification-hooks' to nil, since this function can be called
>>> from jit-lock-function which binds that variable to t (Bug#25132).
>>>
>>> Call modification hooks in org-src fontify buffers
>>> ae8264c5cccf19d5b25a340a605bf2f07de1577e
>>> Noam Postavsky
>>> Sun Jan 29 11:01:32 2017 -0500
>>>
>>> At the moment, the minimum ECM I know of is to install spacemacs and
>>> open an org file containing:
>>
>> [+cc Noam because I'm not sure if he follows this list.]
>
> [Thanks, I don't follow this list indeed]
>
>>
>> I backported this commit to the Org repo, but I don't have any good
>> guesses at what's leading to the error below.
>
> I think the problem is that the let-binding's scope is too big, it's
> applying to a text property change on the original org buffer, which
> seems to cause problems with one of its modifcation hooks due to
> narrowing. Actually, I initially posted the patch with a smaller
> binding, but then enlarged it before I pushed it; I don't remember
> why...
>
> Could someone who can reproduce this problem try shrinking the scope
> of (let ((inhibit-modification-hooks nil))...) to stop after the
> (insert " ") as in [1], and see if that fixes it?
>
> [1]: 
> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25132;att=3;filename=v1-0001-Call-modification-hooks-in-org-src-fontify-buffer.patch;msg=22



Re: [O] Fontification error

2017-03-19 Thread Aaron Jensen
This is in reply to the Fontification error Thomas S. Dye reported on
Feb 13 2017:

http://lists.gnu.org/archive/html/emacs-orgmode/2017-02/msg00280.html

I was able to bisect this error to the following commit:

f2a5104e45b6f44a08960ae49ba20c124a8fa9d8 is the first bad commit
commit f2a5104e45b6f44a08960ae49ba20c124a8fa9d8
Author: Noam Postavsky 
Date:   Sat Jan 7 16:05:19 2017 -0500

Backport commit ae8264c5cc from Emacs

* lisp/org-src.el (org-src-font-lock-fontify-block): Let-bind
`inhibit-modification-hooks' to nil, since this function can be called
from jit-lock-function which binds that variable to t (Bug#25132).

Call modification hooks in org-src fontify buffers
ae8264c5cccf19d5b25a340a605bf2f07de1577e
Noam Postavsky
Sun Jan 29 11:01:32 2017 -0500

At the moment, the minimum ECM I know of is to install spacemacs and
open an org file containing:

#+begin_src emacs-lisp
()
#+end_src

This is the stack trace if I remove the condition-case that leads to
the fontification error warning:

Debugger entered--Lisp error: (args-out-of-range 6 23)
  put-text-property(23 6 fontified nil)
  jit-lock-after-change(23 24 1)
  put-text-property(23 24 face nil #)
  (let ((new-prop (get-text-property pos prop))) (put-text-property (+
start (1- pos)) (1- (+ start next)) prop new-prop org-buffer))
  (let ((prop (car --dolist-tail--))) (let ((new-prop
(get-text-property pos prop))) (put-text-property (+ start (1- pos))
(1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
(cdr --dolist-tail--)))
  (while --dolist-tail-- (let ((prop (car --dolist-tail--))) (let
((new-prop (get-text-property pos prop))) (put-text-property (+ start
(1- pos)) (1- (+ start next)) prop new-prop org-buffer)) (setq
--dolist-tail-- (cdr --dolist-tail--
  (let ((--dolist-tail-- (cons (quote face)
font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
(car --dolist-tail--))) (let ((new-prop (get-text-property pos prop)))
(put-text-property (+ start (1- pos)) (1- (+ start next)) prop
new-prop org-buffer)) (setq --dolist-tail-- (cdr --dolist-tail--)
  (while (setq next (next-property-change pos)) (let ((--dolist-tail--
(cons (quote face) font-lock-extra-managed-props))) (while
--dolist-tail-- (let ((prop (car --dolist-tail--))) (let ((new-prop
(get-text-property pos prop))) (put-text-property (+ start (1- pos))
(1- (+ start next)) prop new-prop org-buffer)) (setq --dolist-tail--
(cdr --dolist-tail--) (setq pos next))
  (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
(car --dolist-tail--))) (let ((new-prop ...)) (put-text-property (+
start ...) (1- ...) prop new-prop org-buffer)) (setq --dolist-tail--
(cdr --dolist-tail--) (setq pos next)))
  (let ((inhibit-modification-hooks nil)) (erase-buffer) (insert
string " ") (if (eq major-mode lang-mode) nil (funcall lang-mode))
(org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- (cons (quote face)
font-lock-extra-managed-props))) (while --dolist-tail-- (let ((prop
...)) (let (...) (put-text-property ... ... prop new-prop org-buffer))
(setq --dolist-tail-- (cdr --dolist-tail--) (setq pos next
  (save-current-buffer (set-buffer (get-buffer-create (format "
*org-src-fontification:%s*" lang-mode))) (let
((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ")
(if (eq major-mode lang-mode) nil (funcall lang-mode))
(org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- (cons ...
font-lock-extra-managed-props))) (while --dolist-tail-- (let (...)
(let ... ...) (setq --dolist-tail-- ... (setq pos next)
  (let ((string (buffer-substring-no-properties start end)) (modified
(buffer-modified-p)) (org-buffer (current-buffer)))
(remove-text-properties start end (quote (face nil)))
(save-current-buffer (set-buffer (get-buffer-create (format "
*org-src-fontification:%s*" lang-mode))) (let
((inhibit-modification-hooks nil)) (erase-buffer) (insert string " ")
(if (eq major-mode lang-mode) nil (funcall lang-mode))
(org-font-lock-ensure) (let ((pos (point-min)) next) (while (setq next
(next-property-change pos)) (let ((--dolist-tail-- ...)) (while
--dolist-tail-- (let ... ... ...))) (setq pos next) (let
((src-face (nth 1 (assoc-string lang org-src-block-faces t (if (or
(facep src-face) (listp src-face)) (progn
(font-lock-append-text-property start end (quote face) src-face)))
(font-lock-append-text-property start end (quote face) (quote
org-block))) (add-text-properties start end (quote
(font-lock-fontified t fontified t font-lock-multiline t)))
(set-buffer-modified-p modified))
  (progn (let ((string (buffer-substring-no-properties start end))
(modified (buffer-modified-p)) (org-buffer (current-buffer)))

Re: [O] org-mobile-push breaks currently open org-agenda

2017-03-11 Thread Aaron Jensen
FYI, I bisected and this is the first bad commit:

bed17f1bb505dd6ecf80b44bf1ef267d45efb206 is the first bad commit
commit bed17f1bb505dd6ecf80b44bf1ef267d45efb206
Author: Nicolas Goaziou <m...@nicolasgoaziou.fr>
Date:   Sat Jan 14 16:12:43 2017 +0100

org-mobile: Fix `org-mobile-push' with stick agendas

* lisp/org-mobile.el (org-mobile-push): Do not move back to non-sticky
  agendas once called.

Reported-by: Ian Dunn <du...@gnu.org>
<http://permalink.gmane.org/gmane.emacs.orgmode/111334>

:04 04 b51c5ae0d7d85ce3db8be72b495ba083f9104abd
3e1fb05b932e22cd0897baa94a8fb3073abe6a49 M  lisp



On Sat, Mar 11, 2017 at 7:54 AM, Aaron Jensen <aaronjen...@gmail.com> wrote:
> On Sat, Mar 11, 2017 at 7:53 AM, Aaron Jensen <aaronjen...@gmail.com> wrote:
>> $ git clone 
>> g...@github.com:aaronjensen/org-mobile-push-breaks-org-agenda-ecm.git
>> ~/.emacs.d.old
>
> Sorry, this line was wrong, it should clone to ~/.emacs.d:
>
> $ git clone 
> g...@github.com:aaronjensen/org-mobile-push-breaks-org-agenda-ecm.git
> ~/.emacs.d



Re: [O] org-mobile-push breaks currently open org-agenda

2017-03-11 Thread Aaron Jensen
On Sat, Mar 11, 2017 at 7:53 AM, Aaron Jensen <aaronjen...@gmail.com> wrote:
> $ git clone 
> g...@github.com:aaronjensen/org-mobile-push-breaks-org-agenda-ecm.git
> ~/.emacs.d.old

Sorry, this line was wrong, it should clone to ~/.emacs.d:

$ git clone 
g...@github.com:aaronjensen/org-mobile-push-breaks-org-agenda-ecm.git
~/.emacs.d



Re: [O] org-mobile-push breaks currently open org-agenda

2017-03-11 Thread Aaron Jensen
On Fri, Mar 10, 2017 at 9:28 AM, Nicolas Goaziou  wrote:
> ATM, I am not sure how it happens since the headline was extracted from
> some document. Could you try evaluating
>
>   M-: (org-get-at-bol 'org-marker)
>
> on a problematic line and report back the problem?

I just get this:

#

> Better, do you have any ECM for the problem?

Here is an ECM:
https://github.com/aaronjensen/org-mobile-push-breaks-org-agenda-ecm

$ mv ~/.emacs.d ~/.emacs.d.old
$ git clone 
g...@github.com:aaronjensen/org-mobile-push-breaks-org-agenda-ecm.git
~/.emacs.d.old
$ emacs

In emacs:

1. M-x org-agenda a
2. M-x org-mobile-push
3. C-n to TODO and hit t to mark as done

This works fine with the built-in version of emacs, so this appears to
be either a regression or a contrib issue.

Thanks,

Aaron



Re: [O] org-mobile-push breaks currently open org-agenda

2017-03-10 Thread Aaron Jensen
Hi,

> On Mar 10, 2017, at 8:20 AM, Nicolas Goaziou  wrote:
> 
> Hello,
> 
> Could you use Org uncompiled (C-u M-x org-reload)? your backtrace is
> hardly usable.

Thank you for the tip. Here is the trace:

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  set-buffer(nil)
  (save-current-buffer (set-buffer buffer) buffer-undo-list)
  (let ((--cline (org-current-line)) (--cmd this-command) (--buf1 
(current-buffer)) (--buf2 buffer) (--undo1 buffer-undo-list) (--undo2 
(save-current-buffer (set-buffer buffer) buffer-undo-list)) --c1 --c2) 
(save-current-buffer (set-buffer buffer) (widen) (goto-char pos) 
(org-show-context (quote agenda)) (let ((current-prefix-arg arg)) 
(call-interactively (quote org-todo))) (and (bolp) (forward-char 1)) (setq 
newhead (org-get-heading)) (if (and (and (boundp (quote 
org-agenda-headline-snapshot-before-repeat)) 
org-agenda-headline-snapshot-before-repeat) (not (equal 
org-agenda-headline-snapshot-before-repeat newhead)) todayp) (progn (setq 
newhead org-agenda-headline-snapshot-before-repeat just-one t))) 
(save-excursion (org-back-to-heading) (move-marker org-last-heading-marker 
(point (beginning-of-line 1) (let ((wconfig 
(current-window-configuration))) (unwind-protect (progn 
(org-agenda-change-all-lines newhead hdmarker (quote fixface) just-one)) 
(set-window-configuration wconfig))) (if (and (boundp (quote 
org-clock-out-when-done)) org-clock-out-when-done) (progn (string-match (concat 
"^" (regexp-opt org-done-keywords-for-agenda)) newhead) 
(org-agenda-unmark-clocking-task))) (org-move-to-column col) 
(org-agenda-mark-clocking-task) (if org-agenda-allow-remote-undo (progn (setq 
--c1 (org-verify-change-for-undo --undo1 (save-current-buffer (set-buffer 
--buf1) buffer-undo-list)) --c2 (org-verify-change-for-undo --undo2 
(save-current-buffer (set-buffer --buf2) buffer-undo-list))) (if (or --c1 --c2) 
(progn (and --c1 (save-current-buffer (set-buffer --buf1) (undo-boundary))) 
(and --c2 (save-current-buffer (set-buffer --buf2) (undo-boundary))) (setq 
org-agenda-undo-list (cons (list --cmd --cline --buf1 --c1 --buf2 --c2) 
org-agenda-undo-list)))
  (let* ((col (current-column)) (marker (or (org-get-at-bol (quote org-marker)) 
(org-agenda-error))) (buffer (marker-buffer marker)) (pos (marker-position 
marker)) (hdmarker (org-get-at-bol (quote org-hd-marker))) (todayp 
(org-agenda-today-p (org-get-at-bol (quote day (inhibit-read-only t) 
org-agenda-headline-snapshot-before-repeat newhead just-one) (let ((--cline 
(org-current-line)) (--cmd this-command) (--buf1 (current-buffer)) (--buf2 
buffer) (--undo1 buffer-undo-list) (--undo2 (save-current-buffer (set-buffer 
buffer) buffer-undo-list)) --c1 --c2) (save-current-buffer (set-buffer buffer) 
(widen) (goto-char pos) (org-show-context (quote agenda)) (let 
((current-prefix-arg arg)) (call-interactively (quote org-todo))) (and (bolp) 
(forward-char 1)) (setq newhead (org-get-heading)) (if (and (and (boundp (quote 
org-agenda-headline-snapshot-before-repeat)) 
org-agenda-headline-snapshot-before-repeat) (not (equal 
org-agenda-headline-snapshot-before-repeat newhead)) todayp) (progn (setq 
newhead org-agenda-headline-snapshot-before-repeat just-one t))) 
(save-excursion (org-back-to-heading) (move-marker org-last-heading-marker 
(point (beginning-of-line 1) (let ((wconfig 
(current-window-configuration))) (unwind-protect (progn 
(org-agenda-change-all-lines newhead hdmarker (quote fixface) just-one)) 
(set-window-configuration wconfig))) (if (and (boundp (quote 
org-clock-out-when-done)) org-clock-out-when-done) (progn (string-match (concat 
"^" (regexp-opt org-done-keywords-for-agenda)) newhead) 
(org-agenda-unmark-clocking-task))) (org-move-to-column col) 
(org-agenda-mark-clocking-task) (if org-agenda-allow-remote-undo (progn (setq 
--c1 (org-verify-change-for-undo --undo1 (save-current-buffer (set-buffer 
--buf1) buffer-undo-list)) --c2 (org-verify-change-for-undo --undo2 
(save-current-buffer (set-buffer --buf2) buffer-undo-list))) (if (or --c1 --c2) 
(progn (and --c1 (save-current-buffer ... ...)) (and --c2 (save-current-buffer 
... ...)) (setq org-agenda-undo-list (cons ... org-agenda-undo-list
  (lambda ( arg) "Cycle TODO state of line at point, also in Org 
file.\nThis changes the line at point, all other lines in the agenda referring 
to\nthe same tree node, and the headline of the tree node in the Org file." 
(interactive "P") (org-agenda-check-no-diary) (let* ((col (current-column)) 
(marker (or (org-get-at-bol (quote org-marker)) (org-agenda-error))) (buffer 
(marker-buffer marker)) (pos (marker-position marker)) (hdmarker 
(org-get-at-bol (quote org-hd-marker))) (todayp (org-agenda-today-p 
(org-get-at-bol (quote day (inhibit-read-only t) 
org-agenda-headline-snapshot-before-repeat newhead just-one) (let ((--cline 
(org-current-line)) (--cmd this-command) (--buf1 (current-buffer)) (--buf2 
buffer) (--undo1 buffer-undo-list) (--undo2 

[O] org-mobile-push breaks currently open org-agenda

2017-03-09 Thread Aaron Jensen
html