[O] Bug: Buffer restriction lost with org-agenda-sticky enabled

2014-09-27 Thread Thomas Morgan
Dear Org mode hackers,

I discovered a bug where refreshing a sticky agenda view
can cause a buffer restriction to be lost.

I'm using the maint branch of Org-mode
version 8.2.7c (`release_8.2.7c-85-g4f4002')
and GNU Emacs 24.3.1 (`x86_64-unknown-linux-gnu',
X toolkit, Xaw3d scroll bars).

I started Emacs with the command `emacs -Q -l setup.el'
(file `setup.el' is attached).  Note that `org-agenda-sticky'
is set in `setup.el'.

I then visited the file `foo.org' (attached): `C-x C-f foo.org RET'.

Then I made a list of TODO items in the current file:
`M-x org-agenda RET  t'.  It appeared as expected like this:

,
| Global list of TODO items of type: ALL
| Available with `N r': (0)[ALL]
|   foo:TODO Foo 
:foo:
`

Next I made a list of headlines (in all files) matching the tag `bar':
`M-x org-agenda RET m bar RET'.  It appeared as expected like this:

,
| Headlines with TAGS match: bar
| Press `C-u r' to search again with new search string
|   bar:TODO Bar 
:bar:
`

Then I quit the second agenda buffer (the tags query) with `q',
which reselected the first agenda buffer without refreshing it.

I then refreshed the TODO list with `g'.  It appeared like this:

,
| Global list of TODO items of type: ALL
| Available with `N r': (0)[ALL] (1)TODO (2)DONE
|   foo:TODO Foo 
:foo:
|   bar:TODO Bar 
:bar:
`

It was evidently no longer restricted to the file `foo.org'.
I expected the restriction would continue to apply.

Best,

Thomas



setup.el
Description: application/emacs-lisp
* TODO Foo  :foo:
* TODO Bar  :bar:


Re: [O] Preset filter sometimes persistent

2014-07-29 Thread Thomas Morgan
Hi, Bastien,

Bastien b...@gnu.org writes:

 Thomas Morgan t...@ziiuu.com writes:

 Here is a recipe for a bug on the maint branch that causes a preset tag
 filter to be carried over to another agenda view in some cases.

 This should now be fixed in maint.

It's fixed; thanks!

Best regards,
Thomas



Re: [O] Adding source location information when tangling

2014-06-06 Thread Thomas Morgan
Eric Schulte schulte.e...@gmail.com writes:

 Thomas Morgan t...@ziiuu.com writes:

 Hi, Rainer, 

 Rainer M Krug r.m.k...@gmail.com writes:

 Envoyé de mon iPhone

 Le 25 mai 2014 à 18:28, Thomas Morgan t...@ziiuu.com a écrit :
 
 Dear Org hackers,
 
 I have a question about tangling LilyPond code blocks.
 
 Is there a way to put the commands `\sourcefilename' and
 `\sourcefileline' in the tangled file before each block,
 perhaps in place of the comment that includes the same information?

 Yes - Check out the header option concerning tangling with comment. So
 links are inserted as comments which contain information about the
 filename And the header from which it was tangled.

 Thank you; that option is certainly useful.  What I was looking for,
 though, is a way to replace or supplement the comments with commands
 that indicate the same information directly to the compiler or
 interpreter (`\sourcefilename' and `\sourcefileline' for LilyPond,
 `#line' for C, etc.).


 Hi Thomas,

 I believe the `org-babel-tangle-comment-format-beg' and
 `org-babel-tangle-comment-format-end' variable should provide the
 functionality you desire.

Hi, Eric,

Thank you, though I'm afraid I'm still having trouble getting
the right result.  The closest I've come is with this setting:

  (setq org-babel-tangle-comment-format-beg
\\sourcefilename \%file\\n\\sourcefileline %start-line)

But this adds comment characters before the commands.

It also adds a blank line after the comment, throwing line numbers
off by one.  (Actually they are off by two; maybe LilyPond needs
\sourcefileline to be on the same line as the beginning of the code.)

By the way, I tried binding the variable this way in the Org file:

  #+BIND: org-babel-tangle-comment-format-beg \\sourcefilename 
\%file\\n\\sourcefileline %start-line

But that had no effect.

A further question: can this approach accommodate code blocks in
multiple languages in the same file?

Best,

Thomas



Re: [O] Standard skipping conditions have no effect

2014-06-02 Thread Thomas Morgan
Hi, Bastien, 

This works for me -- thanks!

Best,

Thomas



[O] Preset filter sometimes persistent

2014-06-01 Thread Thomas Morgan
Hello, Org mode hackers,

Here is a recipe for a bug on the maint branch that causes a preset tag
filter to be carried over to another agenda view in some cases.

1. Change the load path setting in `setup.el'.

2. Start Emacs with `emacs -Q -l setup.el'.

3. Open a TODO list with `M-x org-agenda t'.

4. Move point to the TODO item with `C-s elisp RET'.

5. Evaluate the Elisp code link with `C-c C-o yes RET'.  This brings up
   a custom TODO list with the `foo' tag filtered.  This is a preset tag
   filter.  The TODO list is empty, as expected.

6. Return to the first TODO list with `M-x org-agenda t'.

7. Refresh it with `r'.  Now this TODO list is empty too and `{-foo}'
   appears in the mode line, indicating that the preset tag filter was
   carried over from one agenda view to another.

Best,

Thomas

* TODO [[elisp:(org-agenda%20nil%20x)][elisp:(org-agenda nil x)]]   :foo:


setup.el
Description: application/emacs-lisp


Re: [O] Standard skipping conditions have no effect

2014-06-01 Thread Thomas Morgan
Attached are the files referred to in the bug report.

Thomas Morgan t...@ziiuu.com writes:

 Hello, Org mode hackers,

 Here is a recipe for a bug on the maint branch that causes standard
 skipping conditions to have no effect.

 1. Change the load path setting in `setup.el'.

 2. Start Emacs with `emacs -Q -l setup.el'.

 3. Customize the agenda commands with `M-x org-agenda C'.

 4. Add a new command, change the match field to tag `foo', and add a
standard skipping condition for TODO states, so that the command
looks like this in the customization buffer:

,
| INS DEL Choice: Value Menu Single command:
| Access Key(s) : x
| [X] Description: Describe command here
| Choice: Value Menu Tags/Property match (all agenda files)
| Match (only for some commands): foo
| Local settings for this command.  Remember to quote values:
| INS DEL Setting: Value Menu Standard skipping condition:
| org-agenda-skip-function
| List:
| List:
| Skipping range: Value Menu Skip entry
| Conditions for skipping:
| INS DEL Condition type: Value Menu TODO state is:
| todo
| Choice: Value Menu any not-done state
| INS
| INS
| [ ] Export:
| INS
`

 5. Type `M-x org-agenda x'.  The resulting agenda view looks like this:

,
| Headlines with TAGS match: foo
| Press `C-u r' to search again with new search string
|   test-case:  TODO Buckle my shoe
   :foo:
`

I expected the TODO item to be filtered out.

This is the value of `org-agenda-custom-commands':

,
| ((x Describe command here tags foo
|   ((org-agenda-skip-function
| '(org-agenda-skip-entry-if todo todo
|  (n Agenda and all TODO's
|   ((agenda  nil)
|(alltodo  nil))
|   nil))
`

The problem seems to be that the arguments to
`org-agenda-skip-entry-if' are unquoted.  The following steps verify
that.

 6. Change `org-agenda-custom-commands', quoting the arguments to
`org-agenda-skip-entry-if'.

,
| (setq org-agenda-custom-commands
|   '((x Describe command here tags foo
|  ((org-agenda-skip-function
|'(org-agenda-skip-entry-if 'todo 'todo
| (n Agenda and all TODO's
|  ((agenda  nil)
|   (alltodo  nil))
|  nil)))
`

 7. Remake the custom agenda view with `M-x org-agenda x'.

,
| Headlines with TAGS match: foo
| Press `C-u r' to search again with new search string
`

As expected, the TODO item is filtered.

 Best,

 Thomas



* TODO Buckle my shoe 			:foo:


setup.el
Description: application/emacs-lisp


[O] Standard skipping conditions have no effect

2014-06-01 Thread Thomas Morgan
Hello, Org mode hackers,

Here is a recipe for a bug on the maint branch that causes standard
skipping conditions to have no effect.

1. Change the load path setting in `setup.el'.

2. Start Emacs with `emacs -Q -l setup.el'.

3. Customize the agenda commands with `M-x org-agenda C'.

4. Add a new command, change the match field to tag `foo', and add a
   standard skipping condition for TODO states, so that the command
   looks like this in the customization buffer:

   ,
   | INS DEL Choice: Value Menu Single command:
   | Access Key(s) : x
   | [X] Description: Describe command here
   | Choice: Value Menu Tags/Property match (all agenda files)
   | Match (only for some commands): foo
   | Local settings for this command.  Remember to quote values:
   | INS DEL Setting: Value Menu Standard skipping condition:
   | org-agenda-skip-function
   | List:
   | List:
   | Skipping range: Value Menu Skip entry
   | Conditions for skipping:
   | INS DEL Condition type: Value Menu TODO state is:
   | todo
   | Choice: Value Menu any not-done state
   | INS
   | INS
   | [ ] Export:
   | INS
   `

5. Type `M-x org-agenda x'.  The resulting agenda view looks like this:

   ,
   | Headlines with TAGS match: foo
   | Press `C-u r' to search again with new search string
   |   test-case:  TODO Buckle my shoe  
:foo:
   `

   I expected the TODO item to be filtered out.

   This is the value of `org-agenda-custom-commands':

   ,
   | ((x Describe command here tags foo
   |   ((org-agenda-skip-function
   | '(org-agenda-skip-entry-if todo todo
   |  (n Agenda and all TODO's
   |   ((agenda  nil)
   |(alltodo  nil))
   |   nil))
   `

   The problem seems to be that the arguments to
   `org-agenda-skip-entry-if' are unquoted.  The following steps verify
   that.

6. Change `org-agenda-custom-commands', quoting the arguments to
   `org-agenda-skip-entry-if'.

   ,
   | (setq org-agenda-custom-commands
   |   '((x Describe command here tags foo
   |  ((org-agenda-skip-function
   |'(org-agenda-skip-entry-if 'todo 'todo
   | (n Agenda and all TODO's
   |  ((agenda  nil)
   |   (alltodo  nil))
   |  nil)))
   `

7. Remake the custom agenda view with `M-x org-agenda x'.

   ,
   | Headlines with TAGS match: foo
   | Press `C-u r' to search again with new search string
   `

   As expected, the TODO item is filtered.

Best,

Thomas



Re: [O] Adding source location information when tangling

2014-05-29 Thread Thomas Morgan
Hi, Rainer, 

Rainer M Krug r.m.k...@gmail.com writes:

 Envoyé de mon iPhone

 Le 25 mai 2014 à 18:28, Thomas Morgan t...@ziiuu.com a écrit :
 
 Dear Org hackers,
 
 I have a question about tangling LilyPond code blocks.
 
 Is there a way to put the commands `\sourcefilename' and
 `\sourcefileline' in the tangled file before each block,
 perhaps in place of the comment that includes the same information?

 Yes - Check out the header option concerning tangling with comment. So
 links are inserted as comments which contain information about the
 filename And the header from which it was tangled.

Thank you; that option is certainly useful.  What I was looking for,
though, is a way to replace or supplement the comments with commands
that indicate the same information directly to the compiler or
interpreter (`\sourcefilename' and `\sourcefileline' for LilyPond,
`#line' for C, etc.).

Best,

Thomas



[O] Stickiness of agenda buffers overrides persistent filters

2014-05-25 Thread Thomas Morgan
Dear Org mode hackers,

When `org-agenda-sticky' and `org-agenda-persistent-filter' are
both set, filters are not carried over to new agenda views, at least
in some cases.  I'm using the maint branch.  Here is a recipe:

1. Run Emacs with `emacs -Q -l setup.el'.

2. Open the day agenda with `M-x org-agenda RET a'.

3. Add a tag filter with `C-/ TAB foo RET'.

4. Open a TODO list with `M-x org-agenda RET t'.
   There is no filter: it is not indicated in the mode line,
   and both items appear.

Best,

Thomas



setup.el
Description: application/emacs-lisp
* TODO Buckle my shoe   :foo:
  SCHEDULED: 2014-05-23 Fri

* TODO Open the door
  SCHEDULED: 2014-05-23 Fri


Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-25 Thread Thomas Morgan
Hi, Bastien, 

I've noticed some new issues on maint.

Sometimes refreshing with `r' can empty an agenda of all its contents.
I'm using sticky agendas and the only way to recover seems to be to
kill the agenda buffer and create a new one.

Sometimes scheduling in the agenda with `C-c C-s' or `S-right' hangs.
There is a message saying the item is scheduled but the popup calendar
window remains until I type `C-g'.  I had been seeing this bug for a
while but not immediately before the change from overlays to text
properties.

Sometimes changing the tag filter puts point at the end of a line,
which is inconvenient if it happens to fall on a long line.

Adding a tag filter is sometimes slow.

I'll try to investigate and send proper reports.

Thanks,

Thomas



Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-25 Thread Thomas Morgan
Here is a small patch for this bug.  It works as far as I can tell
though it's possible that it introduces other problems or that there's
a better solution.

From 3181ee87106275bf947324b75054c6e2acb18ed1 Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Sun, 25 May 2014 13:40:35 -0400
Subject: [PATCH] Fix bug where scheduling in agenda hangs.

* lisp/org-agenda.el (org-agenda-show-new-time): Disable invisibility
  before moving to the column where the new time will be shown.
  Otherwise org-move-to-column may skip past several filtered lines,
  and though the cursor appears at the end of the current line, point
  is actually on the newline before the next visible line.

TINYFIX
---
 lisp/org-agenda.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 1be2bdb..8e2a627 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -9176,7 +9176,8 @@ Called with a universal prefix arg, show the priority instead of setting it.
   (while (not (bobp))
 	(when (equal marker (org-get-at-bol 'org-marker))
 	  (remove-text-properties (point-at-bol) (point-at-eol) '(display))
-	  (org-move-to-column (- (window-width) (length stamp)) t)
+	  (let ((buffer-invisibility-spec nil))
+	(org-move-to-column (- (window-width) (length stamp)) t))
   (if (featurep 'xemacs)
 	  ;; Use `duplicable' property to trigger undo recording
   (let ((ex (make-extent nil nil))
-- 
1.7.10.4


Thomas Morgan t...@ziiuu.com writes:

 Hi, Bastien, 

 Here is a recipe for the bug where scheduling hangs.

 1. Change the load path entry in `setup.el'.

 2. Start Emacs with `emacs -Q -l setup.el'.

 3. Open a TODO list with `M-x org-todo-list'.

 4. Filter out tag with `C-u / TAB foo RET'.

 5. Move point to first item with `C-s todo RET'.

 6. Schedule it for today with `C-c C-s RET'.

 An indication that it was scheduled appears in the echo area:

 ,
 | Scheduled to 2014-05-25 Sun
 `

 But the calendar window remains until you press `C-g'.

 Best,

 Thomas


[O] Adding source location information when tangling

2014-05-25 Thread Thomas Morgan
Dear Org hackers,

I have a question about tangling LilyPond code blocks.

Is there a way to put the commands `\sourcefilename' and
`\sourcefileline' in the tangled file before each block,
perhaps in place of the comment that includes the same information?
(These commands are equivalent to the `#line LINENUM FILE'
directive in C.)  If possible I'd like to let LilyPond know how
to give error messages that refer to the originating Org file.

Thanks,
Thomas



[O] Item scheduled in agenda based on Org player link's start time

2014-05-25 Thread Thomas Morgan
Dear Org mode hackers,

This is a recipe for a bug involving Org player, though the bug
might be in Org mode itself.

1. Start Emacs with `emacs -Q -l setup.el'.  This opens the day agenda,
   which looks like this.

,
| Day-agenda (W21):
| Friday 23 May 2014
|   test-case:   1:23.. Scheduled:  TODO Buckle my shoe
|8:00.. 
|   10:00.. 
|   12:00.. 
|   14:00.. 
|   14:12.. now - - - - - - - - - - - - - - - - - - - - - - - - 
-
|   16:00.. 
|   18:00.. 
|   20:00.. 
`

I did not expect the TODO item to be scheduled for 1:23am.
That time is part of the link and is intended for Org player's use.

The text of the TODO item is this:

,
| Buckle my [[file://shoe.ogg::1:23][shoe]]
`

This is the format Org player uses to specify where in the media file
to start playback.  From `org-player.el':

,
| ;;; Links can also specify track positions. When a link contains a track
| ;;; position, playback will start at that position in the track. For example:
| ;;;
| ;;; [[file:/path/to/song.mp3::2:43]]  Starts playback at 2 min 43 sec.
`

Best,

Thomas



setup.el
Description: application/emacs-lisp
* TODO Buckle my [[file://shoe.ogg::1:23][shoe]]
  SCHEDULED: 2014-05-23 Fri


Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-25 Thread Thomas Morgan
Hi, Bastien, 

Here is a recipe for the bug where scheduling hangs.

1. Change the load path entry in `setup.el'.

2. Start Emacs with `emacs -Q -l setup.el'.

3. Open a TODO list with `M-x org-todo-list'.

4. Filter out tag with `C-u / TAB foo RET'.

5. Move point to first item with `C-s todo RET'.

6. Schedule it for today with `C-c C-s RET'.

An indication that it was scheduled appears in the echo area:

,
| Scheduled to 2014-05-25 Sun
`

But the calendar window remains until you press `C-g'.

Best,

Thomas

* TODO Buckle my shoe

* TODO Open the door   :foo:

* TODO Pick up sticks


setup.el
Description: application/emacs-lisp


Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-18 Thread Thomas Morgan
Bisecting shows that the bug (or at least the one involving
habits, if that's distinct from the one where items with links
disappear except for the links) was introduced by this commit:

eb0f8afdf42d696c1dd53d38a10ceaec3ae4c4f3
Author: Bastien Guerry b...@altern.org
Date:   Thu Apr 17 02:31:23 2014 +0200

org-agenda.el: Fix bug when displaying the changed date

Thomas Morgan t...@ziiuu.com writes:

 Hi, Bastien, 

 Here is a recipe for what might be another manifestation
 of this bug.

 I'm using the maint branch: Org-mode version 8.2.6
 (release_8.2.6-21-g3b9419 @ /src/org-mode/lisp/).

 Files `setup.el' and `test-case.org' are attached.
 The directory added to the load path in `setup.el'
 will probably need to be customized.

 Steps:

 1. Run Emacs: `emacs -Q -l setup.el'.

 2. Open the agenda: `M-x org-agenda RET a'.

 3. Add a tag filter: `/ TAB foo RET'.

 4. Move point to the agenda line containing the TODO item:
 `C-s TODO RET'.

 5. Move point to the end of the line with `C-e'.
 It does apparently move to the end of the line.
 However, `C-x =' reports that it is in column 0.
 I expected it to be in column 108 or 109.

 6. Try to move point to the beginning of the line with `C-a'.
 It appears to move one column to the left.  I expected it
 to move to the left edge of the window.  `C-x =' says it is
 in column 108.

 7. Try again to move to the beginning of line with `C-a'.
 This works.

 8. Clock in with `I'.  Parts of the line change color
 but in column 0 `C-u C-x =' does not list any face.
 I expected the whole line to be highlighted with face
 `org-agenda-clocking'.

 9. Now try to go to the item in the source Org file: `TAB'.
 I see this error: `Command not allowed in this line'.

 Best,
 Thomas



Re: [O] Abbreviating filtered tags in mode line

2014-05-15 Thread Thomas Morgan
Hi, Bastien, 

Thanks -- I've got the assignment form and will send it in.

Best regards,
Thomas



Re: [O] Clock-in in agenda makes some headings with links disappear

2014-05-15 Thread Thomas Morgan
Hi, Bastien, 

Here is a recipe for what might be another manifestation
of this bug.

I'm using the maint branch: Org-mode version 8.2.6
(release_8.2.6-21-g3b9419 @ /src/org-mode/lisp/).

Files `setup.el' and `test-case.org' are attached.
The directory added to the load path in `setup.el'
will probably need to be customized.

Steps:

1. Run Emacs: `emacs -Q -l setup.el'.

2. Open the agenda: `M-x org-agenda RET a'.

3. Add a tag filter: `/ TAB foo RET'.

4. Move point to the agenda line containing the TODO item:
`C-s TODO RET'.

5. Move point to the end of the line with `C-e'.
It does apparently move to the end of the line.
However, `C-x =' reports that it is in column 0.
I expected it to be in column 108 or 109.

6. Try to move point to the beginning of the line with `C-a'.
It appears to move one column to the left.  I expected it
to move to the left edge of the window.  `C-x =' says it is
in column 108.

7. Try again to move to the beginning of line with `C-a'.
This works.

8. Clock in with `I'.  Parts of the line change color
but in column 0 `C-u C-x =' does not list any face.
I expected the whole line to be highlighted with face
`org-agenda-clocking'.

9. Now try to go to the item in the source Org file: `TAB'.
I see this error: `Command not allowed in this line'.

Best,
Thomas



setup.el
Description: application/emacs-lisp
* TODO Buckle my shoe 			:foo:
  SCHEDULED: 2014-05-15 Thu +1d
  :PROPERTIES:
  :STYLE:habit
  :END:

* TODO Open the door
  SCHEDULED: 2014-05-15 Thu +1d
  :PROPERTIES:
  :STYLE:habit
  :END:


[O] Abbreviating filtered tags in mode line

2014-05-14 Thread Thomas Morgan
Dear Org-mode hackers,

This patch defines a variable org-agenda-abbreviate-tag-filter;
when it is set, filtered tags indicated on the mode line are
abbreviated according to their fast selection letters.

For example, -@home+@net is abbreviated -h.+n. if the fast
selection letters of @home and @net are h and n respectively.

Best,
Thomas

From 3c12d4b5c6ad12d6f34fe34ecc94f7be54fe61b5 Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Wed, 14 May 2014 01:54:17 -0400
Subject: [PATCH] Optionally abbreviate filtered tags in mode line.

* lisp/org-agenda.el (org-agenda-abbreviate-tag-filter): New variable.
  (org-agenda-set-mode-name): Abbreviate tag filter if option is set.
---
 lisp/org-agenda.el |   25 ++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 428d31f..69c3d38 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -236,6 +236,12 @@ you can \misuse\ it to also add other text to the header.
   :group 'org-agenda
   :type 'boolean)
 
+(defcustom org-agenda-abbreviate-tag-filter nil
+  When set, abbreviate filtered tags indicated in mode line.
+Tags are abbreviated with their fast selection letters, as configured.
+  :group 'org-agenda
+  :type 'boolean)
+
 (defgroup org-agenda-custom-commands nil
   Options concerning agenda views in Org-mode.
   :tag Org Agenda Custom Commands
@@ -8227,9 +8233,22 @@ When called with a prefix argument, include all archive files as well.
 			   (concat  {
    (mapconcat
 'identity
-(append
- (get 'org-agenda-tag-filter :preset-filter)
- org-agenda-tag-filter)
+(mapcar
+ (lambda (f)
+   (if (and org-agenda-abbreviate-tag-filter
+		(string-match
+		 ^\\([+-]\\)\\(.+\\) f))
+   	   (let* ((dir (match-string 1 f))
+   		  (f0 (match-string 2 f))
+		  (alist org-tag-alist-for-agenda)
+   		  (a (assoc f0 alist)))
+   	 (if a
+		 (format %s%c. dir (cdr a))
+   	   f))
+   	 f))
+ (append
+  (get 'org-agenda-tag-filter :preset-filter)
+  org-agenda-tag-filter))
 )
    })
 			   'face 'org-agenda-filter-tags
-- 
1.7.10.4



[O] Clock-in in agenda makes some headings with links disappear

2014-05-14 Thread Thomas Morgan
Dear Org mode hackers,

I came across a bug in Org-mode 8.2.6.  I had an overdue
TODO item in the agenda with a link at the end of the heading
text.  I clocked it in with `I' and the heading text
disappeared; only the link remained visible on that line in
the agenda.

This bug was reproducible for a while and I made the attached
patch which fixed it, but I didn't succeed in making a minimal
test case, and now I'm not able to reproduce it at all.

The problem seemed to be that `(beginning-of-line 0)' was
not moving to the beginning of the line, but between closing
brackets in the link.  I thought this might be related to
`inhibit-field-text-motion', but enabling that didn't help,
nor did using `(forward-line -1)'.  What seemed to solve it
was adding `(beginning-of-line)' after `(forward-line -1)',
as in the patch.

I know this is not a very helpful bug report but thought I'd
send it anyway in case someone else has seen the same problem
and understands what's going on.

Best regards,
Thomas

From 06cde5027e8ca93d82d14c5c0b46deb3e1c80b25 Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Tue, 13 May 2014 23:52:48 -0400
Subject: [PATCH] Fix bug mading agenda line disappear on clock-in.

In some cases with a link at the end of the line,
`(beginning-of-line 0)' moves to a position within
the link (between the closing bracket of the link
description and the following closing bracket) and
not to the beginning of the line.

Then the properties at that position in the link
are made the properties of the whole line, and the
entire line disappears.

* lisp/org-agenda.el (org-agenda-change-all-lines): Move backward one
  line and to the beginning of that line as an explicit second step.

TINYCHANGE
---
 lisp/org-agenda.el |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index e2a0629..428d31f 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -8895,7 +8895,8 @@ If FORCE-TAGS is non nil, the car of it returns the new tags.
 	  (save-restriction
 	(narrow-to-region (point-at-bol) (point-at-eol))
 	(org-agenda-finalize)))
-	(beginning-of-line 0)
+	(forward-line -1)
+	(beginning-of-line)
 
 (defun org-agenda-align-tags (optional line)
   Align all tags in agenda items to `org-agenda-tags-column'.
-- 
1.7.10.4



[O] epstopdf dependency for ob-lilypond

2014-05-05 Thread Thomas Morgan
Org mode hackers,

I'd like to suggest that epstopdf (or the containing package,
which is texlive-font-utils on Debian) be listed as a dependency
for Org-Babel LilyPond.  Without epstopdf, the results of evaluating
LilyPond code blocks appear in an exported PDF as boxes containing
the text `NAME-eps-converted-to.pdf'.

Thanks,
Thomas



Re: [O] Bug: unconverted dashes in HTML export

2014-02-10 Thread Thomas Morgan
Hi, Nicolas,

 The new regexps still don't look right, as they can match an additional
 dash:

   (string-match ---\\([^-]?\\) ) = 0

 I'm not sure about the intent of this regexp, that is whether
 consecutive mdashes or ndashes are allowed or not.

 A correct version could be either:

   (--- . #x2014;)

 or

   (\\([^-]\\|^\\)---\\([^-]\\|$\\) . \\1#x2014;\\2)

 I think the former is on par with LaTeX behaviour.

Good point, and I don't see any problem with your first version,
though I don't understand the intent behind the original regexp,
either.  I had assumed the point was to avoid matching horizontal
separator lines in tables, but that doesn't seem to be an issue.

Thanks,
Thomas



[O] Bug: unconverted dashes in HTML export

2014-02-08 Thread Thomas Morgan
Dear Org mode hackers,

I started Emacs with `emacs -Q -l setup.el test-case.org', then typed
`C-c C-e h o' to export to HTML and open the result.  The setup file
(`setup.el'), test case (`test-case.org'), HTML output (`lose.html'),
and a PDF printed by the web browser (`lose.pdf'), are attached.

The test case contains a one-cell table with three hyphens (`---').
I expected this to be converted to an em-dash in the HTML output,
but it remained three hyphens.

A patch fixing the problem is attached, along with the HTML and PDF
produced after the patch was applied (`win.html', `win.pdf').

I started preparing this report last May (sorry for the delay)
but just confirmed the bug again with Org-mode version 8.2.5g
(`release_8.2.5g-663-g24a213' @ `/src/org-mode/lisp/') and GNU Emacs
24.3.1 (`x86_64-unknown-linux-gnu', X toolkit, Xaw3d scroll bars)
of 2013-09-24.

Thanks and best regards,
Thomas



setup.el
Description: application/emacs-lisp
#+TITLE: Bug with unconverted dashes in HTML export

| --- |
Title: Bug with unconverted dashes in HTML export






Bug with unconverted dashes in HTML export








---





Author: Thomas Morgan
Created: 2013-05-19 Sun 12:31
Emacs 24.2.1 (Org mode 7.9.2)
Validate XHTML 1.0





lose.pdf
Description: Adobe PDF document
From bd14cdce80a610a5eadbf563ac12472fbed542a5 Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Mon, 13 May 2013 11:06:52 +0200
Subject: [PATCH] Convert dashes in HTML export even when at end of string.

* lisp/ox-html.el (org-html-special-string-regexps): Convert dashes
  even when at end of string.
---
 lisp/ox-html.el |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 54c6a45..f47e760 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -145,8 +145,8 @@
 
 (defconst org-html-special-string-regexps
   '((- . #x00ad;)		; shy
-(---\\([^-]\\) . #x2014;\\1)	; mdash
-(--\\([^-]\\) . #x2013;\\1)	; ndash
+(---\\([^-]?\\) . #x2014;\\1)	; mdash
+(--\\([^-]?\\) . #x2013;\\1)	; ndash
 (\\.\\.\\. . #x2026;))		; hellip
   Regular expressions for special string conversion.)
 
-- 
1.7.9.5

Title: Bug with unconverted dashes in HTML export






Bug with unconverted dashes in HTML export














Author: Thomas Morgan
Created: 2013-05-19 Sun 12:32
Emacs 24.2.1 (Org mode 7.9.2)
Validate XHTML 1.0





win.pdf
Description: Adobe PDF document


Re: [O] Bug: dragging a line in agenda moves following hidden lines

2014-02-07 Thread Thomas Morgan
Hi, Bastien,

If it's difficult to keep dragging from moving hidden lines,
I agree, `/ /' removing the re-ordering would be less confusing
than seeing the hidden lines moved.

By the way, another useful feature could be dragging all lines
in the region if it's active.

Thanks,
Thomas



[O] Bug: dragging a line in agenda moves following hidden lines

2014-02-03 Thread Thomas Morgan
Hi, Org mode hackers,

There seems to be a bug whereby dragging a line pulls along adjacent
hidden lines.

I'm using Org-mode version 8.2.5g (`release_8.2.5g-663-g24a213' @
`/src/org-mode/lisp/') and GNU Emacs 24.3.1 (`x86_64-unknown-linux-gnu',
X toolkit, Xaw3d scroll bars) of 2013-09-24.

I started Emacs with `emacs -Q -l setup.el' (file attached).
This opened a day agenda view.

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Clean stovetop
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
`

I typed `/ TAB errands RET' to restrict it to items with the tag
`errands'.  The restricted view looked like this:

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
`

I moved point to the line containing Pick up package and typed
`M-down' to drag the line forward.

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
`

Then I typed `/ /' to remove the tag filter.

I expected that the hidden line, Clean stovetop, would remain
in its position above Buy water at store, like this:

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Clean stovetop
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
`

But in fact Clean stovetop had been dragged under Buy water at store
along with Pick up package.

,
| Day-agenda (W05):
| Sunday  2 February 2014
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Clean stovetop
`

I think it would be more useful and intuitive for hidden lines not to be
affected by dragging.

Thanks,
Thomas



Re: [O] Bug dragging lines in tag-restricted agenda

2014-01-29 Thread Thomas Morgan
Hi, Bastien,

This is working in 8.2.5c, thanks!

There are a few related bugs (going to a running clock associated
with a line that has been dragged in the agenda, for example) that
I'll send in reports for later.

Thanks,
Thomas

Bastien b...@gnu.org writes:

 Hi Thomas,

 Bastien b...@gnu.org writes:

 I'm afraid I'm still seeing the same behavior described
 in the bug report.

 You're right, there are still annoying bugs after filtering.
 I'll have a look when I have more time at hand.

 This should now be fixed in maint, please test heavily
 and report any issue.

 Thanks,



Re: [O] Bug dragging lines in tag-restricted agenda

2013-11-12 Thread Thomas Morgan
Hi, Bastien,

Thanks for giving this your attention.

I'm afraid I'm still seeing the same behavior described
in the bug report.

Best,
Thomas



[O] Giving priority to overdue habits that repeat more frequently

2013-10-26 Thread Thomas Morgan
Dear Org mode hackers,

Here is a patch to give priority to overdue habits that repeat more
frequently.  The number of times a habit would have been done if it
had always been on time is made a factor in its urgency score.  I'm
not sure if this is true for everyone but my more frequently repeating
habits are generally the ones I give priority to, so this behavior seems
to fit.

Thanks,
Thomas

From cc25d929f6eafeda89c75364068572d0aed3502d Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Sun, 28 Jul 2013 17:43:19 +0200
Subject: [PATCH] Give priority to overdue habits that repeat more frequently.

lisp/org-habit.el (org-habit-get-priority): Take into account the
frequency of overdue habits.  Weight those that repeat often higher
than those that repeat infrequently.
---
 lisp/org-habit.el |   18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index eba9037..23713cf 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -230,20 +230,30 @@ This must take into account not just urgency, but consistency as well.
   (let ((pri 1000)
 	(now (if moment (time-to-days moment) (org-today)))
 	(scheduled (org-habit-scheduled habit))
-	(deadline (org-habit-deadline habit)))
+	(deadline (org-habit-deadline habit))
+	(s-repeat (org-habit-scheduled-repeat habit))
+	(d-repeat (org-habit-deadline-repeat habit)))
 ;; add 10 for every day past the scheduled date, and subtract for every
 ;; day before it
 (setq pri (+ pri (* (- now scheduled) 10)))
+;; if overdue, add 20 for every time it would have been done if
+;; consistently performed on scheduled date
+(when ( scheduled now)
+  (setq pri (+ pri (* (/ (- now scheduled) s-repeat) 20
 ;; add 50 if the deadline is today
 (if (and (/= scheduled deadline)
 	 (= now deadline))
 	(setq pri (+ pri 50)))
-;; add 100 for every day beyond the deadline date, and subtract 10 for
-;; every day before it
 (let ((slip (- now (1- deadline
+  ;; add 100 for every day beyond the deadline date, and subtract 10 for
+  ;; every day before it
   (if ( slip 0)
 	  (setq pri (+ pri (* slip 100)))
-	(setq pri (+ pri (* slip 10)
+	(setq pri (+ pri (* slip 10
+  ;; if overdue, add 200 for every time it would have been done if
+  ;; consistently performed the day before deadline
+  (when ( slip 0)
+  	(setq pri (+ pri (* (/ slip d-repeat) 200)
 pri))
 
 (defun org-habit-get-faces (habit optional now-days scheduled-days donep)
-- 
1.7.10.4



[O] Bug dragging lines in tag-restricted agenda

2013-10-20 Thread Thomas Morgan
Hello, Org mode hackers.

I'm using Org-mode version 8.2 (`release_8.2-157-g1e018e' @
`/src/org-mode/lisp/') and GNU Emacs 24.3.1 (`x86_64-unknown-linux-gnu',
X toolkit, Xaw3d scroll bars) of 2013-09-21.

I started Emacs with `emacs -Q -l setup.el' (file attached).  This
opened a day agenda view.

,
| Day-agenda (W42):
| Friday 18 October 2013
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Clean stovetop
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
`

I typed `/ TAB errands RET' to restrict it to items with the tag
`errands'.  The restricted view looked like this:

,
| Day-agenda (W42):
| Friday 18 October 2013
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
`

I moved point to the line containing Pick up package and typed
`M-down' to drag the line forward.  Since there was a hidden line,
Clean stovetop, between the other two, I expected no visible change,
or even better, that Pick up package would move below Buy water,
like this:

,
| Day-agenda (W42):
| Friday 18 October 2013
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
`

Instead, Clean stovetop was made visible and Pick up package was
moved below it:

,
| Day-agenda (W42):
| Friday 18 October 2013
|   test-case:  Scheduled:  TODO Clean stovetop
|   test-case:  Scheduled:  TODO Pick up package from post office
:errands:
|   test-case:  Scheduled:  TODO Buy water at store  
:errands:
`

I believe it is a bug for `M-down' to make an item visible that
doesn't match the tag in a tag-narrowed view, and I think the most
useful thing to do is to move the line beyond the next visible item.

Thanks,
Thomas



setup.el
Description: application/emacs-lisp
#+TITLE: Bug dragging lines in tag-restricted agenda

* TODO Pick up package from post office :errands:
  SCHEDULED: 2013-10-18 Fri
* TODO Clean stovetop
  SCHEDULED: 2013-10-18 Fri
* TODO Buy water at store   :errands:
  SCHEDULED: 2013-10-18 Fri


Re: [O] Scheduling makes link disappear

2013-02-10 Thread Thomas Morgan
Hi, Bastien,

Thanks!  That fixes it and doesn't break any of the agenda views
that I use.

Best regards,
Thomas

Bastien b...@altern.org writes:

 Hi Thomas,

 Thomas Morgan t...@ziiuu.com writes:

 In an Org TODO list, scheduling an item that contains a link can cause
 the link to disappear.

 Thanks very for the report.

 Please try the attached patch and let me know if it fixes it (it
 should) but more importantly: if it breaks other agenda views.

 Best,



[O] Scheduling makes link disappear

2013-02-01 Thread Thomas Morgan
Dear Org mode hackers,

In an Org TODO list, scheduling an item that contains a link can cause
the link to disappear.

Here's how to reproduce this:

Run `emacs -Q -l setup.el'.

Type `M-x org-agenda' , then `t' to show a TODO list.
This splits the frame horizontally into two windows,
each one 84 columns wide on this computer.

Move point to the TODO item, which looks like this:

  test-case:  TODO Visit test link

Type `C-c C-s RET' to schedule the item for today.
Now the line looks like this:

  test-case:  TODO Visit 

I expected it to look something like this:

  test-case:  TODO Visit this linkS = Scheduled to 
2013-01-28 Mon

And in fact this is how it looks when the window is wider
(172 columns).

I'm ttaching `setup.el' and `test-case.org'.

Thanks,
Thomas



setup.el
Description: application/emacs-lisp
* TODO Visit [[http://www.this-is-a-long-long-long-long-long-long-long-domain-name.com/][test link]]









[O] Bug: Consistency graph redisplay with links in filtered headings [7.8.03]

2012-02-23 Thread Thomas Morgan
Habit lines containing links get mangled on redisplay when they are
filtered out of the agenda view.

Here's how to reproduce it:

1. Run `emacs -Q -l setup.el'.

2. Type `M-x org-agenda', then `a' for weekly agenda.

3. Type `C-u \ TAB random' to filter out items tagged `random'.

4. Move point to `Another item'.

5. Press `I' to clock in (which calls `org-habit-insert-consistency-graphs').

6. Type `/ /' to remove the filter.

Now there is a misaligned consistency graph on the first TODO item,
partly obscuring the link and the original consistency graph.

Here is `test-case.org':



* TODO [[file:setup.el][A link]]
  :random:
  SCHEDULED: 2012-02-16 Thu .+1d
 :PROPERTIES:
 :STYLE:
habit
 :END:
* TODO Another item
  SCHEDULED: 2012-02-16 Thu .+1d
 :PROPERTIES:
 :STYLE:
habit
 :END:



And here is `setup.el':



(add-to-list 'load-path /src/org-mode/lisp)
(require 'org)

(setq org-modules (cons 'org-habit org-modules))
(setq org-agenda-files '(./test-case.org))



I'm not sure if this is the best way to go about it but this patch
solves the problem:



From c7d5abcd886c17c25f2dab1a658e0c0accc9f211 Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Wed, 22 Feb 2012 10:12:19 +0100
Subject: [PATCH] * org-habit.el (org-habit-insert-consistency-graphs):
 Disable filters temporarily; this helps with alignment if
 there are links.

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

diff --git a/lisp/org-habit.el b/lisp/org-habit.el
index 4274aae..6b47766 100644
--- a/lisp/org-habit.el
+++ b/lisp/org-habit.el
@@ -336,7 +336,14 @@ current time.
   (let ((inhibit-read-only t) l c
(buffer-invisibility-spec '(org-link))
(moment (time-subtract (current-time)
-  (list 0 (* 3600 org-extend-today-until) 0
+  (list 0 (* 3600 org-extend-today-until) 0)))
+   disabled-overlays)
+;; Disable filters; this helps with alignment if there are links.
+(mapc (lambda (ol)
+   (when (overlay-get ol 'invisible)
+ (overlay-put ol 'invisible nil)
+ (setq disabled-overlays (cons ol disabled-overlays
+ (overlays-in (point-min) (point-max)))
 (save-excursion
   (goto-char (if line (point-at-bol) (point-min)))
   (while (not (eobp))
@@ -352,7 +359,9 @@ current time.
  (time-subtract moment (days-to-time org-habit-preceding-days))
  moment
  (time-add moment (days-to-time org-habit-following-days))
-   (forward-line)
+   (forward-line)))
+(mapc (lambda (ol) (overlay-put ol 'invisible t))
+ disabled-overlays)))
 
 (defun org-habit-toggle-habits ()
   Toggle display of habits in an agenda buffer.
-- 
1.7.5.4



Emacs  : GNU Emacs 24.0.93.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-02-09 on tyl
Package: Org-mode version 7.8.03

current state:
==
(setq
 org-export-blocks '((src org-babel-exp-src-block nil) (comment 
org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-babel-pre-tangle-hook '(save-buffer)
 org-occur-hook '(org-first-headline-recenter)
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src 
org-babel-exp-inline-src-blocks))
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-preprocess-before-normalizing-links

Re: [O] Bug: Remote state change of repeating TODO fails with calendar open [7.8.03]

2012-02-20 Thread Thomas Morgan
Hi, David,
Thanks, that fixes it for me.
Best wishes,
Thomas



Re: [Orgmode] Persistent filters in Org mode

2010-05-19 Thread Thomas Morgan
Hi, Carsten,

 I think this is good - so if you agree, I will apply your patch
 and rename the variable to ...persistent-filter

That would be great, thanks.

 The main thing I am missing now is a command to edit the filter
 in the minibuffer.  Or, if there's a separate persistent filter,
 perhaps the command could edit that if given an argument.

 It might also be useful to save filters to registers and restore
 them later.

 I guess a command to edit the filter, and a dedicated history variable
 for that command would be good enough?  Would you like to make this
 command and send me a combined patch with both changes?

Alternatively, what do you think of the idea of saving
a complete agenda view to a register (including the filter)?
The register would contain all the information necessary to
recreate the agenda view, and there would be a command to
restore it.

Thomas

___
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] Persistent filters in Org mode

2010-05-16 Thread Thomas Morgan
Hi, Carsten,

Thanks for your reply.  I've been thinking about this --
please forgive my lateness...

Do you envision a new variable for a persistent filter,
independent of `org-agenda-filter'?  As it stands, one can
only make `org-agenda-filter' persistent or transient by
toggling `org-agenda-persistent-filters'.  I've been leaving
this on all the time, because it fits my usage of tags.
Would it be useful to you and others, though, to keep
separate persistent and transient filters?

(Note on terminology: reviewing the manual just now I realized
that `org-agenda-persistent-filters' should probably be renamed
`org-agenda-persistent-filter', because adding a condition to
a filter results in a narrowed filter, not several filters.)

The main thing I am missing now is a command to edit the filter
in the minibuffer.  Or, if there's a separate persistent filter,
perhaps the command could edit that if given an argument.

It might also be useful to save filters to registers and restore
them later.

Best regards,
Thomas

___
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] Persistent filters in Org mode

2010-05-06 Thread Thomas Morgan
Hello, Org mode hackers,

This patch defines a variable `org-agenda-persistent-filters'.
When it is set, filters persist from one agenda view to the next.

I've found this convenient when using tags for contexts like @home,
@net, etc., some of which commonly remain applicable for a while.

Thanks,
Thomas

From 052ef9205845c78cb24d6fea8f89484bbe12a528 Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Fri, 23 Apr 2010 11:48:03 +0200
Subject: [PATCH] New option `org-agenda-persistent-filters'.
 When set, keep filters from one agenda view to the next.

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

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 93ef921..c8fd731 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -197,6 +197,11 @@ you can \misuse\ it to also add other text to the 
header.  However,
   :group 'org-export-html
   :type 'string)
 
+(defcustom org-agenda-persistent-filters nil
+  When set, keep filters from one agenda view to the next.
+  :group 'org-agenda
+  :type 'boolean)
+
 (defgroup org-agenda-custom-commands nil
  Options concerning agenda views in Org-mode.
  :tag Org Agenda Custom Commands
@@ -2713,7 +2718,8 @@ bind it in the options section.)
   (setq org-todo-keywords-for-agenda nil)
   (setq org-done-keywords-for-agenda nil)
   (setq org-drawers-for-agenda nil)
-  (setq org-agenda-filter nil)
+  (unless org-agenda-persistent-filters
+(setq org-agenda-filter nil))
   (put 'org-agenda-filter :preset-filter org-agenda-filter-preset)
   (if org-agenda-multi
   (progn
@@ -2788,7 +2794,7 @@ bind it in the options section.)
  (org-habit-insert-consistency-graphs))
   (run-hooks 'org-finalize-agenda-hook)
   (setq org-agenda-type (org-get-at-bol 'org-agenda-type))
-  (when (get 'org-agenda-filter :preset-filter)
+  (when (or org-agenda-filter (get 'org-agenda-filter :preset-filter))
(org-agenda-filter-apply org-agenda-filter))
   )))
 
-- 
1.6.3.3



___
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] Removing one filter of several

2010-05-01 Thread Thomas Morgan
Hello, Org mode hackers,

Having added several filters to an agenda view,
is there a way to remove just one of them?

Thanks,
Thomas



___
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: Can't follow link to old Gnus nndoc article [6.34trans]

2010-03-09 Thread Thomas Morgan
I'm using development versions of Emacs and Org mode:

  Emacs  : GNU Emacs 23.1.90.1 (i686-pc-linux-gnu, GTK+ Version 2.18.3)
   of 2010-03-03 on enif
  Package: Org-mode version 6.34trans

When I try to follow (with `C-c C-o') a link to an already
read article in a Gnus nndoc group, I get an error message
like this:

  Couldn't fetch article 01cabb88$b67f8fc0$237eaf...@email.ne.jp

Here is the link location for that message:

  
gnus:nndoc+/home/tlm/Mail/RMAIL-201003:rmail-201003#01cabb88$b67f8fc0$237eaf...@email.ne.jp

I'm able to follow the link if the group is already open
with all old articles visible.

I've attached a patch which is probably not a proper fix.
It solves the problem by making `org-gnus-follow-link'
read the entire group from the start instead of beginning
with one article and trying more if the group fails to open.

From 271f6880df3227764b090e5ad9b1c6ab16deee76 Mon Sep 17 00:00:00 2001
From: Thomas Morgan t...@ziiuu.com
Date: Sun, 7 Mar 2010 20:43:41 -0800
Subject: [PATCH] Make `org-gnus-follow-link' immediately read all articles in group
 instead of starting with 1.

---
 lisp/org-gnus.el |   17 -
 1 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index dd357b7..370e535 100644
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -169,19 +169,10 @@ If `org-store-link' was called with a prefix arg the meaning of
   (cond ((and group article)
 	 (gnus-activate-group group t)
 	 (condition-case nil
-	 (let ((articles 1)
-		   group-opened)
-	   (while (and (not group-opened)
-			   ;; stop on integer overflows
-			   ( articles 0))
-		 (setq group-opened (gnus-group-read-group articles nil group)
-		   articles (if ( articles 16)
-(1+ articles)
-  (* articles 2
-	   (if group-opened
-		   (gnus-summary-goto-article article nil t)
-		 (message Couldn't follow gnus link.  %s
-			  The summary couldn't be opened.)))
+	 (if (gnus-group-read-group t nil group)
+		 (gnus-summary-goto-article article nil t)
+	   (message Couldn't follow gnus link.  %s
+			The summary couldn't be opened.))
 	   (quit (message Couldn't follow gnus link.  %s
 			  The linked group is empty.
 	(group (gnus-group-jump-to-group group
-- 
1.6.3.3

___
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