From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: on helm substantial differences Date: Thu, 26 Nov 2020 15:45:27 +0200 Message-ID: <83r1ogqljc.fsf@gnu.org> References: <87mtzfzt9a.fsf@mail.linkov.net> <87lfezd8r0.fsf@mail.linkov.net> <87k0uj58ub.fsf@mail.linkov.net> <87lfey28us.fsf@tcd.ie> <87ft56h6sr.fsf@mail.linkov.net> <87y2iybe27.fsf@mail.linkov.net> <873614ido7.fsf@mail.linkov.net> <83tutkz1ea.fsf@gnu.org> <83sg94z0ku.fsf@gnu.org> <87zh3aqxa7.fsf@mail.linkov.net> <83sg92xdz6.fsf@gnu.org> <87sg914wlp.fsf@mail.linkov.net> <83lfetxvuv.fsf@gnu.org> <87blfp2luy.fsf@mail.linkov.net> <83im9wwyae.fsf@gnu.org> <87r1ohepvu.fsf@mail.linkov.net> <83im9tsad9.fsf@gnu.org> <87360x8cxx.fsf@mail.linkov.net> <831rghrywi.fsf@gnu.org> <87r1oh41jv.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34934"; mail-complaints-to="usenet@ciao.gmane.io" Cc: spacibba@aol.com, bugs@gnu.support, andreyk.mad@gmail.com, emacs-devel@gnu.org, contovob@tcd.ie, rudalics@gmx.at, monnier@iro.umontreal.ca, ghe@sdf.org, drew.adams@oracle.com To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Nov 26 14:46:48 2020 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 1kiHbj-0008z8-SW for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Nov 2020 14:46:47 +0100 Original-Received: from localhost ([::1]:43412 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiHbi-0003gV-VH for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Nov 2020 08:46:46 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kiHap-0002c1-DU for emacs-devel@gnu.org; Thu, 26 Nov 2020 08:45:51 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42091) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kiHam-000198-Ln; Thu, 26 Nov 2020 08:45:48 -0500 Original-Received: from [176.228.60.248] (port=1446 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kiHam-0001AI-28; Thu, 26 Nov 2020 08:45:48 -0500 In-Reply-To: <87r1oh41jv.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 25 Nov 2020 22:35:48 +0200) 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:259834 Archived-At: > From: Juri Linkov > Cc: spacibba@aol.com, bugs@gnu.support, andreyk.mad@gmail.com, > emacs-devel@gnu.org, contovob@tcd.ie, rudalics@gmx.at, > monnier@iro.umontreal.ca, ghe@sdf.org, drew.adams@oracle.com > Date: Wed, 25 Nov 2020 22:35:48 +0200 > > > Why doesn't name2 get aligned? I still don't think I understand that. > > The caller is 'read-char-by-name', and it creates two completion strings > "character1 (\t with :align-to) name1" and "character2 (\t with :align-to) name2", > and sends them to 'completion--insert-strings' that adds "\t with :align-to" > as a separator between two columns. > > How "character2 (\t with :align-to) name2" could predict the right value > of this 'align-to' if it doesn't know what value of 'align-to' will use > 'completion--insert-strings' in its separator? Ah, okay. Would it work to change read-char-by-name to generate strings "character1 TAB name1" and "character2 TAB name2", and then make completion--insert-strings to produce a suitably calculated (SPC with :align-to) separator between them? Then all you'd need to do is set tab-width in the completions buffer.