Re: [Orgmode] Splitting mailing list

2011-02-27 Thread Andrew J. Korty
Alan L Tyree alanty...@gmail.com wrote:

 I'm purely a user, but I would not be in favour of splitting the list.
 I find it interesting to have an insight into what the developers are
 doing, where org is headed.  Use of a DEV tag would be good.

I don't understand.  If you like to read the development posts, why not
subscribe to both lists?  My concerns with a DEV tag are twofold: people
would forget to add it, and it clutters the subject line.

Samuel Wales samolog...@gmail.com wrote:

 The thing that is most difficult for me is the fact that I almost
 never can read the entire subject header.  Often I get to read only
 the first word.  Tags will make that worse.

It was suggested once that we shorten the [Orgmode] tag to [Org].  That
seems like a change everyone can agree with.  Could one of the mailing
list admins please make that change?

Thanks,
ajk

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


Re: [Orgmode] [OT] Have you also got hooked by Vim?

2011-01-13 Thread Andrew J. Korty
I've tried several times to use Viper, but I always give up.  The 
usual showstopper is read-only Emacs modes with single-character key 
bindings, like MH-E.  The d key deletes a message in an MH folder, but 
in vi, d deletes text to a target.  So the obvious thing to do is turn 
Viper mode off in folder buffers.  But I'd like to use the vi keys for 
motion (h, j, k, l) -- I can't get used to using them in some buffers 
and not others.  So unless I'm unaware of some trick, I have to build 
my own keymap almost for each of these modes.


ajk

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


Re: [Orgmode] Huge performance problems to open some Org files

2010-12-17 Thread Andrew J. Korty
Do you have flyspell-mode enabled?  It caused such a performance hit I 
had to disable it for org files.


ajk

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


Re: [Orgmode] should the mail list be splitted resp. sub-tagged ?

2010-12-17 Thread Andrew J. Korty

Torsten Wagner torsten.wag...@gmail.com wrote:

Thinking of tags, I wonder why we use [Orgmode] since all mails 
coming from emacs-orgmode(a)gnu.org which is a strong indicator 
already.


Not sure I agree with splitting the list, but the [Orgmode] tag is
definitely superfluous.  Who has a mail client that can't filter on
the List-Id field?

ajk

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


Re: [Orgmode] Re: Automatically insert inactive timestamps

2010-12-09 Thread Andrew J. Korty

Nick Dokos nicholas.do...@hp.com wrote:


Andrew J. Korty a...@iu.edu wrote:

 Bernt Hansen be...@norang.ca wrote:
 
  (add-hook 'org-insert-heading-hook 'bh/insert-heading-inactive-timestamp)
 
 Using org-insert-heading-hook is more elegant than my way, but I only

 want timestamps on TODO entries, so I use
 


I think you should be able to use org-entry-get in the hook to get the
TODO property of the entry and then conditionally add the timestamp -
something like this:

   (if (equal (org-entry-get (point) TODO) TODO)
  add the timestamp


Iirc, the problem is that the entry doesn't yet have a todo keyword at
the time the hook is run.

ajk

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


Re: [Orgmode] Re: Automatically insert inactive timestamps

2010-12-08 Thread Andrew J. Korty

Bernt Hansen be...@norang.ca wrote:


(add-hook 'org-insert-heading-hook 'bh/insert-heading-inactive-timestamp)


Using org-insert-heading-hook is more elegant than my way, but I only
want timestamps on TODO entries, so I use

#+begin_src emacs-lisp
(defadvice org-insert-todo-heading (after ajk/org-time-stamp-new-headline 
activate
 compile)
 (let ((previous-location (point))); not sure why save-excursion doesn't 
work
   (org-insert-time-stamp (current-time) t t
  (concat \n  (make-string (org-current-level) ? )))
   (goto-char previous-location)))
#+end_src

Here's my vote for a new hook, org-insert-todo-heading-hook. :-)

ajk

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


[Orgmode] [PATCH] Update all ++ repeaters in an entry (loop variables weren't getting reset)

2010-10-21 Thread Andrew J. Korty
See http://www.mail-archive.com/emacs-orgmode@gnu.org/msg30284.html. 
This patch is against release_7.01h.


ajk

---
lisp/org.el |   20 ++--
1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index d33bf4e..52e501e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -11369,7 +11369,6 @@ This function is run automatically after each state change 
to a DONE state.
(msg Entry repeats: )
(org-log-done nil)
(org-todo-log-states nil)
-(nshiftmax 10) (nshift 0)
re type n what ts time to-state)
(when repeat
  (if (eq org-log-repeat t) (setq org-log-repeat 'state))
@@ -11416,15 +11415,16 @@ This function is run automatically after each state change 
to a DONE state.
  (- (time-to-days (current-time)) (time-to-days time))
  'day))
((equal (match-string 1 ts) +)
- (while (or (= nshift 0)
-(= (time-to-days time) (time-to-days (current-time
-   (when (= (incf nshift) nshiftmax)
- (or (y-or-n-p (message %d repeater intervals were not enough to 
shift date past today.  Continue?  nshift))
- (error Abort)))
-   (org-timestamp-change n (cdr (assoc what whata)))
-   (org-at-timestamp-p t)
-   (setq ts (match-string 1))
-   (setq time (save-match-data (org-time-string-to-time ts
+ (let ((nshiftmax 10) (nshift 0))
+   (while (or (= nshift 0)
+  (= (time-to-days time) (time-to-days 
(current-time
+ (when (= (incf nshift) nshiftmax)
+   (or (y-or-n-p (message %d repeater intervals were not enough to 
shift date past today.  Continue?  nshift))
+   (error Abort)))
+ (org-timestamp-change n (cdr (assoc what whata)))
+ (org-at-timestamp-p t)
+ (setq ts (match-string 1))
+ (setq time (save-match-data (org-time-string-to-time ts)
 (org-timestamp-change (- n) (cdr (assoc what whata)))
 ;; rematch, so that we have everything in place for the real shift
 (org-at-timestamp-p t)
--
1.7.3.1

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


[Orgmode] Re: Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-18 Thread Andrew J. Korty

Matt Lundin m...@imapmail.org wrote:


(setq org-agenda-custom-commands
  '((d Todos (incl. deadlines) todo 
 ((org-deadline-warning-days 100) ;; change this as you wish
  (org-agenda-todo-ignore-deadlines 'far


Ah, brilliant.  Thanks!  Essentially this configuration causes the 
lead time indicator to mean different things in the agenda versus 
tags-todo lists, which is just what I wanted.


I still need to decide if I prefer using lead times to scheduling the 
entry (which, for non-repeating entries is slightly easier with the 
C-c C-s keybinding).  So I may submit a patch for updating all ++ 
repeaters when I get around to it.  Or maybe all I need is a function 
to prompt for a lead time and add it to the deadline (from the agenda 
or the org file).


ajk

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


[Orgmode] Re: Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-17 Thread Andrew J. Korty

Matt Lundin m...@imapmail.org wrote:


--8---cut here---start-8---
* TODO Review really important document
  DEADLINE: 2010-10-31 Sun -2m
* TODO Review less important document
  DEADLINE: 2010-10-31 Sun
--8---cut here---end---8---

Let's assume the following settings:

--8---cut here---start-8---
(setq org-agenda-todo-ignore-deadlines 'far
  org-deadline-warning-days 14)
--8---cut here---end---8---

With these settings, the first task would show up *today* both in your
agenda and in your TODO list, while the second task would appear in both
places two weeks before the deadline.


Right, but what I want is for the second task to appear in the todo 
list even before two weeks before the deadline, and I don't want it to 
appear in the agenda until two weeks before the deadline.  In other 
words, I always want to see tasks I can do now in my todo lists, 
whereas I only want to see tasks that are due soon in the agenda.  
Lengthening the lead time won't help because it unnecessarily shows 
tasks in the agenda that aren't due soon.


But maybe my usage is not an intended one.

ajk

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


[Orgmode] Re: Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-17 Thread Andrew J. Korty

Matt Lundin m...@imapmail.org wrote:


If I have multiple timestamps in a TODO item, org-auto-repeat-maybe
only advances the first one.  In the following example, I'd like both
the SCHEDULED and DEADLINE timestamps to advance when the item is
marked DONE, but only the SCHEDULED timestamp advances.

* TODO do something by Sunday but not until Friday
  SCHEDULED: 2010-09-17 Fri ++1w DEADLINE: 2010-09-19 Sun ++1w


I can confirm this bug, although AFAICT it occurs only when both the
SCHEDULED and DEADLINE repeating syntax are of the ++ variety.


Agreed -- hadn't noticed that before.

ajk

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


[Orgmode] Re: Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-17 Thread Andrew J. Korty

Matt Lundin m...@imapmail.org wrote:


Andrew J. Korty a...@iu.edu writes:

 Matt Lundin m...@imapmail.org wrote:

 --8---cut here---start-8---
 * TODO Review really important document
   DEADLINE: 2010-10-31 Sun -2m
 * TODO Review less important document
   DEADLINE: 2010-10-31 Sun
 --8---cut here---end---8---

 Let's assume the following settings:

 --8---cut here---start-8---
 (setq org-agenda-todo-ignore-deadlines 'far
   org-deadline-warning-days 14)
 --8---cut here---end---8---

 With these settings, the first task would show up *today* both in your
 agenda and in your TODO list, while the second task would appear in both
 places two weeks before the deadline.

 Right, but what I want is for the second task to appear in the todo
 list even before two weeks before the deadline, and I don't want it to
 appear in the agenda until two weeks before the deadline. In other
 words, I always want to see tasks I can do now in my todo lists,
 whereas I only want to see tasks that are due soon in the agenda.
 Lengthening the lead time won't help because it unnecessarily shows
 tasks in the agenda that aren't due soon.

 But maybe my usage is not an intended one.

Oops. I misunderstood your request.

What you are describing is org-mode's default behavior---i.e., to show
all todos with deadlines in the todo list, but only to show deadlines in
the agenda when they are within org-deadline-warning days.

To ensure this behavior, you'll want to make sure that
org-agenda-todo-ignore-deadlines is set to nil (the default). All todos
with deadlines will then appear in your todo list.


True, but then we're back to the problem with the driver's license 
renewal.


ajk

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


[Orgmode] Re: Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-16 Thread Andrew J. Korty

Andrew J. Korty a...@iu.edu wrote:


Bernt Hansen be...@norang.ca wrote:

  If I have multiple timestamps in a TODO item, org-auto-repeat-maybe
  only advances the first one.  In the following example, I'd like both
  the SCHEDULED and DEADLINE timestamps to advance when the item is
  marked DONE, but only the SCHEDULED timestamp advances.
 
  * TODO do something by Sunday but not until Friday
SCHEDULED: 2010-09-17 Fri ++1w DEADLINE: 2010-09-19 Sun ++1w
 
 Why not just drop the SCHEDULED: tag and change the DEADLINE task to 
 
 DEADLINE: 2010-09-19 Sun ++1w -2d
 
 This way it won't show up in your agenda until Friday -- 2 days before

 it's due.

Right, but then it will show up in tags-todo lists before I want it 
to.  An example is renewing my driver's license, for which I could use


DEADLINE: 2011-10-12 Wed ++4y -2w

but it would show up in tags-todo lists way before it would make sense 
to renew.  Although I suppose I could set org-agenda-ignore-deadlines 
to 'all and just rely on the daily/weekly agenda to show them to me ...


Oops, frobbing org-agenda-ignore-deadlines won't help.  It works in 
the case of driver's license renewal, but it breaks a different case.  
Say I've been asked to review a document by October 31.  So I set a 
deadline of 2010-12-31.  But I do want to see it on my tags-todo list 
now because if I had time now, I could review the documents and submit 
my comments well before the deadline.


So that's why I use both SCHEDULE and DEADLINE: for tasks I want to 
hide from the daily/weekly agenda *and* tags-todo lists until a 
certain date without removing unscheduled items with deadlines from 
tags-todo lists.


ajk

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


[Orgmode] Re: Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-16 Thread Andrew J. Korty

Bernt Hansen be...@norang.ca wrote:


 If I have multiple timestamps in a TODO item, org-auto-repeat-maybe
 only advances the first one.  In the following example, I'd like both
 the SCHEDULED and DEADLINE timestamps to advance when the item is
 marked DONE, but only the SCHEDULED timestamp advances.

 * TODO do something by Sunday but not until Friday
   SCHEDULED: 2010-09-17 Fri ++1w DEADLINE: 2010-09-19 Sun ++1w

Why not just drop the SCHEDULED: tag and change the DEADLINE task to 


DEADLINE: 2010-09-19 Sun ++1w -2d

This way it won't show up in your agenda until Friday -- 2 days before
it's due.


Right, but then it will show up in tags-todo lists before I want it 
to.  An example is renewing my driver's license, for which I could use


   DEADLINE: 2011-10-12 Wed ++4y -2w

but it would show up in tags-todo lists way before it would make sense 
to renew.  Although I suppose I could set org-agenda-ignore-deadlines 
to 'all and just rely on the daily/weekly agenda to show them to me ...


ajk

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


[Orgmode] Bug: org-auto-repeat-maybe only updates first timestamp [7.01trans]

2010-09-15 Thread Andrew J. Korty


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-mode mailing list.


If I have multiple timestamps in a TODO item, org-auto-repeat-maybe 
only advances the first one.  In the following example, I'd like both 
the SCHEDULED and DEADLINE timestamps to advance when the item is 
marked DONE, but only the SCHEDULED timestamp advances.


* TODO do something by Sunday but not until Friday
  SCHEDULED: 2010-09-17 Fri ++1w DEADLINE: 2010-09-19 Sun ++1w

This behavior exists in HEAD as well as previous releases, including 
7.01h.


Emacs  : GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.0.0, NS 
apple-appkit-1038.11)
of 2009-11-10
Package: Org-mode version 7.01trans

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


[Orgmode] [PATCH] Apply patch for hour/minute repeater support

2010-09-15 Thread Andrew J. Korty
This patch adds hour and minute granularity to repeaters.  Let me know 
if there's interest in incorporating it, and I'll start the FSF 
paperwork process.


Andrew Korty

---
doc/org.texi   |4 ++--
lisp/org-agenda.el |2 +-
lisp/org.el|   27 +++
3 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index d6ea141..e9ede5a 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -5006,8 +5006,8 @@ plain timestamp will be shown exactly on that date.
@cindex timestamp, with repeater interval
A timestamp may contain a @emph{repeater interval}, indicating that it
applies not only on the given date, but again and again after a certain
-interval of N days (d), weeks (w), months (m), or years (y).  The
-following will show up in the agenda every Wednesday:
+interval of N minutes(M), hours(H), days (d), weeks (w), months (m), or
+years (y).  The following will show up in the agenda every Wednesday:

@example
* Pick up Sam at school 2007-05-16 Wed 12:30 +1w
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9f94fa6..176c8f0 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -4385,7 +4385,7 @@ the documentation of `org-diary'.
  (apply 'encode-time  ; DATE bound by calendar
 (list 0 0 0 (nth 1 date) (car date) (nth 2 date
 1 11))
-  \\|\\([0-9]+-[0-9]+-[0-9]+[^\n]+?\\+[0-9]+[dwmy]\\)
+  \\|\\([0-9]+-[0-9]+-[0-9]+[^\n]+?\\+[0-9]+[MHdwmy]\\)
   \\|\\(%%\\(([^\n]+)\\)\\)))
 marker hdmarker deadlinep scheduledp clockp closedp inactivep
 donep tmp priority category ee txt timestr tags b0 b3 e3 head
diff --git a/lisp/org.el b/lisp/org.el
index 70dd482..ace8291 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -621,7 +621,7 @@ An entry can be toggled between QUOTE and normal with
  :type 'string)

(defconst org-repeat-re
-  [0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9] 
[^\n]*?\\([.+]?\\+[0-9]+[dwmy]\\(/[0-9]+[dwmy]\\)?\\)
+  [0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9] 
[^\n]*?\\([.+]?\\+[0-9]+[MHdwmy]\\(/[0-9]+[dwmy]\\)?\\)
  Regular expression for specifying repeated events.
After a match, group 1 contains the repeat expression.)

@@ -11392,7 +11392,8 @@ This function is run automatically after each state change 
to a DONE state.
 (aa (assoc last-state org-todo-kwd-alist))
 (interpret (nth 1 aa))
 (head (nth 2 aa))
-(whata '((d . day) (m . month) (y . year)))
+(whata '((M . minute) (H . hour) (d . day) (m . month)
+  (y . year)))
 (msg Entry repeats: )
 (org-log-done nil)
 (org-todo-log-states nil)
@@ -11429,7 +11430,7 @@ This function is run automatically after each state change 
to a DONE state.
(setq type (if (match-end 1) org-scheduled-string
 (if (match-end 3) org-deadline-string Plain:))
  ts (match-string (if (match-end 2) 2 (if (match-end 4) 4 0
-   (when (string-match \\([.+]\\)?\\(\\+[0-9]+\\)\\([dwmy]\\) ts)
+   (when (string-match \\([.+]\\)?\\(\\+[0-9]+\\)\\([MHdwmy]\\) ts)
  (setq n (string-to-number (match-string 2 ts))
what (match-string 3 ts))
  (if (equal what w) (setq n (* n 7) what d))
@@ -11438,13 +11439,15 @@ This function is run automatically after each state change 
to a DONE state.
(setq time (save-match-data (org-time-string-to-time ts)))
(cond
 ((equal (match-string 1 ts) .)
- ;; Shift starting date to today
+ ;; Shift starting date to now
  (org-timestamp-change
-  (- (time-to-days (current-time)) (time-to-days time))
-  'day))
+   (truncate (/ (- (time-to-seconds (current-time))
+   (time-to-seconds time)) 60))
+  'minute))
 ((equal (match-string 1 ts) +)
  (while (or (= nshift 0)
-(= (time-to-days time) (time-to-days (current-time
+(= (time-to-seconds time)
+ (time-to-seconds (current-time
(when (= (incf nshift) nshiftmax)
  (or (y-or-n-p (message %d repeater intervals were not enough to 
shift date past today.  Continue?  nshift))
  (error Abort)))
@@ -11456,7 +11459,7 @@ This function is run automatically after each state change 
to a DONE state.
  ;; rematch, so that we have everything in place for the real shift
  (org-at-timestamp-p t)
  (setq ts (match-string 1))
- (string-match \\([.+]\\)?\\(\\+[0-9]+\\)\\([dwmy]\\) ts
+ (string-match \\([.+]\\)?\\(\\+[0-9]+\\)\\([MHdwmy]\\) ts
  (org-timestamp-change n (cdr (assoc what whata)))
  (setq msg (concat msg type   org-last-changed-timestamp  
  (setq org-log-post-message msg)
@@ -14687,7 +14690,7 @@ The command returns the inserted 

[Orgmode] Bug: org-mhe creates corrupt link when Message-ID field contains newline [7.01trans]

2010-09-15 Thread Andrew J. Korty

Some MUAs insert a newline when rendering the Message-ID field:

   Message-ID:
98a78083733de040834c2b9e91b87fde0aa...@example.com

The newline causes org-mhe-store-link to create a link that looks like

   [[mhe:%2Barchive#
   %2098a78083733de040834c2b9e91b87fde0aa...@example.com][subject]]

org later treats the above as separate lines; any tags or properties 
added end up in the middle of the link.


The following patch removes whitespace at the beginning of all header  
fields returned by org-mhe-get-header, correcting this problem and 
possibly others.


Andrew Korty

---
lisp/org-mhe.el |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/org-mhe.el b/lisp/org-mhe.el
index 46340be..6810359 100644
--- a/lisp/org-mhe.el
+++ b/lisp/org-mhe.el
@@ -181,7 +181,7 @@ you have a better idea of how to do this then please let us 
know.
(if (equal major-mode 'mh-folder-mode)
(mh-show)
  (mh-show-show))
-header-field)))
+(replace-regexp-in-string ^\\s-+  header-field

(defun org-mhe-follow-link (folder article)
  Follow an MH-E link to FOLDER and ARTICLE.
--
1.7.2.3

Emacs  : GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.0.0, NS 
apple-appkit-1038.11)
of 2009-11-10 on phrygian
Package: Org-mode version 7.01trans

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


Re: [Orgmode] [PATCH] Apply patch for hour/minute repeater support

2010-09-15 Thread Andrew J. Korty

Martin Pohlack m...@os.inf.tu-dresden.de wrote:


On 14.09.2010 19:06, Andrew J. Korty wrote:
 This patch adds hour and minute granularity to repeaters.  Let me know 
 if there's interest in incorporating it, and I'll start the FSF 
 paperwork process.


There was a related discussion here:

http://www.mail-archive.com/emacs-orgmode@gnu.org/msg15142.html


I must have missed that.  I don't use hour repeaters in the 
daily/weekly agenda but in tags-todo lists with 
org-agenda-todo-ignore-scheduled set to 'future.  I use them to remind 
me to do certain things every few hours, like check an incident queue.  
I also use them to tell me to check my mail, not because I'd forget 
that, but to keep me from checking it too frequently (I resist 
checking it until the todo appears).


ajk

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


Re: [Orgmode] Speeding up agenda display

2010-01-02 Thread Andrew J. Korty
On Jan 2, 2010, at 02:50 , Carsten Dominik wrote:

 You can shave off another .5 seconds by pressing the selection key
 faster - Org spends 0.46 seconds to wait for your keypress :-)

Good point. :-)

I optimized things a bit more by caching skip positions and schedule, deadline, 
and tag data for each point a skip function is called in a hash.  An example 
hash value might be

  (((due-soon . t) (started . nil) (tagged-for-home . t)) . skip-position)

These savings add up when you have several slightly differing agendas in a 
block agenda.

ajk

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


Re: [Orgmode] Speeding up agenda display

2010-01-02 Thread Andrew J. Korty
On Jan 2, 2010, at 14:37 , Carsten Dominik wrote:

 I have been thinking about caching often
 but always stopped implementing it because, being a plain text
 system, there is always the possibility that thinks are being
 changed behind the back of the cache.  How are you handling
 updating the cache?

Well, I'm only using the cache while org-agenda is running -- it doesn't 
persist beyond that.  So I don't have to worry about the agenda files changing, 
but I get no added benefit for subsequent agenda builds.

ajk

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


Re: [Orgmode] Speeding up agenda display

2009-12-31 Thread Andrew J. Korty
   11  
0.000175  1.599...e-05
org-switch-to-buffer-other-window 1   
0.000172  0.000172
org-closest-date  4   
0.000158  3.95e-05
org-outline-level 25  
0.000140  5.639...e-06
org-uniquify  5   
0.000115  2.300...e-05
org-check-agenda-file 2   
9.5e-05   4.75e-05
org-date-to-gregorian 8   
8.2e-05   1.025e-05
org-get-agenda-file-buffer2   
8.2e-05   4.1e-05
org-split-string  16  
7.5e-05   4.6875e-06
org-find-base-buffer-visiting 2   
7.2e-05   3.6e-05
org-activate-bracket-links2   
6.8e-05   3.4e-05
org-days-to-iso-week  3   
5.699...e-05  1.899...e-05
org-agenda-format-date-aligned1   
5.5e-05   5.5e-05
org-compile-prefix-format 1   
5.3e-05   5.3e-05
org-add-props 11  
4.9e-05   4.454...e-06
org-agenda-fix-displayed-tags 3   
4.5e-05   1.5e-05
org-agenda-new-marker 6   
4.4e-05   7.333...e-06
org-entries-lessp 2   
3.999...e-05  1.999...e-05
org-agenda-align-tags 1   
3.6e-05   3.6e-05
org-agenda-todayp 2   
3.1e-05   1.55e-05
org-on-heading-p  11  
3.000...e-05  2.727...e-06
org-agenda-reset-markers  1   
2.1e-05   2.1e-05
org-agenda-fontify-priorities 1   
2.1e-05   2.1e-05
org-hh:mm-string-to-minutes   2   
1.499...e-05  7.499...e-06
org-get-at-bol5   
1.2e-05   2.4e-06
org-agenda-add-time-grid-maybe1   
1.1e-05   1.1e-05
org-get-time-of-day   1   
1.1e-05   1.1e-05
org-agenda-mark-header-line   1   9e-06 
9e-06
org-agenda-deadline-face  3   8e-06 
2.666...e-06
org-remove-uniherited-tags5   8e-06 
1.6e-06
org-agenda-set-mode-name  1   7e-06 
7e-06
org-remove-flyspell-overlays-in   1   7e-06 
7e-06
org-add-hook  2   6e-06 
3e-06
org-float-time6   
5.999...e-06  1e-06
org-agenda-mark-clocking-task 1   5e-06 
5e-06
org-overlays-in   3   
4.999...e-06  1.666...e-06
org-downcase-keep-props   3   4e-06 
1.333...e-06
org-get-todo-face 3   4e-06 
1.333...e-06
org-region-active-p   1   3e-06 
3e-06
org-file-menu-entry   1   3e-06 
3e-06
org-unhighlight   1   3e-06 
3e-06
org-set-sorting-strategy  1   2e-06 
2e-06
org-add-prop-inherited2   2e-06 
1e-06
org-before-change-function1   2e-06 
2e-06
org-fit-agenda-window 1   1e-06 
1e-06
org-agenda-ndays-to-span  2   1e-06 
5e-07
org-font-lock-add-tag-faces   1   1e-06 
1e-06

On Dec 31, 2009, at 02:45 , Carsten Dominik wrote:

 Hi Andrew, thanks!
 
 The only thing I see now is this:
 
 1. Get the latest development version.  A week or two ago I made
an optimization that should speed up
 
(org-entry-get nil DEADLINE)
 
quite a bit.
 
 Let's see if that does help enough.
 
 - Carsten
 
 On Dec 30, 2009, at 8:40 PM, Andrew J. Korty wrote:
 
 On Dec 30, 2009, at 14:20 , Carsten

[Orgmode] Speeding up agenda display

2009-12-30 Thread Andrew J. Korty
My agenda views take a couple seconds to build, and I'd like them to be faster. 
 I'm posting a portion of configuration and some profiling results here in case 
anyone can see any opportunities for optimization.

Some background: I don't use the diary at all -- this agenda view exists only 
to show me tasks that are due soon (and in this case, not tagged with @yard or 
@home).

Thanks,
ajk

(setq org-agenda-custom-commands
  '((o Due at Office agenda 
 ((org-agenda-skip-function
   '(or (org-agenda-skip-entry-if '(notdeadline))
(ajk/org-agenda-skip-if-not-due-soon)
(ajk/org-agenda-skip-if-tagged-for-home)))

(defun ajk/org-skip-position ()
  (or (save-excursion
(outline-next-heading)
(point))
  (point-max)))

(defun ajk/org-agenda-skip-if-not-due-soon ()
  (unless (ajk/org-agenda-skip-if-due-soon)
(ajk/org-skip-position)))

(defun ajk/org-agenda-skip-if-tagged-for-home ()
  (org-back-to-heading t)
  (let ((tags (org-get-tags)))
(if (or (member @home tags)
(member @yard tags))
(ajk/org-skip-position

(defun ajk/org-agenda-skip-if-action ()
  (if (org-get-todo-state)
  (ajk/org-skip-position)))

org-agenda1   
2.017599  2.017599
org-let   1   
1.33683   1.33683
org-agenda-list   1   
1.336819  1.336819
org-agenda-get-day-entries1   
1.30812   1.30812
org-entry-get 422 
0.924314  0.0021903175
org-entry-properties  416 
0.920302  0.0022122644
org-get-tags-at   418 
0.689975  0.0016506602
org-agenda-get-restriction-and-command1   
0.680728  0.680728
org-agenda-get-scheduled  1   
0.663837  0.663837
org-up-heading-safe   1055
0.654734  0.0006206018
org-agenda-get-deadlines  1   
0.545852  0.545852
org-agenda-skip-entry-if  416 
0.198253  0.0004765721
org-agenda-skip-if416 
0.196961  0.0004734639
org-back-to-heading   2439
0.100562  4.123...e-05
org-agenda-get-timestamps 1   
0.094435  0.094435
org-prepare-agenda1   
0.02532   0.02532
org-prepare-agenda-buffers1   
0.024896  0.024896
org-refresh-category-properties   1   
0.012516  0.012516
org-outline-level 1696
0.011961  7.052...e-06
org-deadline-close178 
0.008567  4.812...e-05
org-agenda-skip   416 
0.007149  1.718...e-05
org-get-tags-string   424 
0.005429  1.280...e-05
org-days-to-time  178 
0.004836  2.717...e-05
org-at-date-range-p   101 
0.004414  4.371...e-05
org-time-string-to-time   178 
0.002363  1.328...e-05
org-get-todo-state116 
0.002161  1.863...e-05
org-agenda-get-blocks 1   
0.002077  0.002077
org-entry-is-done-p   113 
0.001964  1.738...e-05
org-finalize-agenda   1   
0.001947  0.001947
org-agenda-dim-blocked-tasks  1   
0.001868  0.001868
org-agenda-get-sexps  1   
0.001698  0.001698
org-split-string  633 
0.001638  2.587...e-06
org-get-property-block6   
0.001411  0.0002351666
org-on-heading-p  424 
0.001399  3.301...e-06
org-parse-time-string 183 
0.001352  7.393...e-06
org-block-todo-from-children-or-siblings-or-parent2   
0.001044  0.000522
org-format-agenda-item2   
0.000966  0.000483
org-fit-window-to-buffer  1 

Re: [Orgmode] Speeding up agenda display

2009-12-30 Thread Andrew J. Korty
On Dec 30, 2009, at 14:20 , Carsten Dominik wrote:

 could you please also instrument your ajk/ functions for profiling and
 repeat the experiment? And show the code of all these functions, not
 only some (I am missing for example `ajk/org-agenda-skip-if-due-
 soon'

Yes to both -- see below for corrected listings of code and profiling results.

 Also:
 
 - Are you using property inheritance?
 - Are you relying on tag inheritance to check for @yard and @home?

No to both.

 - Are you using the latest version of Org-mode?

I'm using 6.33.

Btw, the single org file from which the agenda is generated contains 323 
headlines in the TODO state and 12,227 lines total.

Thanks,
ajk

(setq org-agenda-custom-commands
'((o Due at Office agenda 
   ((org-agenda-skip-function
 '(or (org-agenda-skip-entry-if '(notdeadline))
  (ajk/org-agenda-skip-if-not-due-soon)
  (ajk/org-agenda-skip-if-tagged-for-home)))

(defun ajk/org-skip-position ()
  (or (save-excursion
(outline-next-heading)
(point))
  (point-max)))

(defun ajk/org-agenda-skip-if-due-soon ()
  (and (let ((time (org-entry-get nil DEADLINE))) ; not due or not due soon
 (and time
  (org-deadline-close time)))
   (ajk/org-skip-position)))

(defun ajk/org-agenda-skip-if-not-due-soon ()
  (unless (ajk/org-agenda-skip-if-due-soon)
(ajk/org-skip-position)))

(defun ajk/org-agenda-skip-if-tagged-for-home ()
  (org-back-to-heading t)
  (let ((tags (org-get-tags)))
(if (or (member @home tags)
(member @yard tags))
(ajk/org-skip-position

org-agenda1   
1.997575  1.997575
org-let   1   
1.305759  1.305759
org-agenda-list   1   
1.305747  1.305747
org-agenda-get-day-entries1   
1.279215  1.279215
ajk/org-agenda-skip-if-not-due-soon   416 
1.034962  0.0024878918
ajk/org-agenda-skip-if-due-soon   416 
0.975166  0.0023441514
org-entry-get 422 
0.965561  0.0022880616
org-entry-properties  416 
0.961836  0.0023121081
org-get-tags-at   418 
0.698291  0.0016705526
org-agenda-get-restriction-and-command1   
0.691773  0.691773
org-up-heading-safe   1055
0.664914  0.0006302511
org-agenda-get-scheduled  1   
0.634158  0.634158
org-agenda-get-deadlines  1   
0.506933  0.506933
org-agenda-skip-entry-if  416 
0.138524  0.0003329927
org-agenda-skip-if416 
0.137230  0.0003298798
org-agenda-get-timestamps 1   
0.134207  0.134207
org-back-to-heading   2439
0.088765  3.639...e-05
ajk/org-skip-position 419 
0.058316  0.0001391813
org-prepare-agenda1   
0.023446  0.023446
org-prepare-agenda-buffers1   
0.022988  0.022988
org-refresh-category-properties   1   
0.012406  0.012406
org-outline-level 1696
0.011875  7.001...e-06
org-at-date-range-p   101 
0.009216  9.124...e-05
org-agenda-skip   416 
0.008605  2.068...e-05
org-deadline-close178 
0.008460  4.753...e-05
org-get-tags-string   424 
0.005351  1.262...e-05
org-days-to-time  178 
0.004724  2.653...e-05
org-time-string-to-time   178 
0.002268  1.274...e-05
org-get-todo-state116 
0.002221  1.915...e-05
org-agenda-get-blocks 1   
0.002071  0.002071
org-entry-is-done-p   113 
0.001985  1.756...e-05
org-agenda-get-sexps  1   
0.001713  0.001713
org-finalize-agenda   1   
0.001653  0.001653
org-split-string

[Orgmode] [PATCH] Enable tags-todo agenda commands for MobileOrg

2009-11-19 Thread Andrew J. Korty
Not sure if these are disabled for a reason, but the following patch doesn't 
seem to cause any ill effects.  They work without the patch in block agendas, 
just not on their own.

ajk

--- org-mobile.el~  2009-11-19 13:45:54.0 -0500
+++ org-mobile.el   2009-11-19 13:44:10.0 -0500
@@ -438,7 +438,7 @@
((memq (nth 2 e) '(todo-tree tags-tree occur-tree))
;; These are trees, not really agenda commands
)
-   ((memq (nth 2 e) '(agenda todo tags))
+   ((memq (nth 2 e) '(agenda todo tags tags-todo))
;; a normal command
(setq key (car e) desc (nth 1 e) type (nth 2 e) match (nth 3 e)
  settings (nth 4 e))



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


Re: [Orgmode] Org-mode version 6.32b; org-remember only indents first line of %i substitution

2009-11-19 Thread Andrew J. Korty
I've learned some more details.  The behavior I describe only occurs when 
remember is called via org-protocol.  When that happens, `initial' is nil, so 
the following code in org-remember.el doesn't run:

  (save-match-data
(let* ((lead (buffer-substring
  (point-at-bol) (match-beginning 0
  (setq v-i (mapconcat 'identity
   (org-split-string initial \n)
   (concat \n lead)

I'm not sure of the best way to fix it.

ajk

On Nov 18, 2009, at 17:54 , Carsten Dominik wrote:

 Hi Andrew, this works fine for me, I cannot reproduce
 the problem you are describing.
 
 - Carsten
 
 On Nov 12, 2009, at 4:27 PM, Andrew J. Korty wrote:
 
 When %i appears indented in an org-remember template, each line of the
 text substituted is supposed to be indented.  In my case, only the  
 first
 line is being indented.
 
 Emacs  : GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.0.0, NS apple- 
 appkit-1038.11)
 of 2009-11-10 on phrygian
 Package: Org-mode version 6.32b
 
 
 
 ___
 Emacs-orgmode mailing list
 Remember: use `Reply All' to send replies to the list.
 Emacs-orgmode@gnu.org
 http://lists.gnu.org/mailman/listinfo/emacs-orgmode
 
 - Carsten
 
 
 



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


[Orgmode] Org-mode version 6.32b; org-remember only indents first line of %i substitution

2009-11-12 Thread Andrew J. Korty

When %i appears indented in an org-remember template, each line of the
text substituted is supposed to be indented.  In my case, only the first
line is being indented.

Emacs  : GNU Emacs 23.1.50.1 (x86_64-apple-darwin10.0.0, NS apple- 
appkit-1038.11)

 of 2009-11-10 on phrygian
Package: Org-mode version 6.32b



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


Re: [Orgmode] emacsclient -e '(org-agenda)' sometimes displays stale agenda

2009-11-11 Thread Andrew J. Korty

On Nov 10, 2009, at 16:15 , Sebastian Rose wrote:


Andrew J. Korty a...@iu.edu writes:
Calling org-agenda from emacsclient doesn't always seem to generate  
a fresh
agenda the way it does when called from a key binding or M-x.
Anyone know why?


I think the agenda is rebuild, if you quit it and restart it again. In
many cases, this makes absolutely sense. I have quite a few agenda  
files

in use and some of them grow since 2 years now.


Say I use M-x org-agenda and press M to do a tag TODO query.  I get  
the results in the *Org Agenda* buffer.  Then I do M-x org-agenda RET  
M again with a different tag.  The contents of the *Org Agenda* buffer  
are replaced with the results of the new query.


But if I do all that by calling org-agenda from emacsclient, the  
contents of the *Org Agenda* buffer don't get replaced when I do the  
second query.  They still contain the results of the first query.


ajk


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


[Orgmode] emacsclient -e '(org-agenda)' sometimes displays stale agenda

2009-11-10 Thread Andrew J. Korty
Calling org-agenda from emacsclient doesn't always seem to generate a  
fresh agenda the way it does when called from a key binding or M-x.   
Anyone know why?


ajk


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


[Orgmode] Re: Invalid search bound (wrong side of point) using Remember

2007-11-16 Thread Andrew J. Korty
Graham Smith [EMAIL PROTECTED] writes:

 I have just set up Remember with Org mode (without the template set up),
 when I use C-c C-c to save the entry, it gets saved to notes.org as it
 should, but I also get an error:

 Invalid search bound (wrong side of point)

 Can some one explain what this means.

I had this problem, and I think I fixed it by moving %a from the end of
my org-remember-templates to the beginning.  My templates used to look
something like

  * TODO %?
%U
%a

Now I use

  * TODO %? %a
%U

which fixed the bug.  Plus I like it better anyway.

Iirc, the problem arose when %a was empty.

-- 
Andrew J. Korty, Deputy Information Security Officer
Office of the Vice President for Information Technology and CIO
Indiana University


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


[Orgmode] Re: tagging during creation

2007-11-05 Thread Andrew J. Korty
Here's what I use:

 (defun org-set-buffer-todo-tags ()
   Set tags for all tagless TODO headings in the current buffer.
   (save-excursion
 (goto-char (point-min))
 (while (re-search-forward \\* \\(?:TODO\\|ACTION\\|WAITING\\)  nil t)
   (let ((tags (org-get-tags)))
 (if (or (not tags) (string= tags ))
 (org-set-tags))
 
 (add-hook 'remember-hook
   (lambda ()
 (define-key (current-local-map) 
   (lambda ()
 (interactive)
 (if (string= (buffer-name (current-buffer)) *Remember*)
 (org-set-buffer-todo-tags))
 (org-ctrl-c-ctrl-c)

-- 
Andrew J. Korty, Deputy Information Security Officer
Office of the Vice President for Information Technology and CIO
Indiana University


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


[Orgmode] Re: Free `1' and `0' keys from the org-agenda interface ?

2007-10-16 Thread Andrew J. Korty
Bastien [EMAIL PROTECTED] writes:

 I tend to use my `org-agenda-custom-commands' in a strict order.  
 I first check for a first view, then check for a second view, etc.  

Why not just display all those views, in order, with one custom command?
For example, when I'm at home, I run C-c a h:

 (h home contexts
  ((tags-todo [EMAIL PROTECTED]@computer/TODO nil)
   (tags-todo [EMAIL PROTECTED]@computer/TODO nil)
   (tags-todo [EMAIL PROTECTED]@[EMAIL PROTECTED]/TODO nil)
   (tags-todo @phone/TODO nil)
   (tags-todo @any/TODO nil))

-- 
ajk


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


[Orgmode] Re: possible bug in version 5.08

2007-09-14 Thread Andrew J. Korty
McKelvie [EMAIL PROTECTED] writes:

 version 5.04 allows my to file quick notes away using remember. On
 upgrading to 5.08, when I try typing in my template hot key I get the
 error, Wrong type argument: stringp, nil. It works fine in 5.04.

Sounds like a problem I was having which came down to
org-remember-apply-template expecting remember's global `annotation'
variable to be non-nil.  I temporarily (and unartfully) fixed it with

,
| (defadvice org-remember-apply-template
|   (around ajk/fix-org-remember-apply-template activate compile)
|   (with-no-warnings
| (if annotation
| ad-do-it
|   (let ((annotation ))
| ad-do-it
`

-- 
Andrew J. Korty, Deputy Information Security Officer
Office of the Vice President for Information Technology and CIO
Indiana University


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