[Orgmode] Re: Repeated entry same time every day?

2009-05-05 Thread Piotr Zielinski
On Tue, May 5, 2009 at 11:34 PM, Bernt Hansen  wrote:
> Piotr Zielinski  writes:
>
>> Is it possible to have a repeater (say SCHEDULED: <2009-05-05 Tue
>> 16:00 +24h> or something) that would ensure that the given entry is
>> automatically scheduled at the same time every day?
>
> Sure.  Just try it :)  Try +1d instead of +24h like this:
>
> * TODO One
>  SCHEDULED: <2009-05-08 Fri 13:00-15:00 +1d>

Thanks a lot!  It turns out that I had some code that was explicitly
removing the time.

Piotr

>
> -Bernt
>


___
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] Repeated entry same time every day?

2009-05-05 Thread Piotr Zielinski
Hi,

Is it possible to have a repeater (say SCHEDULED: <2009-05-05 Tue
16:00 +24h> or something) that would ensure that the given entry is
automatically scheduled at the same time every day?

Thanks,
Piotr


___
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] [PATCH] Added org-test.el that contains some unit tests.

2008-11-16 Thread Piotr Zielinski
This is file is really provisional to get us started with unit tests.
It tests some changes made recently by me, and exposes a bug
org-make-tags-matcher.  Please feel free to rewrite/reorganize it, and
port it to a unit test framework when we decide which one to use.


Piotr
From 244885b51f6c85e4a3f72af83587ec2d6490df8a Mon Sep 17 00:00:00 2001
From: Piotr Zielinski <[EMAIL PROTECTED]>
Date: Sun, 16 Nov 2008 22:01:47 +
Subject: [PATCH] Added org-test.el that contains some unit tests.

This is file is really provisional to get us started with unit tests.
It tests some changes made recently by me, and exposes a bug
org-make-tags-matcher.  Please feel free to rewrite/reorganize it, and
port it to a unit test framework when we decide which one to use.
---
 lisp/org-test.el |   60 ++
 1 files changed, 60 insertions(+), 0 deletions(-)
 create mode 100644 lisp/org-test.el

diff --git a/lisp/org-test.el b/lisp/org-test.el
new file mode 100644
index 000..7178c19
--- /dev/null
+++ b/lisp/org-test.el
@@ -0,0 +1,60 @@
+;; org-test.el --- Unit tests for org.el
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+
+;; This file contains some unorganized unit tests.  
+;; TODO: replace with proper test when we decide on a framework
+
+(require 'org)
+
+(defmacro with-current-time-as (decoded-time &rest body)
+  "Executes the body with current time set to decoded-time.
+
+   This macro is not comprehensive and does only enough to make
+   the tests pass.  TODO: replace this with something proper, eg
+   a mock once we decide what framework we should use."
+  (let ((float-time (float-time (apply 'encode-time (eval decoded-time
+(float-time-function (symbol-function 'float-time)))
+`(flet ((decode-time () ,decoded-time)
+(float-time (&optional specified-time)
+  (if specified-time
+(funcall ,float-time-function specified-time)
+  ,float-time)))
+   ,@body)))
+
+(with-current-time-as '(0 7 21 16 11 2008 0 nil 0)
+  (assert (= 1226793600.0 (org-time-today)))
+  (assert (= 1226793600.0 (org-matcher-time "")))
+  (assert (= 122688.0 (org-matcher-time "")))
+  (assert (= 1226869620.0 (org-matcher-time "")))
+
+  (assert (equal
+   '("+tag1+tag2-tag3" and
+ (progn
+   (setq org-cached-props nil)
+   (and (not (member "tag3" tags-list))
+(member "tag2" tags-list)
+(member "tag1" tags-list)))
+ t)
+   (org-make-tags-matcher "+tag1+tag2-tag3")))
+
+  (assert (equal
+   '("+SCHEDULED=\"\"" and
+ (progn
+   (setq org-cached-props nil)
+   (org-time= (or (org-cached-entry-get nil "SCHEDULED") "")
+  1226869620.0))
+ t)
+   (org-make-tags-matcher "+SCHEDULED=\"\"")))
+
+  ;; FIXME: this test fails because of a bug in org-make-tags-matcher
+  (assert (equal
+   '("+SCHEDULED=\"<2008-11-16 Wed 21:07>\"" and
+ (progn
+   (setq org-cached-props nil)
+   (org-time= (or (org-cached-entry-get nil "SCHEDULED") "")
+  1226869620.0)))
+   t)
+   (org-make-tags-matcher "+SCHEDULED=\"<2008-11-16 Wed 21:07>\"")))
+
+
+
-- 
1.5.2.5

___
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] [PATCH] Added support for as a time specification in tag maching engine, and fixed .

2008-11-16 Thread Piotr Zielinski

From a5aa4cceb272185eb05c858a042a2b2a2991c095 Mon Sep 17 00:00:00 2001
From: Piotr Zielinski <[EMAIL PROTECTED]>
Date: Sun, 16 Nov 2008 20:27:30 +
Subject: [PATCH] Added support for  as a time specification in tag maching
engine, and fixed .
---
 lisp/org.el |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index a598673..c2f4dc9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9256,11 +9256,16 @@ it as a time string and apply `float-time' to it.  f S is nil, just return 0."
   (error 0.)))
(t 0.)))
 
+(defun org-time-today ()
+  "Returns the float number of seconds since the beginning of the
+epoch to the beginning of today (00:00)"
+  (float-time (apply 'encode-time (append '(0 0 0) (nthcdr 3 (decode-time))
+
 (defun org-matcher-time (s)
   (cond
-   ((equal s "") (float-time))
-   ((equal s "")
-(float-time (append '(0 0 0) (nthcdr 3 (decode-time)
+   ((string= s "") (float-time))
+   ((string= s "") (org-time-today))
+   ((string= s "") (+ 86400.0 (org-time-today)))
(t (org-2ft s
 
 (defun org-match-any-p (re list)
-- 
1.5.2.5

___
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] [PATCH] Added backward isearch support for headings

2008-08-03 Thread Piotr Zielinski
Changed org-goto-local-search-forward-headings to support backward
search, and renamed it to org-goto-local-search-headings.
---
 lisp/org.el |8 +---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 57c6dae..62ad9ea 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -4350,7 +4350,7 @@ or nil."
   (let ((isearch-mode-map org-goto-local-auto-isearch-map)
(isearch-hide-immediately nil)
(isearch-search-fun-function
-(lambda () 'org-goto-local-search-forward-headings))
+(lambda () 'org-goto-local-search-headings))
(org-goto-selected-point org-goto-exit-command))
 (save-excursion
   (save-window-excursion
@@ -4391,10 +4391,12 @@ or nil."
 (define-key org-goto-local-auto-isearch-map "\C-i" 'isearch-other-control-char)
 (define-key org-goto-local-auto-isearch-map "\C-m" 'isearch-other-control-char)

-(defun org-goto-local-search-forward-headings (string bound noerror)
+(defun org-goto-local-search-headings (string bound noerror)
   "Search and make sure that anu matches are in headlines."
   (catch 'return
-(while (search-forward string bound noerror)
+(while (if isearch-forward
+   (search-forward string bound noerror)
+ (search-backward string bound noerror))
   (when (let ((context (mapcar 'car (save-match-data (org-context)
  (and (member :headline context)
   (not (member :tags context
-- 
1.5.2.5


___
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] FR: Repeated time stamp, jumping from current time

2008-03-02 Thread Piotr Zielinski
On Sun, Mar 2, 2008 at 4:52 AM, Wanrong Lin <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  Right now we can have a repeated time stamp like this:
>
>  * TODO Do this every month
>   SCHEDULED: <2008-03-01 Sat +1m>
>
>  If I am late and mark the above done on 2008-03-05, the time stamp will
>  automatically jump to 2008-04-01. This is very useful for things like
>  paying monthly bills.
>
>  However, for some tasks, it would make more sense to jump from the date
>  when it is marked done, not from when it is scheduled to be done.

Here are my thoughts on the issue:

I think of SCHEDULED as my personal plan to start doing something at a
specified time.  In this interpretation, having something scheduled
for the past does not make sense, or more precisely, it should be
functionally equivalent to scheduling it for "now" (except that it
reminds you that you're behind schedule).  Therefore, I'd vote for
jumping from the current date, not from the time in the SCHEDULED
timestamp.

Your example of paying a bill is, in my view, a DEADLINE, an
externally imposed requirement.  Since whomever imposed the deadline
on you does not care about your personal scheduling, the jumping in
deadlines should be from the time indicated in the timestamp.

Thanks,
Piotr

 An
>  example is changing my furnace filter. I am supposed to change it once a
>  month, but if I am late for 10 days, the next date to change should be
>  30 days away, not 20 days away.
>
>  Maybe we can use a syntax like this to indicate that:
>
>  <2008-03-01 Sat +=1m>
>
>  Any comments? Thank you.
>
>  Wanrong
>
>
>
>  ___
>  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
>


___
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] commas in URLs?

2008-02-01 Thread Piotr Zielinski
Just to to add one vote for including commas in the urls by default
(at least in some cases); I often copy long links directly from the
browser and have this problem quite often.

> >> So URLs should just exclude commas that are followed by a whitespace
> >> or a line break, not all commas - right?
>
> > Yes, but this is harder to do with a regexp.  I wish Emacs had look-
> > ahead assertions like perl.

What about saying that a url cannot end with a comma, but can contain
commas?  Something like [a-z,]*[a-z] (this is a big big simplication!).

Piotr


___
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] Safer kill-line for org-mode

2008-01-27 Thread Piotr Zielinski
Hi,

Read this to avoid losing your work.

Standard kill-line deletes all text from the point to the end of the
_visible_ line.  It happened to me a few times that I pressed C-k to
delete a few final words of a headline, but instead the whole
(invisible) subtree was deleted.  This kind of mistake is costly
because it may go unnoticed for weeks, when you start wondering what
happened to a sizeable part of your org file and have to go through
rather old backups.  Below is what I believe to be a safer version of
kill-line: it deletes text only to the end of the real line, unless
used at the beginning of the line, in which case it behaves as the
standard kill-line.  I haven't tested much yet, but it seems to be
working ok.

(defun kill-line-safe ()
  (interactive)
  (if (bolp)
  (kill-line)
(kill-region (point) (point-at-eol

(define-key global-map "\C-k" 'kill-line-safe)

Piotr


___
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: automatic reminders in Emacs as pop ups [was: Re: [Orgmode] Survey results ]

2008-01-27 Thread Piotr Zielinski
Also, debian/ubuntu package libnotify-bin contains a command-line
utility "notify-send" that you can use to display non-modal user
notifications, in the same way as popup.py.

Piotr

On Jan 27, 2008 10:11 PM, Nick Dokos <[EMAIL PROTECTED]> wrote:
> One answer to question 5 on the survey was another question: automatic
> reminders in Emacs as pop ups?
>
> Here is how I do it, using very little machinery. As part of org-mode
> initialization, I add appointments from the diary to the agenda at
> startup and I also make org-agenda-redo rescan the appt list:
>
> ---
> (require 'appt)
> (setq org-agenda-include-diary t)
> (setq appt-time-msg-list nil)
> (org-agenda-to-appt)
>
> (defadvice  org-agenda-redo (after org-agenda-redo-add-appts)
>   "Pressing `r' on the agenda will also add appointments."
>   (progn
> (setq appt-time-msg-list nil)
> (org-agenda-to-appt)))
>
> (ad-activate 'org-agenda-redo)
> ---
>
> I enable appt reminders, set the format to 'window and provide
> a display function that calls a python program to do the popup:
>
> ---
> (progn
>   (appt-activate 1)
>   (setq appt-display-format 'window)
>   (setq appt-disp-window-function (function my-appt-disp-window))
>   (defun my-appt-disp-window (min-to-app new-time msg)
> (call-process "/home/nick/bin/popup.py" nil 0 nil min-to-app msg 
> new-time)))
> ---
>
> Finally, the popup.py program is trivial:
>
> ---
> #!/usr/bin/env python
>
> """ Simple dialog popup example similar to the GTK+ Tutorials one """
>
> import gtk
> import sys
>
> mins = sys.argv[1]
> text = ' '.join(sys.argv[2:])
> dialog = gtk.MessageDialog(None,
>gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
>gtk.MESSAGE_INFO, gtk.BUTTONS_OK,
>"Appt in %s mins: %s" % (mins, text))
> dialog.run()
> dialog.destroy()
> ---
>
> HTH,
> Nick
>
>
> ___
> 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
>


___
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] Re: Remember and then refile

2008-01-20 Thread Piotr Zielinski
On Jan 18, 2008 10:19 PM, Steven Lumos <[EMAIL PROTECTED]> wrote:

>>> Have you considered somehow merging the tree selection and
>>> minibuffer with completion methods so that both are available
>>> simultaneously?

I haven't made up my mind about org-refile yet, but I'd like to speak
in defense of org-goto.  In my setup, when you start typing in
org-goto, it automatically enters the isearch mode that searches only
headlines, which is very useful for refiling and kind of achieves what
you are asking for.  This requires some additional elisp code; I can
repost it if somebody is interested.

As for completion, both org-refile and org-goto should work with
icicles but I haven't tried it extensively yet (icicles provides
general-purpose extensive completion support for emacs).  My main
point is that I'd rather vote for making org-mode work well with
otherspecialized modes (eg icicles) than for reimplementing the
features.

Thanks,
Piotr


___
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] Announcing Worg (Web-Org)

2008-01-14 Thread Piotr Zielinski
On Jan 13, 2008 4:09 PM, David O'Toole <[EMAIL PROTECTED]> wrote:
> ... maybe it would make sense to contribute my org-radio annotator
> thing to the repository (if anyone is interested).

I haven't tried org-radio yet, but it sounds useful, so count me as interested.

Piotr


___
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] Re: FR: Display images in org-mode?

2008-01-09 Thread Piotr Zielinski
I think iimage-mode (minor mode shipped with emacs) does what you want

http://www.netlaputa.ne.jp/~kose/Emacs/iimage.html

Piotr


___
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] Can you automatically open a branch on load?

2007-12-28 Thread Piotr Zielinski
On Dec 28, 2007 9:12 PM, Hugo Schmitt <[EMAIL PROTECTED]> wrote:
> You can easily write a couple more lines so that the branch that will
> be opened is configured on the top of the file itself.

Or you can put a call like '(my-open-some-branch "Finances")' directly
in the org file using the same emacs mechanism as for defining local
variables (don't remember the details).  This has the advantage of
easy per-file customization but on the other hand might be a security
risk.

Piotr


___
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] Re: Electric insert of headline stars

2007-10-25 Thread Piotr Zielinski
On 25/10/2007, Seweryn Kokot <[EMAIL PROTECTED]> wrote:

> A minor inconvenience is a warning when compiling the code

First, here's the version after Bastien's and Carsten's comments:

(defun local-org-insert-stars ()
  (interactive)
  (when (looking-back "^ +" (point-at-bol))
(replace-string " " "*" nil (point-at-bol) (point)))
  (org-self-insert-command 1))

> .emacs:2604:30:Warning: `replace-string' used from Lisp code
> That command is designed for interactive use only.

> How to get rid of this?

This is what I came up with after following the suggestion from the
manual, but it looks complicated to me, so I don't really like it:


(defun local-org-insert-stars ()
  (interactive)
  (when (looking-back "^ +" (point-at-bol))
(save-excursion
  (while (search-backward " " (point-at-bol) t)
(replace-match "*" nil t
  (org-self-insert-command 1))


Piotr


___
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] Electric insert of headline stars

2007-10-25 Thread Piotr Zielinski
Hi,

Here's a small piece of elisp code that might be useful to some of you.
Pressing '*' now inserts '*' as before, but if there are only spaces
between the beginning of the current line and the point, then all of
them are converted to stars.  Useful for inserting new headlines.

Longer explanaition: assume you have the following structure:

* first level headline
_* second level headline
__* third level headline

(_ denotes an invisible star) Since stars are invisible, I often find
myself trying to create a new subheadline by just inserting a single
star

* first level headline
_* second level headline
__* third level headline
   *

which of course doesn't normally work, hence this elisp code.

(defun local-org-insert-stars ()
  (interactive)
  (when (looking-back "^ *" (point-at-bol))
(replace-string " " "*" nil (point-at-bol) (point)))
  (insert "*"))

(define-key org-mode-map "*" 'local-org-insert-stars)

Haven't thoroughly tested it, but it seems to work ok.

Piotr


___
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] Re: depending TODOs, scheduling following TODOs automatically

2007-10-11 Thread Piotr Zielinski
Hi,

I am generally against introducing very specialized features to
org-mode, for the same reasons as described by others in this thread.
The power of org-mode lies in simplicify of the model it offers:
information is a collection of lists that can be queried in various
ways.

This model is simple yet powerful.  For example, org-mode can be used
not only to store ordinary tasks ("pay rent", every month), but also
meta-tasks concerning the org-file itself ("make sure there are no
stuck projects", every week).  I find this simple idea of storing
meta-tasks very useful.  It gives your org-file "life", making it the
single point of trust.  As long as you remember to check your org-mode
every day, you will never forget anything.  Instead of following the
books that tell you to "develop a habit of ..." just put this habit as
an repetitive task in org-mode.

Back to task dependencies.  I use three tags: NEXT for enabled
actions, TODO for actions that wait for the previous one on the list,
and WAITING for actions that wait for something else.  Whenever an
action is completed, you can easily check whether the next TODO should
be enabled (changed to NEXT) or not.

WAITING actions (with dependencies across different lists) are more
tricky, but in my experience, are quite rare.  Here, if you know that
completing task A will enable task Q in another part of the file,
insert a meta-task "TODO enable [[Q]]" just after A.  No special
functionality needed, just standard linking.

Of course there are some cases in which this scheme doesn't work, but
these are not many, and I don't believe making them work automatically
is worth the effort.  This is because, in my case, most of the WAITING
actions rely on external triggers (email, phone call), which are
simply not automatable.

Piotr


___
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] Interpretation of priorities in org-mode

2007-08-01 Thread Piotr Zielinski
On 01/08/07, Jason F. McBrayer <[EMAIL PROTECTED]> wrote:
> I don't really use priorities at all, since I'm using org-mode to do
> GTD.

I agree with you on that, I was only suggesting using priorities as a
technical means to label certain tasks as "to do today" in a way which
is easy in org-mode.

> If something has to be done today, then that's a deadline, not a
> priority.

As I said, my reason for scheduling certain tasks as "for today", is
that I like to have a plan of what to do each day.  Without an
explicit plan, I catch myself scanning my todo list many times during
a day, effectively wasting time on recreating the same plan many times.
But I've tried it only for a week now, so I can't say whether it works.

Thanks,
Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Re: Interpretation of priorities in org-mode

2007-08-01 Thread Piotr Zielinski
On 01/08/07, Renzo Been <[EMAIL PROTECTED]> wrote:
> But what is actually the difference between using:
> *priorities
>
> and:
> *Using tags

That's a very good point.  The reason why I decided to use priorities
was because it was easier to make them work with org-agenda.  In
particular, I don't know how to make the agenda display, for example,
"all headlines without the :today: tag in the order of increasing
deadlines".  If this is possible, I'll happily switch to tags.

Any ideas?

Thanks,
Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Interpretation of priorities in org-mode

2007-07-30 Thread Piotr Zielinski
Hi.

I'd like to find out how different people use priorities (#A, #B, ...)
in org-mode.  I've always assumed the standard interpretation (#A =
high priority, #B = medium, #C = low).  However, the problem with this
approach is that what "high priority" means is not well defined, and
if you are not careful, then all your items will quickly become high
priority, which defeats the whole point.

I've been recently experimenting with a different interpretation of
priorities: #B = tasks to do today, #C = tasks to do this week, #D =
all the rest, default.  #A is reserved at the moment.  One good thing
about this system is a clearer interpretation of priorities.  Another is
that it separates the action of inserting new items into your todo
list and that of assigning a particular priority to them.  In
particular, at the beginning of each day, you can look at your list of
todos/deadlines/scheduled, and pick a few to complete on that day by
giving them the #B priority.  At any time of the day, the agenda will
show you these #B items clearly separated from the rest.  Previously,
I had to do a mental rescanning of the agenda items each time I
was wondering "what do I have to do now", which was rather stressful.

Of course, I've tried this only for a couple of days, so my
conclusions might be completely bogus.  Maybe there is a better way
than priorities to mark items as "to complete today".  I'd definitely
like to know what others think about it.

One more thing: it is nice to be able to separate items with different
priorities in an agenda view by some lines like '=== #A ==='
or similar.  I've also found it useful to separate deadlines from
scheduled items.  Your can use the following code to achieve this:


(defadvice org-finalize-agenda-entries (before local-org-finalize activate)
   (loop for (text priority) in '(("Scheduled" 1400)
   ("Deadlines" 2000)
   ("This week(#C)" 2900)
   ("Today(#B)" 3900)
   ("Top priority (#A)" 4900))
  do (push (org-add-props
   (format "=== %s ==" text)
   nil 'priority priority)
   list)))

(defadvice org-agenda-get-deadlines (after local-org-get-deadlines activate)
  (dolist (item ad-return-value)
(put-text-property 0 (length item)
   'priority (+ 500 (get-text-property 0 'priority item))
   item)))


Thanks,
Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] community writing?

2007-06-09 Thread Piotr Zielinski

Yes.  If you could start an org-mode wiki page, please do.  Over time,
I've written some org-related scripts and elisp code, which I'd like
to share.

Thanks,
Piotr

On 08/06/07, David O'Toole <[EMAIL PROTECTED]> wrote:


I notice the planner world has some pages where they discuss the
various ways people use planner. I think it would be cool for us to
collectively post some org-mode usage strategies, perhaps on an
emacswiki page.

Or, people could prepare a small .org file and send it to me, and I
could paste it into a page of my site. it could be a collaboratively
written "Org-Mode Strategy and Tactics"

If anyone enjoys this, I'll get started by writing my own entry.

--
David O'Toole
[EMAIL PROTECTED]
http://dto.freeshell.org/notebook/


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




--
Piotr Zielinski, Research Associate
Cavendish Laboratory, University of Cambridge, UK
http://www.cl.cam.ac.uk/~pz215/


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] working with remember

2007-04-06 Thread Piotr Zielinski

On 06/04/07, Bastien <[EMAIL PROTECTED]> wrote:

Salut François,

[EMAIL PROTECTED] (François Lagarde) writes:

> My question is, if (and how) would be possible to find quickly (I mean
> with a keyboard shortcut) all notes belonging to the current buffer.

I don't think there is any easy way for now.

This would require something like an org registry: a table linking buffers
and the locations in which they are referred to.  I wrote a similar tool
for planner (planner-registry), so doing this for Org is lingering in my
head for ages...


If you write it, I'll use it :-)

Here are another idea that I'd be happy if somebody implemented:

When programming, it is common to write comments like "todo:" or
"fixme:".  It would be nice to have a tool that could treat these
comments as notes and aggregate them in some way.  For example, it
could display the list of todos in the current file.  This is, in
essence, the emacs "occur" command with a regexp matching todos.
Seems simple, but would be useful I think.

It might even make sense to take this idea further and allow users to
use a limited form of org-mode markup as comments directly in target
files (TODOs, DEADLINEs, etc.)  One simple way to do it would be to
have a background job that periodically scans all opened files for
comments matching some specific pattern, and autogenerates an org-file
from them.  You can then have this file included in your agenda list,
and you'll get all the benefits of org-mode for free.  Any comments?

The "linkd" project seems to be related to this idea.  Does anybody
has any experiences with using it?

Piotr
___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] POLL: Removing obsolete variables and features

2007-02-21 Thread Piotr Zielinski

On 21/02/07, Egli Christian (KIRO 43) <[EMAIL PROTECTED]> wrote:

> ;; FIXME: This variable could be removed, default nil
> (defcustom org-agenda-include-all-todo nil

I am using this to see all the todos that I have not scheduled in my
agenda.


I'd also vote for keeping this variable.

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-Mode to handle appointments ?

2007-01-09 Thread Piotr Zielinski

On 09/01/07, Tim O'Callaghan <[EMAIL PROTECTED]> wrote:

On 09/01/07, Piotr Zielinski <[EMAIL PROTECTED]> wrote:
>
> Personally, I use org-mode for personal planning (todos, deadlines,
> etc), but for appointments I use calendar programs (Google Calendar in
> my case).  [...] I think I have posted scripts to
> do this automatically to this mailing list some time ago; if not, I
> can post them again.

I use Google Calendar too, but i missed the scripts. Could you re-post
them please?


http://lists.gnu.org/archive/html/emacs-orgmode/2006-08/msg00025.html

(Note that the scripts have nothing to do with Google Calendar in
particular, they just assume a downloadable calendar in the iCalendar
format.)

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-Mode to handle appointments ?

2007-01-08 Thread Piotr Zielinski

Hi Bastien,

Personally, I use org-mode for personal planning (todos, deadlines,
etc), but for appointments I use calendar programs (Google Calendar in
my case).  If your calendar program understands the iCalendar format,
then you can convert it to the diary format, which can then be
incorporated into org-agenda view.  I think I have posted scripts to
do this automatically to this mailing list some time ago; if not, I
can post them again.

You can also store your appointments in your org file as you
suggested, although I haven't tried this approach.  I think it all
boils down to how do you identify your appointments.  If you think of
all/most of your appointments as tightly bound to particular projects,
then storing them in an org-file under a particular project might be a
good idea.  If your appointments are usually not bound to particular
projects, or you need advanced calendar scheduling functions (eg. appt
every second tuesday), then diary or a calendar program is a better
idea I think. It allows you to think of appointments in terms of time
rather than projects they belong to.

Piotr

On 08/01/07, Bastien <[EMAIL PROTECTED]> wrote:

Hi Carsten and list,

many thanks for Org-Mode 4.61, 'works smoothly here.

I was wondering if org-mode could handle appointments.  This seems to
be a natural extension, no?  I guess insinuating appts into the diary
would be processed by the &%%(org-diary) function.

What do you people think of this ?

All the best, and a happy new year to everyone!

--
Bastien


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




--
Piotr Zielinski, Research Associate
Cavendish Laboratory, University of Cambridge, UK
http://www.cl.cam.ac.uk/~pz215/


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-autoclock.el

2006-12-11 Thread Piotr Zielinski

A piece of elisp code that some of you might find useful.

Piotr

==

 org-autoclock.el --- Automatically clock projects
;;
;; Author: Piotr Zielinski
;; Homepage: http://www.cl.cam.ac.uk/~pz215/
;; Version: 0.01
;;
;; Tested with emacs 22.0.50 and org-mode 4.58
;;
;; This package scans your org files looking for links to local files
;; and directories (file:/local/file/example/).  If you are editing a
;; file whose name starts with /local/file/example/, then this package
;; will assume that you are working on the project described by the
;; headline in your org file containing the link
;; file:/local/file/example and start org-clocking it.
;;
;; Current version at http://www.cl.cam.ac.uk/~pz215/files/org-autoclock.el
;;

(require 'org)
(require 'cl)

(defvar org-autoclock-cached-files nil
 "The cached list of links to local files collected by
 `org-autoclock-refresh'.")

(defvar org-autoclock-current-project nil
 "The name of the current project returned by
 `org-autoclock-get-project'.")

(defmacro org-autoclock-with-collect (variable &rest body)
 `(let (,variable)
(labels ((,variable (item) (push item ,variable)))
  ,@body
  (nreverse ,variable

(defun org-autoclock-refresh ()
 "Update `org-autoclock-cached-files' by scanning files from
 `org-agenda-files' that are currently visited."
 (setf org-autoclock-cached-files
(org-autoclock-with-collect result
 (dolist (file org-agenda-files)
   (let* ((fullname (expand-file-name file))
  (buffer (find-buffer-visiting fullname)))
 (when buffer
   (with-current-buffer buffer
 (save-excursion
   (goto-char (point-min))
   (while (re-search-forward "file:\\([^\n>]+\\)" nil t)
 (result (list fullname
   (expand-file-name
(match-string-no-properties 1))
   (match-string-no-properties 0

(defun org-autoclock-get-project (filename)
 "Returns the name of the current project or nil."
 (loop for (file project name) in org-autoclock-cached-files
when (starts-with filename project)
return (list file name)))

(defun org-autoclock-update-project ()
 "Updates `org-autoclock-current-project'."
 (destructuring-bind (&optional file project)
 (when (< (or (second (current-idle-time)) 0) 180)
(org-autoclock-get-project (buffer-file-name)))
   (when (not (equal project org-autoclock-current-project))
 (if project
  (with-current-buffer (find-file-noselect file)
(save-excursion
  (widen)
  (goto-char (point-min))
  (search-forward project)
  (org-back-to-heading t)
  (org-clock-in)))
(org-clock-out t))
 (setf org-autoclock-current-project project

(run-with-idle-timer 180 t 'org-autoclock-update-project)
(run-with-timer 300 300 'org-autoclock-update-project)
(add-hook 'org-mode-hook 'org-autoclock-refresh)

(provide 'org-autoclock)

==

--
Piotr Zielinski, Research Associate
Cavendish Laboratory, University of Cambridge, UK
http://www.cl.cam.ac.uk/~pz215/


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Org-mode version 4.53

2006-11-01 Thread Piotr Zielinski

On 01/11/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:

Changes in Version 4.53
- org-mouse.el is now part of the org-mode distribution.


Thanks a lot for including org-mouse in the distribution.

So far, I was developing org-mouse primarily for myself, so it focuses
on my own habits and might be difficult to customize.  Since org-mouse
will now reach a bigger audience, I will put more emphasis on
customizability. If you'd like to make a particular aspect of
org-mouse customizable, please don't hesitate to contact me.

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bug fix and org-agenda-todo-ignore-deadlines option

2006-10-05 Thread Piotr Zielinski

Carsten,

Here's a patch that adds a new option
org-agenda-todo-ignore-deadlines.  If set to t (default nil), the
global todo list does not display deadlines which are closer than
org-deadline-warning-days, because such deadlines will be displayed by
the agenda anyway.  Besides, it fixes a bug with
org-agenda-todo-ignore-scheduled.

Piotr

--- org.el  2006-10-04 11:14:17.0 +0200
+++ /home/pz215/myfiles/emacs/org.el2006-10-06 03:09:24.0 +0200
@@ -1635,6 +1635,14 @@
  :group 'org-todo
  :type 'boolean)

+(defcustom org-agenda-todo-ignore-deadlines nil
+  "Non-nil means, don't show entries in the global todo list that
+have a deadline within the next org-deadline-warning-days
+days. The idea behind this is that by such items will appear in the
deadline list anyway."
+  :group 'org-agenda
+  :group 'org-todo
+  :type 'boolean)
+
(defcustom org-timeline-show-empty-dates 3
  "Non-nil means, `org-timeline' also shows dates without an entry.
When nil, only the days which actually have entries are shown.
@@ -5998,6 +6006,15 @@
  (setq ans1 (format-time-string "%Y-%m-%d" time)))
(if (active-minibuffer-window) (exit-minibuffer

+(defun org-days-to-time (timestamp-string)
+  (- (time-to-days (org-time-string-to-time timestamp-string))
+ (time-to-days (current-time
+
+(defun org-deadline-close (timestamp-string &optional ndays)
+  (and (< (org-days-to-time timestamp-string)
+ (or ndays org-deadline-warning-days))
+   (not (org-entry-is-done-p
+
(defun org-check-deadlines (ndays)
  "Check if there are any deadlines due or past due.
A deadline is considered due if it happens within `org-deadline-warning-days'
@@ -6013,12 +6030,7 @@
(case-fold-search nil)
(regexp (concat "\\<" org-deadline-string " *<\\([^>]+\\)>"))
(callback
- (lambda ()
-   (and (let ((d1 (time-to-days (current-time)))
-  (d2 (time-to-days
-   (org-time-string-to-time (match-string 1)
-  (< (- d2 d1) org-warn-days))
-(not (org-entry-is-done-p))
+ (lambda () (org-deadline-close (match-string 1) org-warn-days
(message "%d deadlines past-due or due within %d days"
(org-occur regexp nil callback)
org-warn-days)))
@@ -8057,17 +8069,24 @@
"\\)\\>")
  org-not-done-regexp)
"[^\n\r]*\\)"))
-(sched-re (concat ".*\n?.*?" org-scheduled-time-regexp))
+(deadline-re (concat ".*\\(\n[^*].*\\)?" org-deadline-time-regexp))
+(sched-re (concat ".*\\(\n[^*].*\\)?" org-scheduled-time-regexp))
marker priority category tags
ee txt)
(goto-char (point-min))
(while (re-search-forward regexp nil t)
  (catch :skip
-   (when (and org-agenda-todo-ignore-scheduled
-  (looking-at sched-re))
- ;; FIXME: the following test also happens below, but we need it here
- (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
- (throw :skip nil))
+   (save-match-data
+ (beginning-of-line)
+ (when (or (and org-agenda-todo-ignore-scheduled
+(looking-at sched-re))
+   (and org-agenda-todo-ignore-deadlines
+(looking-at deadline-re)
+(org-deadline-close (match-string 2
+
+   ;; FIXME: the following test also happens below, but we need it here
+   (or org-agenda-todo-list-sublevels (org-end-of-subtree 'invisible))
+   (throw :skip nil)))
   (org-agenda-skip)
   (goto-char (match-beginning 1))
   (setq marker (org-agenda-new-marker (1+ (match-beginning 0)))


--
Piotr Zielinski, Research Associate
Cavendish Laboratory, University of Cambridge, UK
http://www.cl.cam.ac.uk/~pz215/


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Another GTD question.

2006-10-04 Thread Piotr Zielinski

Hi,

In relation to Carsten's email, I'd like to ask about possible
integration of headings and plain lists.  I remember that such
integration was difficult because of the implementation of
outline-mode, but I don't know the details.  In case this is possible,
here are a few reasons why I'd like it:

1. As opposed to headings, plain list items can consists of more than
  one line.  On the other hand, they cannot be assigned tags or
  marked TODO.  So, sometimes, one has to use one or the other.  This
  is especially problematic, if you would like a TODO item below a
  multi-line plain list item.  It would be great if the features of
  headings and plain lists could be, at least to some extent,
  combined.

2. Code duplication.  At the moment, AFAIK, you need to write separate
  code for headings and plain lists.  Also, some features exist for
  both but in different forms, for example, TODO/DONE for headings is
  essentially the same as [ ]/[X] for plain lists.  I don't mind
  having different representation for the same concept as long as
  their share the same handling code.

However, I feel that any attempt at integrating integrating headings
and plain lists would require a significant rewrite.  Carsten, could
you please comment on the main difficulties of such integration?

Thanks,
Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Dragging URLs to an org buffer

2006-10-04 Thread Piotr Zielinski

On 04/10/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:

On Oct 3, 2006, at 19:27, Piotr Zielinski wrote:
> Here's a piece of elisp that allows you to drag URLs from a webbrowser
> (or other apps) to an org buffer.

I like the functionality, but I do find it too specialized to make this
behavior the default.  So I would weaken it, or enclose turning it on
into a customization variable.


Yes, I completely agree with you, this was a hack that worked for me
rather than something everybody could use.  But I thought sharing it
with others might be a good idea, even if only for useful feedback
like yours.

The only thing which I have a different opinion about is what to do
when you drop a URL in the middle of the line.  I believe this
function should be assigned to normal "paste" (middle button).  My
goal was to make drag-and-drop useful for managing org-mode lists
_without_ using a keyboard.  For me this means: (i) an easy
(keyboard-less) way of insterting a new list element before or after
the current element, and (ii) inserting the URL into the current line,
without the need of manual adjustment (adding spaces around, adding
the colon, etc.).  So while I agree that the behaviour must be
customizable, I'd like a solution that satisfies these two criteria.
Anyway, I'll do some modifications, and send the next version.


The reasons why I find it too intrusive
the way it is now are:

- You enforce a colon for adding to the end of the line
- you enforce a particular type of bullet.
- when inserting in a empty line, the color switches to fixed-width
quotation
- people might want to use drag-and-drop to insert something into the
text that happens to be a bullet item.

Proposals:

- Don't enforce the colon when inserting at the end of the line.
- In the middle of a line, just insert there.
- If the current line is a bullet or a headline, *and* if you drop *on*
either the bullet or the headline stars, then make a new
headline/bullet for the dragged text.  Always make the bullet after the
current line.  (well, when inserting in front of a bullet, you could
insert before the current...)
- Respect the type of bullet:  numbered, -, +, *.


Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Dragging URLs to an org buffer

2006-10-03 Thread Piotr Zielinski

Hi,

Here's a piece of elisp that allows you to drag URLs from a webbrowser
(or other apps) to an org buffer.  If the current line looks like

   + this is an existing item

Then releasing a drag to the left of "+" will insert the URL before:

+ http://www.dragged.url
+ this is an existing item

Releasing on the text "+ this is an existing item" will insert the URL after:

+ this is an existing item
+ http://www.dragged.url

Releasing to the right of the text will produce:

+ this is an existing item: http://www.dragged.url

Any suggestions welcome.  The functionality is now part of org-mouse
(I think it requires Emacs 22):

http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el

Alternatively, here's the elisp code

(defadvice dnd-insert-text (around org-mouse-dnd-insert-text activate)
 (if (eq major-mode 'org-mode)
 (progn
(cond
 ;; if this is the end of the line then just insert text here
 ((eolp)
  (skip-chars-backward " \t")
  (kill-region (point) (point-at-eol))
  (unless (looking-back ":") (insert ":"))
  (insert " "))

 ;; if this is the beginning of the line then insert before
 ((and (looking-at " \\|\t")  
   (save-excursion
 (skip-chars-backward " \t") (bolp)))
  (beginning-of-line)
  (looking-at "[ \t]*")
  (open-line 1)
  (indent-to (- (match-end 0) (match-beginning 0)))
  (insert "+ "))

 ;; if this is a middle of the line, then insert after
 (t
  (end-of-line)
  (newline t)
  (indent-relative)
  (insert "+ ")))
(insert text)
(beginning-of-line))
   ad-do-it))


Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Another GTD question.

2006-10-01 Thread Piotr Zielinski

Hi,

Org-mode is a major part of my GTD scheme, however, there are some
tasks for which I think it's not ideal.  One example are lists of
"lightweight" items; items that are not critical and nothing seriously
bad would happen if they are forgotten.  Interesting webpages to read
or papers to read/print are good examples.


FORGETTABLE LISTS

The following requirements describe the problem:

1. Adding new items must be as easy as possible, preferably just a
  single click of the browser button "Mark this page for future
  reading".  This is the most important requirement, which is not
  currently met by org-mode.

2. The list works like a stack: adding is possible only on the top.
  This keeps the items on the list in the approximate order of
  decreasing relevance to my current interests.

3. Only the say 10 most recent items are of any relevance.  If any
  earlier items haven't been acted upon, they are not relevant
  enough: I have at least 10 more interesting things to do.  I don't
  want to see such items; if they become relevant in the future I can
  always add them again.


MY LISTS

1. "To Read" for webpages/papers I want to read
2. "To Print" for pdfs to print when I'm in the office
3. "To Use" interesting internet services to try
4. "To Buy" for gadgets I might be interested in buying
5. "To Supermemo" for concepts to memorize with supermemo [1]
6. "Books to Read"
7. "Movies to Watch"


IMPLEMENTATION

Currently, I use del.icio.us to maintain them.  I have a menu in the
Toolbar menu that contains bookmarklets like "Add To Read" with the
following URL (one line)

javascript: function loadScript(scriptURL) { var scriptElem =
document.createElement('iframe'); scriptElem.setAttribute('src',
scriptURL); document.body.appendChild(scriptElem);}
loadScript('https://api.del.icio.us/v1/posts/add?tags=to-read&url='+encodeURIComponent(location.href)+'&description='+encodeURIComponent(document.title))

and also Live Bookmarks that point to the RSS of the relevant lists,
and display the first 10 or so items on each list.


METALISTS

Here are some places I use for maintaining lists: org-mode files,
browser bookmarks, amazon basket, amazon wishlist, amazon recommended
books, watchthatpage, google alerts, delicious, movielens, citeulike.
Each of them is different, has its strengths and weaknesses, and it
would be very difficult to integrate them into a single system.  My
solution at the moment, is just to have a metalist: a list in my
org file containing URLs of all my lists.

Piotr

[1] http://www.supermemo.net.pl/index.net


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Calendar hack: take the default date from clipboard

2006-09-28 Thread Piotr Zielinski

Hi all,

When adding a timestamp, org-mode proposes the current date.  This
hack makes it look at the contents of the clipboard, and if it
contains a valid date, org-mode proposes that date instead.  This
comes useful, when you copy a deadline from another application, for
example, a web browser.

(setq parse-time-months '(("jan" . 1) ("feb" . 2) ("mar" . 3)
  ("apr" . 4) ("may" . 5) ("jun" . 6)
  ("jul" . 7) ("aug" . 8) ("sep" . 9)
  ("oct" . 10) ("nov" . 11) ("dec" . 12)

  ("january" . 1) ("february" . 2) ("march" . 3)
  ("april" . 4) ("may" . 5) ("june" . 6)
  ("july" . 7) ("august" . 8) ("september" . 9)
  ("october" . 10) ("november" . 11) ("december" . 12)))

(defadvice org-read-date (around local-org-read-date activate)
   (let ((local-ct
  (let ((clipboard-time
 (parse-time-string (current-kill 0
(if (nth 3 clipboard-time) ; if day is not nil
(apply 'encode-time
   (mapcar (lambda(x) (or x 0)) clipboard-time))
  (org-current-time)
 (flet ((org-current-time () local-ct))
   ad-do-it)))

Test and enjoy.
Piotr


--
Piotr Zielinski, Research Associate
Cavendish Laboratory, University of Cambridge, UK
http://www.cl.cam.ac.uk/~pz215/


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Bracket Links in org-agenda buffer - small glitches

2006-09-21 Thread Piotr Zielinski

Eric,

After any operation on an agenda-buffer line, org-mouse updates it by
calling org-agenda-change-all-lines.  I'll wait ot see whether
Carsten's fix in 4.50 fixes the problem with org-mouse as well; if
not, I'll try to fix it.

Piotr

On 20/09/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:

Hi Eric,

thanks for the detailed report - this will be fixed in 4.50.

- Carsten

On Sep 18, 2006, at 20:47, Eric J Haywiser wrote:

> Greetings,
>
>   Some months ago, I inquired about rendering bracket links in the
> org-agenda view.  This now *almost* works, kudos
> to ?Carsten? and/or the others who made this fix.
>
> I notice 3 small glitches that remain:
>
> 1) Early warning links are not rendered
>
> Consider the following org file:
> ;
> ---
> --
>
> * [[http://www.google.com][Visit Google]]   DEADLINE: <2006-09-18 Mon>
>
> * [[http://www.google.com][Visit Google Tomorrow]]   DEADLINE:
> <2006-09-19 Tue>
>
> ;
> ---
> --
>
> a call to "org-agenda-list" yields the following view in the agenda
> buffer
> provided the org files containing the agenda entries are already open
> as buffers:
>
> Week-agenda:
> Monday18 September 2006
>   test:   Deadline:   Visit Google   DEADLINE: <2006-09-18 Mon>
>   test:   In   1 d.:  [[http://www.google.com][Visit Google
> Tomorrow]]   DEADLINE: <2006-09-19 Tue>
> Tuesday   19 September 2006
>   test:   Deadline:   Visit Google Tomorrow DEADLINE: <2006-09-19
> Tue>
> Wednesday 20 September 2006
> Thursday  21 September 2006
> Friday22 September 2006
>   Diary:   0:03.. Autumnal Equinox (EDT)
> Saturday  23 September 2006
> Sunday24 September 2006
>
> where the bracket links for deadlines occuring on a given day are
> "rendered", but the early warning for the same event (In 1 d.)
> does not "render" the bracket link.  Instead the "raw" bracket
> link markup is shown.
>
> 2) The following seems to be an interesting interaction with org-mouse:
>
>If one right clicks on the "raw" link to bring up the menu with
>"Open C-c o" etc, the raw link transforms to a rendered link.
>Note that actually selecting a menu item is not required to trigger
>this behavior, just bringing up the menu, then canceling.
>
> Any action that changes the view such as:
>- A call to org-agenda-toggle-time-grid or
>- arrow key paging to next  week
>- etc
> unfortunately switches back to the less desirable "raw" link
> for the early warning events.
>
> 3) Entries coming from emacs diary files also produce "raw" instead of
>"rendered" markup
>
> Thanks again for all the great efforts.  Org is amazing.
>
> Solutions or ideas regarding the glitches are appreciated.
>
> -Eric
>
> Relevant versions include:
>
> org-mouse: 0.16, 0.18
> org: 4.47, 4.49
>
>
>
> ___
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
>

--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477



___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




--
Piotr Zielinski, Research Associate
Cavendish Laboratory, University of Cambridge, UK
http://www.cl.cam.ac.uk/~pz215/


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] suggestion: agenda commands restricted to the current region/subtree

2006-08-28 Thread Piotr Zielinski

Carsten,

By default, the org-agenda command looks at all files in
org-agenda-files.  Is it possible to restrict its input to the current
file/region/subtree (for one invocation)?  Restricting the input to
the current project subtree would give me an easy way of listing all
TODO items associated with that project.

Thanks,
Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] How to sort by tags

2006-08-28 Thread Piotr Zielinski

On 28/08/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:

Yes, with tags as context this would make sense..

Other input, anyone?


Sorting by tags might be thought of as a special case of multi-block
agenda buffer, in which you can execute multiple agenda commands
without erasing the buffer.  For example, you can use org-agenda first
to list all the items tagged "work" and then all the items tagged
"home".  The only change in the current implementation would be not to
erase the agenda buffer.  This approach would require one org buffer
scan for each keyword, which might be inefficient.

The advantage of this approach is that it leaves it up to the user how
do deal with multi-tagged entries.  If an element tagged ":work:home:"
should appear under both "work" and "home", then the user would
specify the block list to be '("work" "home").  If such elements
should appear only in "work", the specification would be ("work"
"+work-home").  Alternatively, we can put elements ":work:home:" into
a separate list by specifying three lists ("+work-home" "+home-work"
"+work+home").  In general, without prior knowledge about the
semantics of tags, choosing one of those approaches automatically will
be difficult.

Finally, having the whole power of the org-agenda and tag matching,
one could construct more sophisticated blocks, for example, consisting
of all ":work:" entries that are TODO at the same time.

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] Emacs-Calendar export to iCal/vcal

2006-08-23 Thread Piotr Zielinski

Hi Phil,

Not directly relevant, but here's what I use to synchronize the
calendar information in the other direction: from iCalendar calendars
to emacs org-mode.  The whole setup is rather hacky and complicated (I
didn't really have time to make it more presentable) but it might be
still useful to some.

I have all my org-files in ~/myfiles/org/.  File calendars.txt,
contains URLs of remote calendars I'd like to include in my
org-agenda.  The first word in each line is the name of the local file
to which the remote calendar will periodically be downloaded:

-- calendars.txt STARTS --
camtalks http://talks.cam.ac.uk/show/ics/5245
msresearchtalks http://www.srcf.ucam.org/users/pz215/msr.ics
-- calendars.txt ENDS --

Once a day I execute the following script (from cron):

-- update-calendars STARTS --
#!/bin/bash

orgdir=~/myfiles/org
diary=$orgdir/calendars.diary
emacs=$orgdir/local-calendars.el


$diary

echo "(setq local-calendars '(" > $emacs

cat $orgdir/calendars.txt | \
{
   while read name url ; do
wget -N -O $orgdir/$name.ics $url
echo "#include \"$orgdir/$name.diary\"" >> $diary
echo "\"$name\" " >> $emacs
   done
}

echo "))" >> $emacs
-- update-calendars ENDS --

It downloads all the remote calendars described in "calendars.txt" and
creates two new files.  First, "calendars.diary", which is an emacs
diary meta-file that just includes the proper calendar files.

-- calendars.diary STARTS --
#include "/home/pz215/myfiles/org/camtalks.diary"
#include "/home/pz215/myfiles/org/msresearchtalks.diary"
-- calendars.diary ENDS --

The second file created by "update-calendars" is "local-calendars.el",
an elisp file that contains a list of calendars:

-- local-calendars.el STARTS --
(setq local-calendars '(
"camtalks"
"msresearchtalks"
))
-- local-calendars.el ENDS --

What remains is to convert the downloaded icalendar files into the
diary files included by "calendars.diary".  To this end, I have the
following lines in my ".emacs":

-- .emacs SNIPPET STARTS --
(require 'calendar)
(european-calendar)
(load "~/myfiles/org/local-calendars.el")
(dolist (name local-calendars)
 (let ((ical (concat "/home/pz215/myfiles/org/" name ".ics"))
(diary (concat "/home/pz215/myfiles/org/" name ".diary")))
   (when (file-newer-than-file-p ical diary)
 (with-current-buffer (find-file-noselect diary)
(kill-region (point-min) (point-max))
(icalendar-import-file ical diary)
-- .emacs SNIPPET ENDS --

That's it.  If you want emacs to notify you about your appointments,
take a look at the function "appt-activate" in the appt library.  If
you use a desktop environment that uses the standard notification
deamon (e.g., GNOME), you can set up the appt library to use it.  Take
a look at the "send-notify" command from the "libnotify-bin" package
(Debian/Ubuntu).

Thanks,
Piotr


On 23/08/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:


Hi Phillip,

have you read this?

http://staff.science.uva.nl/~dominik/Tools/org/org.html#iCalendar-export

If yes, can you be more specific about what you are missing?

- Carsten

On Aug 23, 2006, at 22:46, Philipp Raschdorff wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hi,
>
> I'm using emacs +org-mode mainly for organizing todos and for
> brainstorming in project planing and organizing tasks etc. So it's
> mainly a (very powerfull) outliner.
>
> I playes arround with the DUE & DEADLINE features and realized that
> there is one thing missing for me:
>
> synchronizing emacs-todos / appointments to iCal (Mac OS X 10.4)
>
> To make it easier: I really would like to have it one way: Adding data
> from emacs to an iCal-file.
>
> I'm using my mobile phone to synchronize with my calendar (iCal) and
> it would be nice to have EMacs copying data to iCal and then have this
> data on my mobile phone after the next sync.
>
> What do you think? Are you using the emacs-calendar-functions and how
> to you synchronize to other applications?
>
> Any suggestions would be great.
>
> Best regards from Berlin / Germany
>
> Phil
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.3 (Darwin)
>
> iD8DBQFE7L7HmbjPeL8dZWgRAt29AJ9JyQJK5Ps3UJyAuFDGGhlZq+WdQgCeIMvj
> Sl/n5RM1yFFlpSX8umWWH8A=
> =+rV9
> -END PGP SIGNATURE-
>
>
> _______
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/ma

Re: [Emacs-orgmode] GTD, Projects, and Next Actions in org-mode

2006-08-04 Thread Piotr Zielinski

On 03/08/06, Jason F. McBrayer <[EMAIL PROTECTED]> wrote:


I thought I'd ask to see how other people who are using org for
Getting Things Done are handling projects and their relationship to
Next Actions.


Thanks for bringing up this topic.  You're definitely not alone with
this problem, and I'd also like to know how others use org-mode for
GTD stuff.

I have a headline "* projects" with individual projects as
second-level headlines, sorted (manually and approximately) from the
most-important to the least important.  To mark  "next action" items I
just use the TODO keyword.   (Alternatively you can define a special
NEXTACTION keyword or tag.)  If I need to see the global list of my
nextaction items I use one of the following commands:
org-show-todo-tree (C-c C-v),
org-tags-sparse-tree (C-c \), org-agenda.  A bit of self-publicity
here: I find context-menus of org-mouse.el useful for invoking these
commands.

Allen recommends keeping all your info as a series of various lists,
but the advantage of org-mode is that some of those lists (such as the
list of current nextaction items) can be autogenerated every time it's
needed and not kept anywhere explicitly.

Apart from the "*projects" headline, I also have a "*todo" headline,
where I put all the todo items which are not clearly assignable to a
specific project (or when I simply don't have the time for finding the
appropriate project to put them under).  Once every while, I go
through the "*todo" hierachy and move some items into the appropriate
projects.  Sometimes groups of entries in the "*todo" hierarchy evolve
to the point of becoming a separate project by themselves.  This might
look like a mess, but actually it allows me to spend more time doing
things than organizing them.

Actually, I was lying a bit: I don't have one "*projects" headlines,
but several of them: "*research activities", "*research projects",
"*other projects", all sorted from most-current to least-current.  I
recommend having separate project lists only if you have a clear-cut
distinction between them.  I also periodically move all projects
further than 10-15 places from the top of each list to one common list
"* one day / maybe".

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] automatic isearch-mode in org-goto and org-remember

2006-06-23 Thread Piotr Zielinski

Hi,

The following lisp code turns automatic isearch mode on (as in
Firefox) whenever you navigate an org-file using org-goto or
org-remember.  It is useful especially for finding headlines when the
org-file is long and has a deeply nested structure. The isearch-mode
is modified so that it searches only headlines (even invisible ones)
but ignores normal text.

The function local-move-tree uses (the enhanced) org-goto to move the
current tree to the selected location.  It is useful for organizing
your org-file; when many items accumulated on your general todo list
(eg. after using org-remember a lot) and you want to dispatch them to
the projects they belong to.

Finally, the newest version of  org-mouse (0.17) allows you to toggle
checkboxes [X] with a single mouse click.

http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el

Piotr


(defvar local-auto-isearch-map (make-sparse-keymap))
(set-keymap-parent local-auto-isearch-map isearch-mode-map)
(define-key local-auto-isearch-map "\C-i" 'isearch-other-control-char)

(defun local-search-forward-headings (string bound noerror)
 (catch 'return
   (while (search-forward string bound noerror)
 (when (save-match-data (outline-on-heading-p t))
(throw 'return t)

(defun local-auto-isearch ()
 (interactive)
 (let ((keys (this-command-keys)))
   (when (eq (lookup-key isearch-mode-map keys) 'isearch-printing-char)
 (isearch-mode t)
 (isearch-process-search-char (string-to-char keys)

(defun local-move-tree (&optional tobuffer)
 (interactive)
 (setq tobuffer (or tobuffer (current-buffer)))
 (let ((toplace (save-excursion
(set-buffer tobuffer)
(beginning-of-buffer)
(org-goto)
(copy-marker (point)
   (org-cut-subtree)
 (save-excursion
(set-buffer tobuffer)
(goto-char toplace)
(org-back-to-heading t)
(org-paste-subtree (outline-level)


(add-hook 'org-mode-hook
  '(lambda ()
 (defadvice org-get-location (around auto-isearch-advice activate)
   (let ((isearch-mode-map local-auto-isearch-map)
 (isearch-hide-immediately nil)
 (isearch-search-fun-function
  (lambda () 'local-search-forward-headings)))
 ad-do-it))
 (define-key org-goto-map [(return)] 'org-goto-ret)
 (define-key-after org-goto-map [t] 'local-auto-isearch)
 (require 'cl)
 (dolist (key '(?n ?p ?f ?b ?u ?q))
   (setq org-goto-map (assq-delete-all key org-goto-map)


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] todo and deadline highlighting

2006-06-19 Thread Piotr Zielinski

On 12/06/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:


On Jun 8, 2006, at 1:34, Piotr Zielinski wrote:

> The following two functions redefine org-show-todo-tree, so that TODO
> items SCHEDULED for the future are not highlighted.  Only
> non-scheduled TODO items or TODO items scheduled for the past or
> present are highlighted.  The SCHEDULED directive must be on the same
> line as the TODO keyword.

This is another interesting idea, but the search must allow more than
the current line.  Everything up to the next headline  (or any level)
should be searched.


Another try:

(defun org-todo-is-current ()
 "Checks whether a TODO item is current."
 (if (re-search-forward org-scheduled-time-regexp
 (save-excursion (outline-next-heading) (point)) t)
 (let ((today (calendar-absolute-from-gregorian
(calendar-current-date)))
(timestamp (time-to-days
(org-time-string-to-time (match-string 1)
(<= timestamp today))
   t))


Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] todo and deadline highlighting

2006-06-07 Thread Piotr Zielinski

Hi,

Here are three functions related to todo and deadline highlighting is
the todo buffer.  The first lets you highlight upoming deadlines and
todo items at the same time.

(defun org-check-deadlines-and-todos (ndays)
 (org-check-deadlines ndays)
 (flet ((org-remove-occur-highlights (&optional beg end noremove))
 (org-overview ()))
   (org-show-todo-tree nil)))

It would be nice to be able to tell the org-occur function not to
remove existing highlights in a less hacky way.  Another suggestion:
explicit specification of the face used for highlighting so that
deadlines and todos could use a different face.  Yet another
suggestion: the org-occur callback could return the face to use, so
that different faces could be used for deadline highlighting,
depending on the urgency of the deadline (ie. in 3 days vs. in 30
days).

The following two functions redefine org-show-todo-tree, so that TODO
items SCHEDULED for the future are not highlighted.  Only
non-scheduled TODO items or TODO items scheduled for the past or
present are highlighted.  The SCHEDULED directive must be on the same
line as the TODO keyword.

(defun org-todo-is-current ()
 "Checks whether a TODO items is current."
 (if (re-search-forward org-scheduled-time-regexp (point-at-eol) t)
 (let ((today (calendar-absolute-from-gregorian
(calendar-current-date)))
(timestamp (time-to-days
(org-time-string-to-time (match-string 1)
(<= timestamp today))
   t))

(defun org-show-todo-tree (arg)
 "Make a compact tree which shows all headlines marked with TODO.
The tree will show the lines where the regexp matches, and all higher
headlines above the match.
With \\[universal-argument] prefix, also show the DONE entries.
With a numeric prefix N, construct a sparse tree for the Nth element
of `org-todo-keywords'."
 (interactive "P")
 (let ((case-fold-search nil)
(kwd-re
 (cond ((null arg) org-not-done-regexp)
   ((equal arg '(4)) org-todo-regexp)
   ((<= (prefix-numeric-value arg) (length org-todo-keywords))
(regexp-quote (nth (1- (prefix-numeric-value arg))
   org-todo-keywords)))
   (t (error "Invalid prefix argument: %s" arg)
   (message "%d TODO entries found"
 (org-occur (concat "^" outline-regexp " +" kwd-re )
'org-todo-is-current


Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] org-mouse 0.16: added support for checkboxes

2006-06-05 Thread Piotr Zielinski

I've added support for checkboxes to org-mouse.el

http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] Org-mouse 0.15: Agenda buffer support

2006-05-26 Thread Piotr Zielinski

Org-mouse.el 0.15 includes support for the Agenda buffer: it has the
same context-sensitive menus (tags, timestamps, etc) as normal
org-mode buffers, so that you can now modify the entries directly from
the Agenda buffer.

http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] Autocollapse of outline nodes

2006-05-11 Thread Piotr Zielinski

Below is a version of autocollapse that works correctly even if
several windows show the same buffer.  It periodically collapses
outline nodes that are far from the current point position [1].

Piotr

[1] http://zerotau.blogspot.com/2006/04/autocollapse-mode-for-emacs.html

(defun local-fold-from-level (beg end level)
 (hide-region-body beg end)
 (goto-char beg)
 (unless (looking-at outline-regexp)
   (outline-next-visible-heading 1))
 (while (and (<= (point) end) (not (eobp)))
   (when (> (outline-level) level)
 (hide-subtree))
   (outline-next-visible-heading 1)))


(defun local-contains-point (beg end pointlist)
 (let ((result))
   (dolist (point pointlist result)
 (setq result (or result (and (>= point beg) (<= point end)))

(defun local-auto-fold ()
 (save-excursion
   (let ((pointlist (mapcar 'window-point
 (get-buffer-window-list (current-buffer) nil t
 (message "fold: %S: %S" (current-buffer) pointlist)
 (beginning-of-buffer)
 (unless (looking-at outline-regexp)
(outline-next-visible-heading 1))
 (while (not (eobp))
(let ((end (save-excursion (outline-end-of-subtree) (point
  (if (local-contains-point (point) end pointlist)
  (outline-next-visible-heading 1)
(local-fold-from-level (point) end (outline-level

(defun local-auto-fold-all ()
 (save-excursion
   (dolist (buffer (buffer-list))
 (set-buffer buffer)
 (when (eq major-mode 'org-mode)
(local-auto-fold)

(run-with-idle-timer 60 t 'local-auto-fold-all)


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] org-mouse 0.14: plain list to outline conversion and intelligent "insert heading"

2006-05-11 Thread Piotr Zielinski

Version 0.14 of org-mouse.el [1,2] has a menu entry that converts a
plain list to an outline. Also, "Insert Heading" now inserts a sibling
heading if the point is on "***" and a child heading otherwise.

Piotr

[1] http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el
[2] http://zerotau.blogspot.com/2006/05/org-mouse-for-emacs-new-version-014.html


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] illustrated brief tutorial for org-mode

2006-05-04 Thread Piotr Zielinski

Thanks David!  I didn't know about the CLOSED: tag.
Carsten, could you link to this from the main org-mode site?  By the
way, there was a typo in the link, the correct one is:

http://dto.freeshell.org/notebook/OrgTutorial.html

Piotr

On 04/05/06, David O'Toole <[EMAIL PROTECTED]> wrote:


Hi all. I've made an illustrated tutorial for org-mode. This tutorial
only covers the most basic features and only a few situations, but it
is profusely illustrated with screenshots and could help new users get
an idea of how org-mode looks and feels. It's meant as a sort of
brief guided tour.

http://dto.freeshell.org/notebook/OrgTutorial.org

In other news, I am working on blogging support for org-publish. More
news as events warrant...

--
Dave O'Toole
[EMAIL PROTECTED]


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode




___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] global todo list: separators?

2006-04-27 Thread Piotr Zielinski
On 27/04/06, David O'Toole <[EMAIL PROTECTED]> wrote:
>
> Is it possible to have horizontal rules separating the different
> categories in the Global TODO list? That would make it much easier
> for me to read when I am hunting for tasks to schedule.

While on this topic: would it be possible to display more than one
"block" of items in the agenda buffer?  Say you have two tags: "home"
for tasks that you can do only at home, and "anywhere" for tasks you
can do anywhere.  If you want to find out what tasks you can do at
home, you can make the agenda display all tags maching
"home|anywhere".  However, this would intermix "home" and "anywhere"
tasks; it would be nice to be able to display the block of "home"
tasks followed by a block of "anywhere" tags.

What I'm asking for really is some modularization of the construction
of the agenda buffer by providing the user with functions that append
a new block to the agenda buffer.
For example, the default agenda view consists of two blocks: "all
TODOs" and the day or week view.  With modular blocks, I could have an
agenda buffer that consists of three blocks: the list of TODO tasks
"home", followed by the block of the TODO tasks "anywhere", followed
by the day view.

> Also, I would love to be able to hit > on one of these lines, to
> schedule it for Today.

Speaking about scheduling tasks: I'd like to have an option that,
while generating lists of TODO headlines, omits items scheduled for
the future.  The rationale is, since I already scheduled these tasks
for the future, I'm not interested in doing them now.

Thanks,
Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] checkable items which don't show up in agenda

2006-04-26 Thread Piotr Zielinski
Hi,

It seems that different people use TODOs in different ways.  For
example, I use TODOs at the very lowest possible level to indicate the
next action in a particular project.  That said, I'd welcome some
hierarchical propagation of TODO, as it is with tags.  One can imagine
using two kinds of todos: TODO and NEXTACTION.  TODO would be attached
to (high-level) projects I'm currently interested in doing, whereas
NEXTACTION attached to the low-level nodes of the tree that correspond
to the next physical action to take.  The agenda could be configured
in such a way to display only these NEXTACTIONs that have an ancestor
marked as TODO.  Note that this is already possible with tags.  Is it
sensible to make org.el treat TODOs as a any other tag?

To make most of org-mode, I think it would be very useful to compare
how people actually use it.  I'm sure I could learn a lot of useful
things from such an exchange, and would be surprised by the variety of
organizing structures people use.  The best way to achieve that is
probably to post deprivatized sample parts of our .org files with a
short explanation.  What place do you think is the best: this email
list? some wiki? something else?

Piotr

On 26/04/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:
>
> On Apr 26, 2006, at 8:54, Christian Egli wrote:
>
> > On Tue, 2006-04-25 at 18:19 +0200, Frank Ruell wrote:
> >> The only thing I've missed was an option for items, which are
> >> fontyfied
> >> and checkable via some shortcut, but never ever show up in agenda (or
> >> rather clutter up your agenda).
> >
> > What would be a use case for that? I have been thinking I would not
> > want
> > to see TODO items in the agenda that for the following scenario:
> >
> > * TODO Organize event
> > ** TODO Choose a date
> > ** TODO Invite people
> >
> > Here I'd like my agenda to remind me only that I need to Organize the
> > event. I'd like to be able to check of the subtasks (which I'll do in
> > the org-mode buffer, not in the agenda), but I do not want them to
> > "clutter" my agenda.
>
> Interesting idea.  I could make an option which would stop searching
> for TODO in the subtree below a TODO entry.
>
> - Carsten
>
>
>
> ___
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] Autocollapse of outline nodes

2006-04-26 Thread Piotr Zielinski
Carsten, thanks for your comments. I'll incorporate your suggestions
into the code as soon as I can.

Piotr

On 26/04/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:
>
> On Apr 24, 2006, at 14:15, Piotr Zielinski wrote:
>
> > Hi,
> >
> > Here's a small piece of code that periodically collapses all org nodes
> > (trees) which are far away (structurally) from the current cursor
> > position.  The purpose is to automatically collapse nodes which you
> > are no longer working on, thereby preventing uncontrolled growth of
> > the visible size of your .org buffer as the day progresses.
>
> very interesting idea / piece of code.
>
> One potential problem that I see is that (point) is a property of a
> window.  Only if a buffer is shown in one or zero windows, then (point)
> is unique after a set-buffer operation for this buffer and you can use
> it to select which part not to hide.
>
> So what might happen is that you can have two or more windows on a
> buffer (in the same frame, or even on different frames), each looking
> at a different section of the outline tree.  I often do this when
> restructuring a file, while moving stuff from one place in a file to
> another.  Your code would keep closing some of the visible outlines,
> because it only considers (point) in a single window (I don't even know
> which one if would actually use in this case, an interesting problem).
> To solve this, you would need to check if a buffer is displayed in
> several places, make a list of (point) in all these places, and then
> check is any of the listed values of point fall in the outline subtree
> you are about to close.
>
> Finally, you are running it on an idle timer with 60 seconds of idle
> time required.  I would be interesting how this works in pratice, and
> if this is the best way to activate this code.  For now, I have not
> tried it extensively and I don't know.
>
> - Carsten
>
>
>
> --
> Carsten Dominik
> Sterrenkundig Instituut "Anton Pannekoek"
> Universiteit van Amsterdam
> Kruislaan 403
> NL-1098SJ Amsterdam
> phone: +31 20 525 7477
>
>


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] org-mouse.el 1.12 released: compatible with Emacs 21

2006-04-25 Thread Piotr Zielinski
Version 1.12 of org-mouse.el, better mouse support for org-mode, is available:

http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el

Bug reports and feature requests welcome.

Thanks,
Piotr

Changelog:

;; Version 0.12
;; + compatible with Emacs 21
;; + custom agenda commands added to the main menu
;; + moving trees should now work between buffers


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] Autocollapse of outline nodes

2006-04-24 Thread Piotr Zielinski
Hi,

Here's a small piece of code that periodically collapses all org nodes
(trees) which are far away (structurally) from the current cursor
position.  The purpose is to automatically collapse nodes which you
are no longer working on, thereby preventing uncontrolled growth of
the visible size of your .org buffer as the day progresses.

Please send your comments/suggestions, for example, whether this
functionality has already been implemented elsewhere.  Should work
with any outline buffer.

Piotr

;---
(defun local-fold-from-level (beg end level)
  (hide-region-body beg end)
  (goto-char beg)
  (unless (looking-at outline-regexp)
(outline-next-visible-heading 1))
  (while (and (<= (point) end) (not (eobp)))
(when (> (outline-level) level)
  (hide-subtree))
(outline-next-visible-heading 1)))

(defun local-auto-fold ()
  (save-excursion
(let ((point (point)))
  (beginning-of-buffer)
  (unless (looking-at outline-regexp)
(outline-next-visible-heading 1))
  (while (not (eobp))
(let ((end (save-excursion (outline-end-of-subtree) (point
  (if (or (< end point) (> (point) point))
  (local-fold-from-level (point) end (outline-level))
(outline-next-visible-heading 1)))

(defun local-auto-fold-all ()
  (save-excursion
(dolist (buffer (buffer-list))
  (set-buffer buffer)
  (when (eq major-mode 'org-mode)
(local-auto-fold)

(run-with-idle-timer 60 t 'local-auto-fold-all)
;


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] org-mouse.el

2006-04-13 Thread Piotr Zielinski
On 13/04/06, Carsten Dominik <[EMAIL PROTECTED]> wrote:

> In the latest version, the context menu on links does not seem to work

Yes, the org-mouse-at-link function has never been particularly
elegant: I had simply copied a fragment of org.el, this is why it was
so sensitive to changes in org-mode.
Your suggestion is much better in this respect.  I've put it into
org-mouse.el, thanks.

> One more thing.  [...]  Could org-mouse.el honor this
> variable or even better no longer put those bindings to
> [follow-link] at all because org.el does this already?

Done.

Thanks,

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Emacs-orgmode] org-mouse.el 1.10 released, compatible with org-mode 4.21

2006-04-12 Thread Piotr Zielinski
I've just fixed an incompatibility bug, which prevented org-mouse from
operating correctly with org-mode 4.21.  Here's the latest version:

http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el

Bug reports welcome

Piotr


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Emacs-orgmode] New test version: org-4.19a

2006-03-30 Thread Piotr Zielinski
I've now removed references to org-xemacs-p from org-mouse.

http://www.cl.cam.ac.uk/~pz215/files/org-mouse.el

Piotr

On 30/03/06, Scott Otterson <[EMAIL PROTECTED]> wrote:
> Good idea about the *Messages* buffer -- I've always completely ignored
> it.  Looking at it over, I realized that my problem is due to a conflict
> between org-4-19a and an old allout setting I had in my .emacs.  With
> these lines in my .emacs:
>
> ---
> (defvar rf-allout-font-lock-keywords
>'(;;
>  ;; Highlight headings according to the level.
>  (eval . (list (concat "^\\(" outline-regexp "\\).+")
> 0 '(or (cdr (assq (outline-depth)
>   '((1 . font-lock-function-name-face)
> (2 . font-lock-variable-name-face)
> (3 . font-lock-keyword-face)
> (4 . font-lock-builtin-face)
> (5 . font-lock-comment-face)
> (6 . font-lock-constant-face)
> (7 . font-lock-type-face)
> (8 . font-lock-string-face
>font-lock-warning-face)
> nil t)))
>"Additional expressions to highlight in Outline mode.")
>
> ;; add font-lock to allout mode
> (defun rf-allout-font-lock-hook ()
>(set (make-local-variable 'font-lock-defaults)
> '(rf-allout-font-lock-keywords t nil nil
> outline-back-to-current-heading))
>; doesn't work here? works if use emacs customizer (so leave it there)
>;(setq outline-plain-bullets-string "-*-*-")  ; not fontlocking...
>; lead w/ spaces, could instead use: `outline-use-mode-specific-leader'
>;(setq outline-header-prefix ".")
> )
>
> (add-hook 'outline-mode-hook 'rf-allout-font-lock-hook)
> --
>
> I got this message in *Messages*:
>
>Error during redisplay: (void-function outline-depth) [7 times]
>
> When I removed the allout settings above, the error went away and
> fontlocking in org-mode works again.
>
> Links now display very nicely.  A couple comments
>
> * URL links work great.  I think this is a big improvement!
>
> * It would be nice if file TAB completion worked after the minibuffer
> "Link" prompt
>
> * looks the stuff at the top of p. 18 of the manual has been obsoleted
> by this change.  Tthe <>'s are no longer neded  in
> "[[][GNU Emacs]])" although they
> still work.
>
> * Are the <>'s required anymore?  At the C-c C-l "Link:" prompt is it
> possible to write things so that you can just type:
>file:afilename
>news:comp.emacs
> instead of:
>
>
>
> * It would be cool if file TAB completion worked after typing "file:"
>
> * If I hit BACKSPACE in a link, then the guts of the link are displayed.
>   But then it's not clear how to repair the link to make them hidden
> again.
>
> Thanks for the changes,
>
> Scott
>
> Carsten Dominik (03/29/2006 11:49 PM) wrote:
> > I cannot reproduce this under Emacs 22.0.50.1.  I tried  under Linux and
> > under MacOS, works fine in both cases.
> >
> > Is there something in the *Messages* buffer that looks suspicious?  What
> > if you turn off font-lock-mode, and then turn it back on?
> >
> > How does your font-lock and org-mode related setup look like, have you
> > configured something I don't?
>
>
> ___
> Emacs-orgmode mailing list
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


___
Emacs-orgmode mailing list
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode