Hello, Nicolas Goaziou wrote on Wed, 17 Oct 2012 15:07:23 +0200: > Since you provide both the patch and the commit message, what about > providing it completely as an attachement (with i.e. git format-patch)? I attach a patch against the current git master. >> - d2 diff dfrac wdays pos pos1 category category-pos level >> + ds d2 diff dfrac wdays pos pos1 category category-pos level > > I wouldn't define the "ds" variable here, since it's local to > suppress-prewarning computation. It's clearer to let-bind it around the > (if (and org-agenda-skip-deadline-prewarning-if-scheduled ....)). > >> + (setq ds (save-match-data >> + (if (string-match >> + org-scheduled-time-regexp item) >> + (match-string 1 item)))))) > > Since it is setq'ed only once, it can be let-bound. I did not find a fully satisfactory way to do this. I can wrap the (if (and org-agenda-skip-deadline-prewarning-if-scheduled ...)) inside a dedicated (let ...), but I would like to evaluate ds only if org-... is non-nil, so I would have to keep the setq inside the conditional. The only gain would be the limited scope of the ds, but the price of the additional (let ...) clutter is high, I think. My current solution (see the patch) involves some minor refactoring at the price of an extra (if ds ...) that I don't see a way to get rid of, but I find the result quite readable. Also, I replaced the if-elseif chain by a cond for clarity. > Also, since your contribution is more than 20 lines long, did you sign > the FSF papers? I signed the FSF GNU EMACS copyright assignment form a few years ago. Do I need to do something else for org-mode? Justus