unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Daniel Mendler <mail@daniel-mendler.de>
To: Juri Linkov <juri@linkov.net>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Subject: Re: [PATCH] `affixation-function`: Allow only three-element lists
Date: Sun, 25 Apr 2021 23:04:15 +0200	[thread overview]
Message-ID: <f818d1b1-bd2f-89c6-3997-d60ba7ec2b0f@daniel-mendler.de> (raw)
In-Reply-To: <87wnsqgl2o.fsf@mail.linkov.net>

On 4/25/21 10:34 PM, Juri Linkov wrote:
> I completely agree that for `affixation-function` part of
> the API is would be cleaner to document the input data as
> only candidate + prefix + suffix.
> 
> But I don't agree with `cl-assert`.  It looks too odd.
> Why to validate that the length of the first candidate is 3?
> Why not to validate than the length of every candidate
> is not more than 3?  Why not to validate that there are no nils
> in the list?  Why not to validate there are only strings?  Etc.
Okay, fair enough. I am fine if the `cl-assert` is removed from the 
patch. The other changes should be kept though, such that we do not 
violate the more restricted specification. Other completion UIs may not 
support the two-element affixations which are then still accidentally 
allowed by the default completion UI. The `cl-assert` is just a cheap 
check to ensure that no violating affixation functions are accidentally 
reintroduced. But you are right that this is not fail-safe. Do you want 
me to send an updated patch with the `cl-assert` removed?

Daniel



  reply	other threads:[~2021-04-25 21:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25  0:39 [PATCH] `affixation-function`: Allow only three-element lists Daniel Mendler
2021-04-25 17:46 ` Juri Linkov
2021-04-25 18:02   ` Daniel Mendler
2021-04-25 20:34     ` Juri Linkov
2021-04-25 21:04       ` Daniel Mendler [this message]
2021-04-27 16:45         ` Juri Linkov
2021-04-27 17:40           ` Daniel Mendler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f818d1b1-bd2f-89c6-3997-d60ba7ec2b0f@daniel-mendler.de \
    --to=mail@daniel-mendler.de \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).