From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: vertical fido-mode (new branch) Date: Wed, 26 Aug 2020 09:30:33 -0400 Message-ID: References: <20200819121755.24hgq4gyba2wkt76@Ergus> <87pn7mdqbe.fsf@mail.linkov.net> <20200820103746.6n5op7dtz563k7qm@Ergus> <87pn7llbnb.fsf@mail.linkov.net> <20200821000513.xqdhsdwxm7ov7fkw@Ergus> <87y2m5jlh6.fsf@mail.linkov.net> <20200824190654.d5obxfwyehdgpr4u@Ergus> <87lfi2sg36.fsf@mail.linkov.net> <20200825231159.spqjswxnrwn36omr@Ergus> <20200826043419.5kl4h5qxg7idbexd@Ergus> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39415"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: "emacs-devel@gnu.org" , Juri Linkov To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Aug 26 15:31:20 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 1kAvWJ-000AAz-Kt for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Aug 2020 15:31:19 +0200 Original-Received: from localhost ([::1]:59962 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kAvWI-0004VO-Mx for ged-emacs-devel@m.gmane-mx.org; Wed, 26 Aug 2020 09:31:18 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56244) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAvVg-0003lv-44 for emacs-devel@gnu.org; Wed, 26 Aug 2020 09:30:40 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25201) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kAvVd-0005s1-3l for emacs-devel@gnu.org; Wed, 26 Aug 2020 09:30:39 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BA92044075E; Wed, 26 Aug 2020 09:30:35 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 40FD244074A; Wed, 26 Aug 2020 09:30:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1598448634; bh=OFaBV0eXOvFcqx9GSfBC9sEk910XKWvoDEs1EYx12/E=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=o7RHkDm1zpqHhSDW43TYNoyk+gyej383dsGupHi5DoAPZt5l+W2YoUwqOo9426lGl zEwofI1r/xvW2QUEOyCyOOYwtJFqNfYc84RX3ePz9OUWDuQqSw76w1jz3amSdvorvi P61xRPZUPq7b6cavPr2GT9kOd+P+ThHViMO/ZffjQAWorGaaJ/8eHea9a9BhQHX+Wk IrMQFR1G5NBptCa3gCZT5Vdo0iP0pzbptQVKTBTUU9r/WnEUPhs+xSlADTPNhUWn9X sCCHPtqfIRJ+iuL/oPtaq6UIzv2CAXsSSyWhK2W4VDnKgVbB4ELV9jd7Q94qA2PWa3 obUvn8ipGJuzw== Original-Received: from alfajor (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E97C312081F; Wed, 26 Aug 2020 09:30:33 -0400 (EDT) In-Reply-To: <20200826043419.5kl4h5qxg7idbexd@Ergus> (Ergus's message of "Wed, 26 Aug 2020 06:34:49 +0200") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/26 09:30:35 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, 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:254246 Archived-At: > This is exactly what I did ;p thanks for the name cause mine was worst. Great minds think alike. > I have 2 questions: > > 1) Why the function needs to return nil if the return value of > completion--in-region-1 is not used anywhere so far? IIRC the value can be used to decide whether completion took place or not. It's mostly a left over from older completion code where this convention was used to try various completions in turn. > 2) What's the "canonical method" to add a keymap to the minibuffer > (and *Completions*) when enabling the mode but restoring it cleanly at > the end? A minor mode? > Is it possible to do something like push/pop a keymap to another? You can do that too, e.g. use `current-local-map` to get the current keymap, then `make-composed-map` to combine it with your new keymap, then `use-local-map` to make that new composed keymap be the keymap to use. For pop, it can be a bit trickier if you want to be careful and handle interaction with other packages doing similar things, but it's not too bad. You can look at `internal-push-keymap` and `internal-pop-keymap` for inspiration. Maybe we could clean those up and promote them out of the "internal-" namespace. > How can I restrict the mode-keymap to the minibuffer for example? Not sure what you mean by that. Stefan