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: Mon, 24 May 2021 23:41:46 +0100 Message-ID: <87mtsjiwk5.fsf@gmail.com> References: <87zgwlb4xc.fsf@gmail.com> <87eedxrqz4.fsf@mail.linkov.net> <87im37ss57.fsf@mail.linkov.net> 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="21140"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Daniel Mendler , Stefan Monnier , emacs-devel@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue May 25 00:42:40 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 1llJHT-0005HD-RU for ged-emacs-devel@m.gmane-mx.org; Tue, 25 May 2021 00:42:39 +0200 Original-Received: from localhost ([::1]:54756 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llJHS-00063v-FP for ged-emacs-devel@m.gmane-mx.org; Mon, 24 May 2021 18:42:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33150) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llJGh-0005NY-Tx for emacs-devel@gnu.org; Mon, 24 May 2021 18:41:51 -0400 Original-Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:51994) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llJGg-0005vF-Bj for emacs-devel@gnu.org; Mon, 24 May 2021 18:41:51 -0400 Original-Received: by mail-wm1-x331.google.com with SMTP id u133so15642020wmg.1 for ; Mon, 24 May 2021 15:41:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=yGYM61uE6PyvKBuW017Ub8ds+mUZ7VpjQ3GnL0ty9lY=; b=GkHcll3IYpLoydc36/d8Sy5tNnEo2NhlM+nsMqXYLIYK3ECeqcVL84HSk/D5k2piaI HDXQlhi2caaL1hOriuQMBNrcPRho/Te5PKMGCidyxXoW6NCLBlvEMuydzcDlxhD3KV1N H6DslhAXYK7XTJX5fmXt/o3Si5qUY5dtKx1hqdYxN+6gI/gBiNA59S+qhcJG4FfbZVhJ GaP53Ktb2C4OzI13cCeTqs7bBZMQKzzA61HrlUR+N7hcVO051UKr+gnbq9QXIvTtyQw2 8W6tYtsslvXH3I4xNM3vAWKwTWRTzYIUfARLVA4KDzVOZT3+jdoV2P0ErPBXz9W8sz+r XMUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=yGYM61uE6PyvKBuW017Ub8ds+mUZ7VpjQ3GnL0ty9lY=; b=YlRJKFIuT2U10kdxRVmGmDRCMgTB3x3c2rJ0XIRe85JXltVFSCUBXrh/8J6hXzvMxd 3xoQ6ITBfOnplqalk5Vi4eB+5iWsl9oX5mzqrM0jen8ly2gK6IPcO/57qxTdmS6GsiII iHdh06NqfFVHnSSWCPP2IRfT//arrh7MJd5vP/kIO5yxDqJJZoukf0rm2wlo7H8GwWDP 6Q924pJmP/I2CSB8vTKedRPQdINkqoC0X0bkR3Ct5OFGzuSwTgg8y7fwYA2+PefE7T5t 48l6yFbzDJTLZkVpMJhZQHOk6VsR5mQ6jQN1VLY4zFRwiwJ8VhbDYKjqbr+OYfS33T8y cmeA== X-Gm-Message-State: AOAM530wsBbjzWBz1u2oNhXK+a3Qa7ro4flLzJ63DSVxUhwkGc/ycJvP CaOuZznZtuTxw+hcLtL2mQJnU0j1tI4= X-Google-Smtp-Source: ABdhPJxagXzNMvIAKLKstOJ8eqQ8zbwiMIZH+S0hg+IYxzlceCBDatq28a+eBXKDlhwyafDHSd/BlQ== X-Received: by 2002:a7b:c847:: with SMTP id c7mr21446918wml.168.1621896108601; Mon, 24 May 2021 15:41:48 -0700 (PDT) Original-Received: from krug (a94-133-55-152.cpe.netcabo.pt. [94.133.55.152]) by smtp.gmail.com with ESMTPSA id u126sm864142wmb.9.2021.05.24.15.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 May 2021 15:41:48 -0700 (PDT) In-Reply-To: <87im37ss57.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 25 May 2021 00:52:00 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=joaotavora@gmail.com; helo=mail-wm1-x331.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:269816 Archived-At: Juri Linkov writes: >> Why does the function use `with-selected-window`? I can't see why it >> would need to mess with windows. As for switching buffer, the only >> reason I can see to switch buffer is for `where-is-internal`, which >> could be fixed by pre-computing the set of keymaps (see patch below) >> which also makes sure we use the right buffer whereas >> `minibuffer-selected-window` could theoretically return another active >> minibuffer than "ours". >>[...] >> + (let ((keymaps (current-active-maps overriding-local-map))) >> + `(metadata >> + (affixation-function >> + . ,(lambda (arg) >> + (read-extended-command--affixation keymaps arg))) > > I tried it out, but it doesn't work, because the above code is executed > in the minibuffer instead of the original buffer. > > It doesn't need to select another window indeed, > but still needs to switch buffers, And why not do this switch in minibuffer.el, in minibuffer-completion-help? If the minibuffer to switch to is indeed the the one in the selected minibuffer window, then it makes sense to me. This would, in principle, remove the argument for having the affixation-function. Jo=C3=A3o