[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-review-schedule
From: |
Alan Schmitt |
Subject: |
Re: [O] org-review-schedule |
Date: |
Fri, 25 Apr 2014 09:43:46 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) |
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 <address@hidden> 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
suggest.
>> ;; Example use.
>> ;;
>
> Trailing whitespace.
After this many violations, I've added
#+begin_src emacs-lisp
(setq-default show-trailing-whitespace t)
#+end_src
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,
Alan
- [O] org-review-schedule, Alan Schmitt, 2014/04/18
- Re: [O] org-review-schedule, Bastien, 2014/04/19
- Re: [O] org-review-schedule, Alan Schmitt, 2014/04/19
- Re: [O] org-review-schedule, Alan Schmitt, 2014/04/25
- Re: [O] org-review-schedule, Nicolas Goaziou, 2014/04/25
- Re: [O] org-review-schedule,
Alan Schmitt <=
- Re: [O] org-review-schedule, Nicolas Goaziou, 2014/04/25
- Re: [O] org-review-schedule, Alan Schmitt, 2014/04/27
- Re: [O] org-review-schedule, AW, 2014/04/28
- Re: [O] org-review-schedule, Alan Schmitt, 2014/04/28
- Re: [O] org-review-schedule, Alan Schmitt, 2014/04/26
- Re: [O] org-review-schedule, Thorsten Jolitz, 2014/04/26
- Re: [O] org-review-schedule, Nicolas Goaziou, 2014/04/26
- Re: [O] org-review-schedule, Alan Schmitt, 2014/04/27