all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Gregory Heytings <ghe@sdf.org>
Cc: Oleh Krehel <ohwoeowho@gmail.com>, emacs-devel@gnu.org
Subject: Re: Feature branches review please (ivy hello)
Date: Fri, 6 Nov 2020 13:51:48 +0300	[thread overview]
Message-ID: <X6UqxMTm9YKq59Eh@protected.rcdrun.com> (raw)
In-Reply-To: <alpine.NEB.2.22.394.2011061014540453.27351@sdf.lonestar.org>

* Gregory Heytings <ghe@sdf.org> [2020-11-06 12:19]:
> > I am looking for preferrably built-in system that will have narrowing
> > vertical incremental search, like built-in ivy or helm. Something that
> > ido or icomplete could become. Until then I keep ivy as most simplest
> > solution as I prefer package from GNU ELPA.

> Again I'm not sure I understand what you want, but I think you should try
> (setq completion-styles (cons 'flex completion-styles)).  With that setting
> you can narrow the candidates list with any character, you do not need to
> type the first characters.

Sounds like you do not know ivy or helm? Try using helm functions, you
may understand what is "narrowing incremental search". I may express
myself badly so I may need help to express me very nice.

> > You may see how dmenu which is separate program works under X Window
> > system to launch files:
> > 
> > 1.8M demo of dmenu program:
> > https://gnu.support/images/2020/11/2020-11-05/2020-11-06-01:38:29.ogv

Now the first demo works, click above to see. Click here below to see
the comparison between completion frameworks, others but icomplete (as
it is not complete yet).

https://gnu.support/images/2020/11/2020-11-06/2020-11-06-13:22:39.ogv

Here is demonstration of completions with helm, ivy, ido, and dmenu
(outside command): https://tools.suckless.org/dmenu/

1. Helm mode, can move up and down freely, have actions and multi
   selection possibility with highlighting. It can select by using
   reverse words. It is outside package with many contributors now
   hard to enter main Emacs.

2. Ivy mode is good candidate to enter main Emacs as it is on GNU ELPA
   already and author is willing. IT LACKS reverse word search. It has
   multiple action capability, highlighting and looks saner than
   Helm. This is my current choice.

3. dmenu is external program with beautiful user interface. User can
   move up and down and may use reverse words to come to selection.

4. ido-mode is built-in, I do not know how to get selection by using
   reverse order of words. For now I did not find if it has multiple
   choices option.

P.S. I am including author of Ivy Oleh Krehel with hope and proposal
to improve ivy with reverse order of words selections and hopefully to
include it in GNU Emacs.

You may test features to understand it by evaluating one by one here
below.

;; This is what Emacs needs as a built-in function what I name for now
;; "dynamic narrowing incremental search"

;; It would be very useful to have built-in Ivy or Ivy-like completion:
;;
;; 0. Function (YOU-NAME-THE-MODE-completing-read PROMPT COLLECTION &OPTIONAL ...)
;;    and possibility to automatically replace the built-in function named
;;    `completing-read' when `YOU-NAME-THE-MODE-mode' is turned on
;;
;; 1. It should get selection by using words in reverse order, for
;;    example to select "AMERICAN SAMOA" when one writes "SAMOA
;;    AMERICAN"
;;
;; 2. Highlighting like in Ivy or Helm or Dmenu
;;
;; 3. Capability to choose other actions, not only the default action,
;;    like M-o in Ivy or TAB in Helm.
;;
;; 4. Capability to choose multiple items, like marking of the item
;;    with C-c SPC in Helm and conducting actions on multiple items

(setq collection '("2 ÅLAND ISLANDS" "30 BOUVET ISLAND" "41 CAYMAN ISLANDS" "46 CHRISTMAS ISLAND" "47 COCOS (KEELING) ISLANDS" "52 COOK ISLANDS" "70 FALKLAND ISLANDS (MALVINAS)" "71 FAROE ISLANDS" "94 HEARD ISLAND AND MCDONALD ISLANDS" "134 MARSHALL ISLANDS" "160 NORFOLK ISLAND" "161 NORTHERN MARIANA ISLANDS"))

;; Normal built-in Emacs completion for: ISLAND CAYMAN
(helm-mode 1)
(completing-read "Country: " collection)

;; ivy completion from GNU ELPA: for ISLAND CAYMAN
(ivy-completing-read "Country: " collection)

;; ido completion
(ido-completing-read "Country: " collection)

;; dmenu is a dynamic menu for X, originally designed for dwm. It
;; manages large numbers of user-defined menu items efficiently
;; if somebody has better function to input let me know
(defun dmenu-completing-read (prompt collection)
  ;; &optional predicate require-match initial-input history def inherit-input-method)
  "Uses external `dmenu' command for Emacs completions."
  (let* ((collection (concat (string-join collection "\n") "\n"))
	 (file (string-to-file-force collection "/dev/shm/collection"))
	 (dmenu "dmenu"))
    (with-temp-buffer
      (call-process dmenu file (current-buffer) nil "-fn" "DejaVu:pixelsize=30" "-l" "10" "-i" "-b" "-p" prompt "-nb" "dark goldenrod" "-nb" "black")
      (string-trim (buffer-string)))))

(dmenu-completing-read "Country: " collection)
(dmenu-completing-read "Recent files: " (recentf-elements 10))

;; HELM completion, good example how it should look like in Emacs with
;; built-in function. There is some bug that says `eval-last-sexp'
;; which I did not put choose.

(helm-mode 1)
(completing-read "Country: " collection)

Only Helm mode and Dmenu show that reverse order of words can be
selected. Ivy need to improve.

Jean



  reply	other threads:[~2020-11-06 10:51 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201104161200.tyeo2r5jibdahukb.ref@Ergus>
2020-11-04 16:12 ` Feature branches review please Ergus
2020-11-04 23:18   ` Basil L. Contovounesios
2020-11-05  8:30   ` Gregory Heytings via Emacs development discussions.
2020-11-05 10:05     ` Jean Louis
2020-11-05 16:10       ` Gregory Heytings via Emacs development discussions.
2020-11-05 16:27         ` Manuel Uberti
2020-11-05 17:00           ` Gregory Heytings via Emacs development discussions.
2020-11-05 17:32             ` Jean Louis
2020-11-05 18:50               ` Stefan Monnier
2020-11-05 19:30                 ` Jean Louis
2020-11-05 19:52                   ` Eli Zaretskii
2020-11-05 21:55                   ` Adam Porter
2020-11-05 22:18                     ` hyperscope Jean Louis
2020-11-06 18:18                       ` hyperscope Eduardo Ochs
2020-11-06 19:18                         ` hyperscope Jean Louis
2020-11-06  5:50                     ` Feature branches review please Jean Louis
2020-11-05 20:39               ` Gregory Heytings via Emacs development discussions.
2020-11-05 21:09                 ` Ergus
2020-11-05 21:19                   ` Gregory Heytings via Emacs development discussions.
2020-11-05 21:36                     ` Jean Louis
2020-11-05 21:44                     ` Stefan Monnier
2020-11-05 22:00                       ` Gregory Heytings via Emacs development discussions.
2020-11-05 22:36                         ` Ergus
2020-11-06  8:42                           ` Gregory Heytings via Emacs development discussions.
2020-11-05 21:33                 ` Jean Louis
2020-11-05 21:46                   ` Basil L. Contovounesios
2020-11-05 22:24                   ` Gregory Heytings via Emacs development discussions.
2020-11-05 22:48                     ` Jean Louis
2020-11-06  9:19                       ` Gregory Heytings via Emacs development discussions.
2020-11-06 10:51                         ` Jean Louis [this message]
2020-11-06 11:17                           ` Feature branches review please (ivy hello) Oleh Krehel
2020-11-06 11:42                             ` Jean Louis
2020-11-06 11:49                               ` Basil L. Contovounesios
2020-11-06 12:01                                 ` Jean Louis
2020-11-06 21:12                                   ` Basil L. Contovounesios
2020-11-06 11:57                               ` Could ivy minibuffer stay where it is? Jean Louis
2020-11-06 15:20                                 ` Basil L. Contovounesios
2020-11-06 15:36                                   ` Jean Louis
2020-11-06 21:17                                     ` Basil L. Contovounesios
2020-11-07 12:51                                       ` Oleh Krehel
2020-11-07 17:23                                         ` Jean Louis
2020-11-08 11:21                                           ` Oleh Krehel
2020-11-08 12:51                                             ` Jean Louis
2020-11-06 13:56                               ` Feature branches review please (ivy hello) Stefan Monnier
2020-11-06 14:10                                 ` Eli Zaretskii
2020-11-06 14:55                                   ` Stefan Monnier
2020-11-06 15:24                                 ` Jean Louis
2020-11-06 12:07                           ` Gregory Heytings via Emacs development discussions.
2020-11-06 14:02                             ` Stefan Monnier
2020-11-06 14:41                               ` Gregory Heytings via Emacs development discussions.
2020-11-06 19:23                             ` Jean Louis
2020-11-06 21:09                               ` Gregory Heytings via Emacs development discussions.
2020-11-15 20:12                       ` Feature branches review please Juri Linkov
2020-11-15 22:32                         ` Drew Adams
2020-11-06 10:31               ` Alan Mackenzie
2020-11-06 10:55                 ` Jean Louis
2020-11-05 17:22         ` Jean Louis
2020-11-05 13:25   ` Andrii Kolomoiets
2020-11-06 16:30 Feature branches review please (ivy hello) Drew Adams
2020-11-06 19:05 ` Jean Louis
2020-11-06 19:27   ` Drew Adams

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=X6UqxMTm9YKq59Eh@protected.rcdrun.com \
    --to=bugs@gnu.support \
    --cc=emacs-devel@gnu.org \
    --cc=ghe@sdf.org \
    --cc=ohwoeowho@gmail.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.