emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] org-sort: Read compare-func in interactive calls


From: Nicolas Goaziou
Subject: Re: [O] [PATCH] org-sort: Read compare-func in interactive calls
Date: Thu, 11 May 2017 23:47:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hello,

Kyle Meyer <address@hidden> writes:

> * lisp/org-macs.el (org-read-function): New function.
> * lisp/org.el (org-sort-entries):
> * lisp/org-table.el (org-table-sort-lines):
> * lisp/org-list.el (org-sort-list): Read COMPARE-FUNC when called
> interactively rather than being restricted to the default behavior of
> sort-subr's PREDICATE parameter.  Guard prompts for GETKEY-FUNC and
> COMPARE-FUNCTION with called-interactively-p, like
> org-table-sort-lines already did for GETKEY-FUNC.

Thank you. I have but one comment.
> +      (sort-func
> +       (cond
> +        ((= dcst ?a) #'string<)
> +        ((= dcst ?f)
> +         (or compare-func
> +             (and (called-interactively-p 'any)

The above should be avoided. See `called-interactively-p' docstring. The
same applies in other places.

Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]