From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: Re: Org-expiry: How to define keyword for org-expiry-add-keyword Date: Sun, 10 Jan 2010 16:30:42 +0100 Message-ID: <87bph2nfj1.wl%maus.david@gmail.com> References: <87r5q4ebwu.wl%maus.david@gmail.com> <873a2halyg.wl%maus.david@gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============1286401266==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NTzkh-0004B0-OB for emacs-orgmode@gnu.org; Sun, 10 Jan 2010 10:30:51 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NTzkd-00048q-9r for emacs-orgmode@gnu.org; Sun, 10 Jan 2010 10:30:51 -0500 Received: from [199.232.76.173] (port=60849 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NTzkd-00048k-1O for emacs-orgmode@gnu.org; Sun, 10 Jan 2010 10:30:47 -0500 Received: from mail-ew0-f214.google.com ([209.85.219.214]:59072) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NTzkc-0005oj-KS for emacs-orgmode@gnu.org; Sun, 10 Jan 2010 10:30:46 -0500 Received: by ewy6 with SMTP id 6so20253462ewy.9 for ; Sun, 10 Jan 2010 07:30:45 -0800 (PST) In-Reply-To: <873a2halyg.wl%maus.david@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David Maus Cc: Markus Heller , emacs-orgmode@gnu.org --===============1286401266== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Sun_Jan_10_16:30:38_2010-1"; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Sun_Jan_10_16:30:38_2010-1 Content-Type: text/plain; charset=US-ASCII At Thu, 07 Jan 2010 18:01:11 +0100, David Maus wrote: > > [1 ] > 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 --pgp-sign-Multipart_Sun_Jan_10_16:30:38_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAktJ8qEACgkQma24O1pEeOazVAD9HfOUd5jDLEtJYVYLZOlRschH DevlAHayMTDpwMyeBhsBAIJFRxY9Fi0TUVxfGBYSe2y29jU5U6x94topjpF47ckW =Xe+P -----END PGP SIGNATURE----- --pgp-sign-Multipart_Sun_Jan_10_16:30:38_2010-1-- --===============1286401266== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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 --===============1286401266==--