At Thu, 07 Jan 2010 18:01:11 +0100,
David Maus wrote:
>
> [1  <text/plain; US-ASCII (7bit)>]
> At Tue, 05 Jan 2010 15:26:06 -0800,
> Markus Heller wrote:
> >
> >
> > But when I run M-x org-expiry-process-entries in the agenda or in my
> > example file (see below), I get the following message in the minibuffer:
> >
> > "The mark is not set now, so there is no region"
> >
>
> [...]
>
> No. Up to now org-expiry is constructed to work on a per file basis
> and `org-expiry-process-entries' even expects the headlines to process
> in a region. That is what the first message "The mark is not set now,
> so there is no region" complains about.

Actually I have to correct myself: That `org-expiry-process-entries'
/requires/ mark to be set seems like a bug:

,----
| (defun org-expiry-process-entries (beg end)
|   "Process all expired entries between BEG and END.
| The expiry process will run the function defined by
| `org-expiry-handler-functions'."
|   (interactive "r")
|   (save-excursion
|     (let ((beg (if (org-region-active-p)
|                  (region-beginning) (point-min)))
|         (end (if (org-region-active-p)
|                  (region-end) (point-max))))
| ...
`----

beg and end are mandatory parameters and (interactive "r") sets beg
and end to beginning and end of region respectively. But as far as I
understand the source (tm), the function parameters are not used
because the let-statement defines two local variables beg and end
depending on whether there is an active region or not.

But if there is no region active the (interactive "r") complains about
no region and terminates the function. So the else statements in the
if clauses are never used, right?

So `org-expiry-process-entries' should read:

,----
| (defun org-expiry-process-entries ()
|   "Process all expired entries between BEG and END.
| The expiry process will run the function defined by
| `org-expiry-handler-functions'."
|   (interactive)
|   (save-excursion
| ...
`----

Or am I missing something?

 -- David

--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmj...@jabber.org
Email..... maus.da...@gmail.com

Attachment: pgp3j81pCyJcN.pgp
Description: PGP signature

_______________________________________________
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

Reply via email to