GNU bug report logs -
#61293
30.0.50; [FR] Add `proper-list-p' and `plistp' to 2.7 Type Predicates section of the manual
Previous Next
To reply to this bug, email your comments to 61293 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Sun, 05 Feb 2023 12:01:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ihor Radchenko <yantar92 <at> posteo.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 05 Feb 2023 12:01:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
would it make sense to mention `proper-list-p' and `plistp' in the Elisp
manual? I got to know about these function by accident and
`proper-list-p' in particular is extremely useful in some situations.
Also, what about `alistp'? Would it make sense to add such function?
In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version
1.17.6) of 2023-02-03 built on localhost
Repository revision: ac7ec87a7a0db887e4ae7fe9005aea517958b778
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101006
System Description: Gentoo Linux
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Sun, 05 Feb 2023 12:12:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 61293 <at> debbugs.gnu.org (full text, mbox):
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Date: Sun, 05 Feb 2023 12:01:17 +0000
>
> would it make sense to mention `proper-list-p' and `plistp' in the Elisp
> manual? I got to know about these function by accident and
> `proper-list-p' in particular is extremely useful in some situations.
proper-list-p was already documented. I added plistp.
> Also, what about `alistp'? Would it make sense to add such function?
I don't know. When would it be useful?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Sun, 05 Feb 2023 12:34:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 61293 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> proper-list-p was already documented. I added plistp.
Thanks! Note that `proper-list-p' is not listed in section 2.7.
>> Also, what about `alistp'? Would it make sense to add such function?
>
> I don't know. When would it be useful?
I mostly expected it is exist, but it does not.
Also, there is `nested-alist-p'. So, not having `alistp' feels awkward.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Sun, 05 Feb 2023 13:03:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 61293 <at> debbugs.gnu.org (full text, mbox):
> From: Ihor Radchenko <yantar92 <at> posteo.net>
> Cc: 61293 <at> debbugs.gnu.org
> Date: Sun, 05 Feb 2023 12:34:00 +0000
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > proper-list-p was already documented. I added plistp.
>
> Thanks! Note that `proper-list-p' is not listed in section 2.7.
I don't think this should bother us. If you type "i proper list RET",
you will land in the node which describes that term; the very next
section documents proper-list-p. So I think everything here is fine.
> >> Also, what about `alistp'? Would it make sense to add such function?
> >
> > I don't know. When would it be useful?
>
> I mostly expected it is exist, but it does not.
> Also, there is `nested-alist-p'. So, not having `alistp' feels awkward.
Most probably because no one needed it, at least not too frequently.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Mon, 06 Feb 2023 09:21:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 61293 <at> debbugs.gnu.org (full text, mbox):
>>>>> On Sun, 05 Feb 2023 15:02:05 +0200, Eli Zaretskii <eliz <at> gnu.org> said:
>> I mostly expected it is exist, but it does not.
>> Also, there is `nested-alist-p'. So, not having `alistp' feels awkward.
Eli> Most probably because no one needed it, at least not too frequently.
One point here: Emacs allows 'improper' alists without complaining:
(alist-get 1 '((2 . 4)
5
(3 . 1)
(1 . 7)))
=> 7
so weʼd have to be careful about how we defined `alistp'
Robert
--
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Mon, 06 Feb 2023 10:19:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 61293 <at> debbugs.gnu.org (full text, mbox):
Robert Pluim <rpluim <at> gmail.com> writes:
> One point here: Emacs allows 'improper' alists without complaining:
>
> (alist-get 1 '((2 . 4)
> 5
> (3 . 1)
> (1 . 7)))
>
> => 7
>
> so weʼd have to be careful about how we defined `alistp'
This is no different from plists:
(plistp '(1 2 3)) ; => nil
(plist-get '(1 2 3) 1) ; => 2
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Mon, 06 Feb 2023 10:44:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 61293 <at> debbugs.gnu.org (full text, mbox):
Ihor Radchenko [2023-02-06 10:19 +0000] wrote:
> Robert Pluim <rpluim <at> gmail.com> writes:
>
>> One point here: Emacs allows 'improper' alists without complaining:
>>
>> (alist-get 1 '((2 . 4)
>> 5
>> (3 . 1)
>> (1 . 7)))
>>
>> => 7
>>
>> so weʼd have to be careful about how we defined `alistp'
>
> This is no different from plists:
>
> (plistp '(1 2 3)) ; => nil
> (plist-get '(1 2 3) 1) ; => 2
Exactly, hence why there is no 'standard' alistp, or why there was no
plistp for a very long time: every application has a different notion of
/ heuristic for what is permissible as an alist or plist. It is
impossible to cover them all, and usually quite easy to write an
application-specific predicate (not that I object to adding alistp).
--
Basil
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#61293
; Package
emacs
.
(Mon, 06 Feb 2023 14:22:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 61293 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Thanks! Note that `proper-list-p' is not listed in section 2.7.
>
> I don't think this should bother us. If you type "i proper list RET",
> you will land in the node which describes that term; the very next
> section documents proper-list-p. So I think everything here is fine.
I actually had difficulties because I did not recall if it should be
"proper" or "true" or maybe "real". But "i list predicate" also works,
so I also do not see anything wrong.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
This bug report was last modified 2 years and 130 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.