From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings Newsgroups: gmane.emacs.devel Subject: Re: Now branch isearch-vertical Date: Sat, 10 Apr 2021 20:00:39 +0000 Message-ID: <5cf18ab57cd335cbffdc@heytings.org> References: <83wntb7eli.fsf@gnu.org> <940751cee50d69f2231d@heytings.org> <83r1jj7bhg.fsf@gnu.org> <940751cee5acf0f913df@heytings.org> <83eefj705i.fsf@gnu.org> <940751cee53181aedd72@heytings.org> <83a6q67gme.fsf@gnu.org> <5cf18ab57c8becad2999@heytings.org> <83pmz25sdr.fsf@gnu.org> <5cf18ab57ca5d2cc99ad@heytings.org> <20210410190233.acqbhi3wj3v2bzaw@Ergus> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1477"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 10 22:03:01 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 1lVJoq-0000IQ-Pi for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 22:03:00 +0200 Original-Received: from localhost ([::1]:48420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lVJop-0002vX-Q4 for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 16:02:59 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVJmg-0002F6-Rg for emacs-devel@gnu.org; Sat, 10 Apr 2021 16:00:48 -0400 Original-Received: from heytings.org ([95.142.160.155]:37166) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lVJmb-00045W-R6 for emacs-devel@gnu.org; Sat, 10 Apr 2021 16:00:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org; s=20210101; t=1618084839; bh=7LGI9fxnBjb4rtEVLgjKV52FPM3KmZF+jCxYiHUut9I=; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From; b=ukgdbz98S/+RVYMaXuHtsGVpGqNcsTFj47EGcoXSCfMv6g1k8cWuTPrYFLMe2aLsK FeGEM0YoDNpqKwAORcLYi2sLKFF7T/fFC4II9XmH6zzHvxahg60qZKuuz5g62PVVdJ uPMEXcn+JToSbfHRU9Czet8rCvii1C7NKiFdpeF7nE62yu1W9Mc24muv4L6JKUNtHu xqzCSZFOfwIut61tlFLHFFKURTFMzUsJPY45GYCf4ZyGNO80D51g61A8bN2TaJO2ln +Oio0/iPQgNaYUiKTblrbFnDnPYC4eCgyTYp5XPnzZELWaSNnThSNFIjYErEzc1UTa bHmDxPyJk1AAg== In-Reply-To: <20210410190233.acqbhi3wj3v2bzaw@Ergus> Received-SPF: pass client-ip=95.142.160.155; envelope-from=gregory@heytings.org; helo=heytings.org 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, SPF_HELO_PASS=-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:267834 Archived-At: Hi Ergus, > > 1) Could you add some customs for the separators? This may simplify the > "unless" calls you needed to add twice. But also will permit the user to > configure them. > > IMO the best alternative is a sort of format; but at least setting the > {} [] and () somehow will be very handy... maybe with a const pair. > That's not necessary to implement icomplete/fido verticality, so it should better be done with another patch I think. I'll submit a patch for that later. (There is a single "unless" AFAICS.) > > 2) I am wondering about the icomplete-code that determines the number of > candidates. IIRC the candidates are determined by the windows width... > so maybe that needs some check? Because with narrow windows or long > candidates the list may be needlessly truncated in vertical? > The trick is that there is no calculation of the number of candidates. A (long enough) list of candidates is added in an overlay, and Emacs automatically displays the first ones. With a smaller window you'll see less candidates, with a larger one you'll see more of them. > > 3) When you corrected my branch that time ago I remember that your > recommendation was to respect the user option icomplete-separator. To > detect if it had a "\n". Now that most of the display issues are solved > and the setup is simpler. Isn't it possible to do that with a simple > (if) in icomplete-minibuffer-setup instead of adding a hook?; setting > some variables and then avoid all the `unless` and `if` in the (if > prospects) part? So we don't need the extra mode and the setup for the > user will be simpler. > That would have been possible in principle, but the code would not have been much simpler, and I think changing the behavior for a specific value of a user variable isn't the best thing to do. It's clearer to have a minor mode that users can toggle, and the setup in an init file is as simple as possible: "(icomplete-vertical-mode 1)".