all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ergus <spacibba@aol.com>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>,
	Juri Linkov <juri@linkov.net>
Subject: Re: vertical fido-mode (new branch)
Date: Wed, 26 Aug 2020 09:30:33 -0400	[thread overview]
Message-ID: <jwvft89ilqj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20200826043419.5kl4h5qxg7idbexd@Ergus> (Ergus's message of "Wed,  26 Aug 2020 06:34:49 +0200")

> 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




  reply	other threads:[~2020-08-26 13:30 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1704199899.1577092.1591806438580.ref@mail.yahoo.com>
2020-06-10 16:27 ` vertical fido-mode Ergus
2020-06-10 16:53   ` Stefan Monnier
2020-06-10 19:01     ` Dmitry Gutov
2020-06-10 19:45       ` Basil L. Contovounesios
2020-06-10 21:54       ` Ergus
2020-06-10 22:00         ` Dmitry Gutov
2020-06-10 23:08           ` Juri Linkov
2020-06-10 23:23             ` Dmitry Gutov
2020-06-11 13:22               ` Ergus
2020-06-11 13:28                 ` Noam Postavsky
2020-06-11 13:40                   ` Ergus
2020-06-11 15:49                     ` Protesilaos Stavrou
2020-06-11 15:52                       ` Omar Antolín Camarena
2020-06-11 17:37                       ` Basil L. Contovounesios
2020-06-17 21:50                 ` Juri Linkov
2020-06-17 21:57                   ` Dmitry Gutov
2020-06-17 22:17                     ` João Távora
2020-06-17 22:31                       ` Drew Adams
2020-06-17 22:40                         ` João Távora
2020-06-17 22:56                           ` Drew Adams
2020-06-17 22:52                         ` Juri Linkov
2020-06-17 23:20                           ` Drew Adams
2020-06-17 22:22                     ` Juri Linkov
2020-06-17 22:52                       ` Dmitry Gutov
2020-06-17 22:57                         ` Dmitry Gutov
2020-06-17 22:58                           ` Drew Adams
2020-06-17 23:15                         ` Drew Adams
2020-06-18 21:54                         ` Juri Linkov
2020-06-18 22:41                           ` João Távora
2020-06-18 22:51                             ` Juri Linkov
2020-06-19  8:53                               ` João Távora
2020-06-18  8:22                     ` Kévin Le Gouguec
2020-06-18 10:19                       ` Ergus
2020-06-11 13:10             ` Ergus
2020-08-19 12:17             ` Ergus via Emacs development discussions.
2020-08-20  0:35               ` Juri Linkov
2020-08-20 10:37                 ` Ergus
2020-08-20 23:15                   ` Juri Linkov
2020-08-21  0:05                     ` Ergus
2020-08-23 18:45                       ` Juri Linkov
2020-08-24 19:06                         ` vertical fido-mode (new branch) Ergus via Emacs development discussions.
2020-08-25 18:55                           ` Juri Linkov
2020-08-25 23:11                             ` Ergus
2020-08-25 23:42                               ` Stefan Monnier
2020-08-26  4:34                                 ` Ergus
2020-08-26 13:30                                   ` Stefan Monnier [this message]
2020-08-28 10:09                             ` Ergus
2020-06-10 19:45     ` vertical fido-mode Basil L. Contovounesios

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvft89ilqj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=spacibba@aol.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.