[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls
From: |
Kyle Meyer |
Subject: |
Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls |
Date: |
Sun, 14 May 2017 09:45:08 -0400 |
Nicolas Goaziou <address@hidden> writes:
> Kyle Meyer <address@hidden> writes:
>
>> I think (interactive "p"), or (interactive "P\np"), would be undesirable
>> because we'd be 1) changing the call signatures in a way that's not
>> backward compatible and 2) positioning an argument that shouldn't
>> concern most users toward the front of the argument list.
>
> I don't understand this. Why would using (interactive "p") instead of
> (interactive "P") would be incompatible?
I misunderstood, thinking you wanted to add an additional argument
rather than using (interactive "p") for WITH-CASE.
> AFAIU, the only difference is how the argument value is treated within
> the callee.
Won't using a numeric prefix argument change the behavior for both
interactive and Lisp calls?
As examples,
* M-1 M-x org-sort-list is currently interpreted as a non-nil value
for WITH-CASE. Instead, it would be indistinguishable from M-x
org-sort-list.
* A Lisp caller can currently set WITH-CASE to any non-nil value.
Using (interactive "p") for WITH-CASE, how do we distinguish a
numeric argument passed for WITH-CASE from an interactive call?
Using an additional argument whose only purpose is to serve as a
interactive flag, which is what called-interactively-p's docstring
suggests, avoids these issues.
--
Kyle
- Re: [O] About org-sort -> org-sort-list with custom sort function, (continued)
- Re: [O] About org-sort -> org-sort-list with custom sort function, Kyle Meyer, 2017/05/08
- Re: [O] About org-sort -> org-sort-list with custom sort function, Nicolas Goaziou, 2017/05/08
- Re: [O] About org-sort -> org-sort-list with custom sort function, Kyle Meyer, 2017/05/08
- Re: [O] About org-sort -> org-sort-list with custom sort function, Nicolas Goaziou, 2017/05/08
- [O] [PATCH] org-sort: Read compare-func in interactive calls, Kyle Meyer, 2017/05/09
- Re: [O] [PATCH] org-sort: Read compare-func in interactive calls, Nicolas Goaziou, 2017/05/11
- Re: [O] [PATCH] org-sort: Read compare-func in interactive calls, Kyle Meyer, 2017/05/11
- Re: [O] [PATCH] org-sort: Read compare-func in interactive calls, Nicolas Goaziou, 2017/05/12
- Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls, Kyle Meyer, 2017/05/13
- Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls, Nicolas Goaziou, 2017/05/14
- Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls,
Kyle Meyer <=
- Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls, Nicolas Goaziou, 2017/05/14
- Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls, Kyle Meyer, 2017/05/14
- Re: [O] [PATCH v2] org-sort: Read compare-func in interactive calls, Nicolas Goaziou, 2017/05/17
- Re: [O] About org-sort -> org-sort-list with custom sort function, Kyle Meyer, 2017/05/09