emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: David Maus <maus.david@gmail.com>
To: David Maus <maus.david@gmail.com>
Cc: Markus Heller <hellerm2@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Re: Org-expiry: How to define keyword for	org-expiry-add-keyword
Date: Sun, 10 Jan 2010 16:30:42 +0100	[thread overview]
Message-ID: <87bph2nfj1.wl%maus.david@gmail.com> (raw)
In-Reply-To: <873a2halyg.wl%maus.david@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 2078 bytes --]

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.... dmjena@jabber.org
Email..... maus.david@gmail.com

[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
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

      parent reply	other threads:[~2010-01-10 15:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-04 19:37 Org-expiry: How to define keyword for org-expiry-add-keyword Markus Heller
2010-01-05 16:47 ` David Maus
2010-01-05 23:26   ` Markus Heller
2010-01-07 17:01     ` David Maus
2010-01-07 17:57       ` Markus Heller
2010-01-10 15:30       ` David Maus [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bph2nfj1.wl%maus.david@gmail.com \
    --to=maus.david@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=hellerm2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).