emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alan Schmitt <alan.schmitt@polytechnique.org>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Bastien <bzg@gnu.org>, emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-review-schedule
Date: Fri, 25 Apr 2014 09:43:46 +0200	[thread overview]
Message-ID: <m2sip1am6l.fsf@polytechnique.org> (raw)
In-Reply-To: <87fvl1lx50.fsf@gmail.com> (Nicolas Goaziou's message of "Fri, 25 Apr 2014 08:51:39 +0200")

Hi Nicolas,

Thanks a lot for these very helpful comments. I'll take them into
account. I have a couple questions of my own now.

On 2014-04-25 08:51, Nicolas Goaziou <n.goaziou@gmail.com> writes:

>> I would like to propose to add this to the contrib directory, but
>> I don't know the procedure to submit this code.
> You simply copy the file in the contrib/lisp/ directory, edit
> contrib/README and edit `org-modules' defcustom in "org.el".

I guess I should have asked: who decides what goes in contrib? Is this
mature/useful enough to be included? If so, I'll edit these as you

>> ;; Example use.
>> ;; 
> Trailing whitespace.

After this many violations, I've added

#+begin_src emacs-lisp
  (setq-default show-trailing-whitespace t)

to my configuration ;-)

>> (defun org-review-insert-last-review (&optional prompt)
>>   "Insert the current date as last review. If prefix argument:
>> prompt the user for the date."
>>   (interactive "P")
>>   (let* ((ts (if prompt
>>                 (concat "<" (org-read-date) ">")
>>               (format-time-string (car org-time-stamp-formats)))))
>>     (save-excursion
> I don't think this `save-excursion' is needed.

Indeed. I copied this from org-expiry. Looking at the code for
`org-entry-put', I see that it uses `org-with-point' that also uses
save-excursion inside.

>> (defun org-review-skip ()
>>   "Skip entries that are not scheduled to be reviewed."
>>   (save-restriction
>>     (widen)
>>     (let ((next-headline (save-excursion (or (outline-next-heading)
>>                                              (point-max)))))
>>       (cond
>>        ((org-review-toreview-p) nil)
>>        (t next-headline)))))
> This function doesn't move point (so it skips nothing), is it
> expected?

It works, so I guess it's not supposed to move the point. It's to be
used with `org-agenda-skip-function', which says:

| Function to be called at each match during agenda construction.       
| If this function returns nil, the current match should not be skipped.
| Otherwise, the function must return a position from where the search  
| should be continued.                                                  

Thanks again,


  reply	other threads:[~2014-04-25  7:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-18 20:27 org-review-schedule Alan Schmitt
2014-04-19  8:14 ` org-review-schedule Bastien
2014-04-19 11:16   ` org-review-schedule Alan Schmitt
2014-04-19 11:51     ` org-review-schedule Bastien
2014-04-24 11:51   ` org-review-schedule Alan Schmitt
2014-04-25  6:51     ` org-review-schedule Nicolas Goaziou
2014-04-25  7:43       ` Alan Schmitt [this message]
2014-04-25  8:02         ` org-review-schedule Nicolas Goaziou
2014-04-27  8:09           ` org-review-schedule Alan Schmitt
2014-04-28  7:20             ` org-review-schedule AW
2014-04-28 11:29               ` org-review-schedule Alan Schmitt
2014-05-06  9:27             ` org-review-schedule Bastien
2014-05-15 10:07             ` org-review-schedule Bastien
2014-05-20 12:48               ` org-review-schedule Alan Schmitt
2014-05-21 12:08                 ` org-review-schedule Bastien
2014-05-21 12:58                   ` org-review-schedule Alan Schmitt
2014-04-26  8:57       ` org-review-schedule Alan Schmitt
2014-04-26 10:38         ` org-review-schedule Thorsten Jolitz
2014-04-26 12:25           ` org-review-schedule Nicolas Goaziou
2014-04-27  8:08             ` org-review-schedule Alan Schmitt

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:

  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=m2sip1am6l.fsf@polytechnique.org \
    --to=alan.schmitt@polytechnique.org \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=n.goaziou@gmail.com \


* 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


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).