all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Juri Linkov <juri@linkov.net>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: vertical fido-mode (new branch)
Date: Wed, 26 Aug 2020 01:11:59 +0200	[thread overview]
Message-ID: <20200825231159.spqjswxnrwn36omr@Ergus> (raw)
In-Reply-To: <87lfi2sg36.fsf@mail.linkov.net>

On Tue, Aug 25, 2020 at 09:55:41PM +0300, Juri Linkov wrote:
>
>> If this patch is too much code for adding in simple and minibuffer, I
>> would try to make a separate file with a mode. WDYT?
>
>Maybe initially this could be a separate package to allow easier
>experimentation with it.  Later when it works well, this could be added
>to core commands.
>

To do so I need two changes in the emacs core that can't be implemented
from outside.

1) The hook

-    (if win (with-selected-window win (bury-buffer)))))
+    (when win
+      (with-selected-window win (bury-buffer))
+      (run-hooks 'minibuffer-hide-completions-hook))))

Maybe there is a hook like bury-buffer-hook or something similar; but I
am not aware of it.  If so, then I could add my function in that local
hook in *Completions*. It is tricky, but it could work if we don't want
to add another hook. (But I would prefer having the hook)

2) The extra condition in completion--in-region-1

-            ;; If end is in view, scroll up to the beginning.
-            (set-window-start window (point-min) nil)
+            (if (and minibuffer-tab-go-completion
+                     (pos-visible-in-window-p (point-min) window))
+                (minibuffer-next-completion 1)
+                ;; If all completions are visible use tab completion
+              ;; If end is in view, scroll up to the beginning.
+              (set-window-start window (point-min) nil))

I think that we can modify this one to be more general using a funcall
or so and make my function to return t on success or nil if we should go
for the `else` part.

I can add these two small changes if you think they are fine.  If so,
then the package can be added as an extra file and I could avoid messing
up even more the simple.el and minibuffer.el. Even enabling the mode by
default (if we decide so) it could be in a different file for simplicity.

BTW I am implementing also a vertical icomplete.  I will upload a
feature branch in a while. Could you try that?

Best,
Ergus



  reply	other threads:[~2020-08-25 23:11 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 [this message]
2020-08-25 23:42                               ` Stefan Monnier
2020-08-26  4:34                                 ` Ergus
2020-08-26 13:30                                   ` Stefan Monnier
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=20200825231159.spqjswxnrwn36omr@Ergus \
    --to=spacibba@aol.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    /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.