From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] (icomplete-vertical-mode): Add support for affixations and, annotations Date: Thu, 27 May 2021 08:29:29 +0100 Message-ID: References: <87zgwlb4xc.fsf@gmail.com> <617d06ca-27bf-2ae8-26eb-1042123499d3@daniel-mendler.de> <87pmxhb1rs.fsf@gmail.com> <23510125-37b9-e87e-3590-5322f44772ce@daniel-mendler.de> <87y2c5nhsr.fsf@mail.linkov.net> <87h7irss50.fsf@mail.linkov.net> <43d1599e-2ba9-2efb-45c3-76c67d29a69d@daniel-mendler.de> <87tumrgqrb.fsf@gmail.com> <87tumq92pe.fsf@mail.linkov.net> <87lf82g10g.fsf@gmail.com> <87y2c24lww.fsf@mail.linkov.net> <871r9t2lsy.fsf@mail.linkov.net> <187a63cb-e4d2-1012-1b51-e393692de436@yandex.ru> <0452e0e9-0764-9a0e-93d7-5a7f53b8d797@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7979"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Daniel Mendler , "emacs-devel@gnu.org" , Stefan Monnier , Juri Linkov To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 27 09:33:10 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmAVy-0001tN-2K for ged-emacs-devel@m.gmane-mx.org; Thu, 27 May 2021 09:33:10 +0200 Original-Received: from localhost ([::1]:55630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lmAVx-0001af-36 for ged-emacs-devel@m.gmane-mx.org; Thu, 27 May 2021 03:33:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50402) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lmASi-00077A-O2 for emacs-devel@gnu.org; Thu, 27 May 2021 03:29:50 -0400 Original-Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:44755) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lmASe-0008OX-3F for emacs-devel@gnu.org; Thu, 27 May 2021 03:29:48 -0400 Original-Received: by mail-pg1-x529.google.com with SMTP id 29so3029352pgu.11 for ; Thu, 27 May 2021 00:29:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=13/aJj++HOdCnVBjZ8Pm0XNArGuQZ/YCfFASGxIn0VU=; b=kcqWDOCF7MNCgAefoOp8/UE15PbhrQDDTDFfjQ7a1fL7PTkwpK7ZqI7aGHGvFkKJ4p r3D2y0Zc0jw440RBRBIzJ4mKgoZwotEkW4q3O86fWyf0zNHy3J+DThMIpk7OBxYlldOm jvH9BdwaQM12182qHV9mcw55kmOjMzacNGZXKgw32M1OPayD6XHmf6nOnYLWHcKJhIqx +4yMPDgboGyhc/By6yLyhmubwefGL+6kQCAzuxY7FchFhdIXqJ5z3cvlYV5FjMcodUm5 ZsFVJSn2s5MmSc3VL8q/GU3n2CDUyMuCjqeawHE3a4qiVPo38+38yMqWwdNsq6f6iDlV kaoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=13/aJj++HOdCnVBjZ8Pm0XNArGuQZ/YCfFASGxIn0VU=; b=QGLM6zpQ7GrCsqps6fFsl52QxHoNY3Zi0Fq0kt08Y9LcL/ucoI4sSO+cey/KHRfGH5 uTzeJ8A0e2FQo0ptIVsCt1EnVS53feqqAonRV+v2tj+FwASPi3pITpwQo0Fpeaz6IEkC 582Qslw3q0XlzYlEHEJF7fuhZXs6zsqXHwuxuU/DmqQgFu20W96xbbUXOX35FYpcr9zg A77qgN7o4XoFOPMOJDjOVvwOcrGExHNpai6XDpU4HvFVutpovI5Ut57RG5ukKIfiAfr4 Og4fGLe+ZBQzQIZ9FXkid+i8jTLH9CVDs/C4xGs0mTnwMQ+HCV0NRDcSe5Hnl4VfM2cm LJlQ== X-Gm-Message-State: AOAM531BHbEwTkLGwiZzymOgk4KU7bbjsj6dgQV6NZMrokJDmcMiSwYh pKt4OjfxQckc1nSw+nUnglOCf0Jz/XzB/yEyNzE= X-Google-Smtp-Source: ABdhPJwQqBwnUGpEqC8tbTEajbUq5AUxL1ZJLpjHhV50oXWqcGGPMSAt7fyN67XwBvyrccydyLBAzG/XINWe5K8ELYs= X-Received: by 2002:a63:9c6:: with SMTP id 189mr2439896pgj.411.1622100581625; Thu, 27 May 2021 00:29:41 -0700 (PDT) In-Reply-To: <0452e0e9-0764-9a0e-93d7-5a7f53b8d797@yandex.ru> Received-SPF: pass client-ip=2607:f8b0:4864:20::529; envelope-from=joaotavora@gmail.com; helo=mail-pg1-x529.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269937 Archived-At: On Thu, May 27, 2021 at 2:06 AM Dmitry Gutov wrote: > >> The downside should be obvious: you waste extra CPU and memory when yo= u > >> only need some of these values, and not all of them. > > I don't see why, though. Isn't the `fields` arg supposed to solve just > > that problem? Or am I missing something? > OK, that was poor reading on my part (missed 'pcase'). > Also, the above piece of code looks awfully similar to a Company backend > or frontend definition, which you have disparaged on multiple occasions. [ Uncalled for, right? Let's keep cool with the animosity and the vague accusations, stick to the topic. ] Here, I was referring specifically to your "obvious" objection, which seemed nonsensical and ended up just being a reading mistake, that's fine. As to ways to improve on Juri's idea, I would maybe suggest a generic funct= ion of string and a single field. Much like in `affixation-function`, there's no need to ask the backend the `mapcar`. To know what a backend implements would mean asking that generic function for its methods. And if you want to "mix and match", a generic function with the backend as its arg and a hierarchy of backends seems the most elegant choice. So `:resolution-function` wouldn't be written like that at all, the backend would write methods for that `completion-resolution` gf. But that's redesigning way too much and has numerous other implications and experience tells me it's not going anywhere and we'd not solve the annotation problem which is the topic here. Jo=C3=A3o