Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 911792 - app-admin/eselect-1.4.25: command 'eselect editor list' doesn't list vim
Summary: app-admin/eselect-1.4.25: command 'eselect editor list' doesn't list vim
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2023-08-05 23:32 UTC by sozuba
Modified: 2024-04-15 17:31 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
make.conf (make.conf,2.33 KB, text/plain)
2023-08-05 23:32 UTC, sozuba
Details
packages in the systemset (systemset-packages,6.70 KB, text/plain)
2023-08-05 23:33 UTC, sozuba
Details
packages in the world-set (worldset-packages,135 bytes, text/plain)
2023-08-05 23:34 UTC, sozuba
Details
Update lists in editor and visual modules (0001-Update-lists-in-editor-and-visual-modules.patch,2.07 KB, patch)
2023-08-07 08:06 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description sozuba 2023-08-05 23:32:53 UTC
Created attachment 867186 [details]
make.conf

'eselect editor list' output doesn't list vim (app-editors/vim)

Steps to reproduce:
--------------------
Environment: Fresh install, still chrooted from the livecd with USE="... vim-syntax ..." in make.conf.

Vim is installed as a dependency of 'app-vim/eselect-syntax' due to USE="... vim-syntax ..." in make.conf. But vim doesn't show up in the output of 'eselect editor list'. 

Also Verified: Vim doesn't show in 'eselect editor list' output even if installed manually.

(chroot) livecd / # eselect editor list
Available targets for the EDITOR variable:
  [1]   ex
  [2]   vi
  [ ]   (free form)
Comment 1 sozuba 2023-08-05 23:33:55 UTC
Created attachment 867187 [details]
packages in the systemset
Comment 2 sozuba 2023-08-05 23:34:21 UTC
Created attachment 867188 [details]
packages in the world-set
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-05 23:38:10 UTC
This is one of those things which feels surprising but it's so surprising that I feel like I've got to be missing something as to why it's not there.

$ grep -rsin nano .
modules/visual.eselect:8:EDITOR_LIST="nano emacs vi xemacs"
modules/editor.eselect:8:EDITOR_LIST="nano ed emacs ex vi xemacs"
Comment 4 Ionen Wolkens gentoo-dev 2023-08-05 23:43:27 UTC
(In reply to Sam James from comment #3)
> This is one of those things which feels surprising but it's so surprising
> that I feel like I've got to be missing something as to why it's not there.
At the limit could think it's because there's eselect-vi (or app-alternatives/vi if that ever got finished), and then "vi" covers about everything. Unless of course you want vi to be something else then use vim as EDITOR.

Given how widespread vim is, I do feel it should be in there though.
Comment 5 Ulrich Müller gentoo-dev 2023-08-06 08:17:23 UTC
There is eselect-vi which allows to choose between 11 vi variants, and IMHO it wouldn't make much sense to add all of them to the editor module. Similarly, the editor module lists neither single GNU Emacs slots nor any of the 14 micro-emacs variants.

Furthermore, you can select vim with the "free form" option:

   # eselect editor set vim
   Setting EDITOR to vim ...
   Run ". /etc/profile" to update the variable in your shell.
   # eselect editor list
   Available targets for the EDITOR variable:
     [1]   nano
     [2]   ed
     [3]   emacs
     [4]   ex
     [5]   vi
     [6]   xemacs
     [7]   vim *
     [ ]   (free form)
Comment 6 Paul Zander 2023-08-06 19:13:59 UTC
I think it isn't clear to most users that emacs and vi are further controlled via eselect-{emacs,vi}. So the output needs to make that clear in some way.

Maybe add the effective link for both to the output? Like: 
     [3]   emacs (/usr/bin/emacs -> emacs-29) via eselect-emacs
     [5]   vi (/usr/bin/vi -> vim) via eselect-vi

Or use:
     [3]   eselect-emacs
     [5]   eselect-vi
Comment 7 Paul Zander 2023-08-06 19:16:15 UTC
That being said, we have virtual/editor and everything that satisfies that should show up in eselect-editor.
Comment 8 Ulrich Müller gentoo-dev 2023-08-06 20:31:15 UTC
Previously I was asked to reduce the list to its bare minimum, so e.g. pico and zile were dropped from it. The preset values are only there so that "eselect editor update" will have some reasonable default choices, when the currently eselected package is removed. Any other user preference can be set via the "free form" entry (see comment #5).

That said, patches for the editor.eselect(5) manpage are welcome.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-06 20:54:08 UTC
(In reply to Ulrich Müller from comment #8)
> Previously I was asked to reduce the list to its bare minimum, so e.g. pico
> and zile were dropped from it. The preset values are only there so that
> "eselect editor update" will have some reasonable default choices, when the
> currently eselected package is removed. Any other user preference can be set
> via the "free form" entry (see comment #5).
> 

By who/why? I still don't see why not.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-07 04:01:52 UTC
I still don't see anything in bug 190216 which says 'vim', as an extremely popular choice, would be inappropriate.
Comment 11 Ulrich Müller gentoo-dev 2023-08-07 08:06:08 UTC
Created attachment 867274 [details, diff]
Update lists in editor and visual modules

Let's revert the list to what was originally suggested in bug 190216 comment #2, keeping only the most possible choices.

Few people will be using ed and ex although they're mandated by POSIX, and I guess that XEmacs is less popular in 2023 than it was in 2009.
Comment 12 Ulrich Müller gentoo-dev 2023-08-07 08:07:57 UTC
CCing maintainers of app-editors/xemacs, app-eselect/eselect-vi and sys-apps/ed.
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-07 08:08:03 UTC
wfm. anyone who cares about ex/ed will know how to set it, I hope ;)
Comment 14 Larry the Git Cow gentoo-dev 2023-08-07 16:22:41 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/eselect.git/commit/?id=e1577d699cfc3eb60b245c8488062a43e8cece22

commit e1577d699cfc3eb60b245c8488062a43e8cece22
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-08-07 16:21:04 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-08-07 16:21:04 +0000

    Update lists in editor and visual modules
    
    * modules/editor.eselect (EDITOR_LIST):
    * modules/visual.eselect (EDITOR_LIST): Add vim; drop ed, ex, vi
    and xemacs. Bug 911792.
    
    Bug: https://bugs.gentoo.org/911792
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 ChangeLog              | 6 ++++++
 modules/editor.eselect | 4 ++--
 modules/visual.eselect | 4 ++--
 3 files changed, 10 insertions(+), 4 deletions(-)
Comment 15 sozuba 2023-08-08 18:47:35 UTC
(In reply to Ulrich Müller from comment #11)
> Created attachment 867274 [details, diff] [details, diff]
> Update lists in editor and visual modules
Great work, thank you.

> Let's revert the list to what was originally suggested in bug 190216 comment
> #2, keeping only the most possible choices.

Sounds good, this works for me.
Comment 16 Larry the Git Cow gentoo-dev 2023-08-09 15:39:31 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94c143cfc308eb0f883cd7d3ee2c036db76e3f10

commit 94c143cfc308eb0f883cd7d3ee2c036db76e3f10
Author:     Ulrich Müller <ulm@gentoo.org>
AuthorDate: 2023-08-09 15:33:16 +0000
Commit:     Ulrich Müller <ulm@gentoo.org>
CommitDate: 2023-08-09 15:39:19 +0000

    app-admin/eselect: add 1.4.26
    
    Closes: https://bugs.gentoo.org/911792
    Signed-off-by: Ulrich Müller <ulm@gentoo.org>

 app-admin/eselect/Manifest              |  1 +
 app-admin/eselect/eselect-1.4.26.ebuild | 63 +++++++++++++++++++++++++++++++++
 2 files changed, 64 insertions(+)