select-editor does not change editor from default nano to other editor

Bug #692484 reported by HugoHirsch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
sensible-utils (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: sensible-utils

I'm trying to change the default editor to vim from console, but nano is always set independently of my choice.

user@host:~$ select-editor

Select an editor. To change later, run 'select-editor'.
  1. /bin/ed
  2. /bin/nano <---- easiest
  3. /usr/bin/mcedit-debian
  4. /usr/bin/vim.basic
  5. /usr/bin/vim.tiny

Choose 1-5 [2]: 4
user@host:~$ select-editor

Select an editor. To change later, run 'select-editor'.
  1. /bin/ed
  2. /bin/nano <---- easiest
  3. /usr/bin/mcedit-debian
  4. /usr/bin/vim.basic
  5. /usr/bin/vim.tiny

Choose 1-5 [2]:

Running sensible-editor starts vim .... installed vim is:
dpkg -s vim
Package: vim
Status: install ok installed
Priority: optional
Section: editors
Installed-Size: 1884
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 2:7.2.330-1ubuntu4
Replaces: vim-common (<< 1:7.1-175+1)
Provides: editor
Depends: vim-common (= 2:7.2.330-1ubuntu4), vim-runtime (= 2:7.2.330-1ubuntu4), libacl1 (>= 2.2.11-1), libc6 (>= 2.11), libgpm2 (>= 1.20.4), libncurses5 (>= 5.7+20100313), libpython2.6 (>= 2.6), libselinux1 (>= 1.32)
Suggests: ctags, vim-doc, vim-scripts
Conflicts: vim-common (<< 1:7.1-175+1)
Description: Vi IMproved - enhanced vi editor
 Vim is an almost compatible version of the UNIX editor Vi.
 .
 Many new features have been added: multi level undo, syntax
 highlighting, command line history, on-line help, filename
 completion, block operations, folding, Unicode support, etc.
 .
 This package contains a version of vim compiled with a rather
 standard set of features. This package does not provide a GUI
 version of Vim. See the other vim-* packages if you need more
 (or less).
Homepage: http://www.vim.org/
Original-Maintainer: Debian Vim Maintainers <email address hidden>

Is select-editor the wrong way to set the editor in 10.10 / x86_64 ?

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: sensible-utils 0.0.4ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-23.41-generic 2.6.35.7
Uname: Linux 2.6.35-23-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Mon Dec 20 10:18:27 2010
Dependencies:

EcryptfsInUse: Yes
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, user)
 LANG=de_DE.utf8
 SHELL=/bin/bash
SourcePackage: sensible-utils

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

Thank you for your bug report. I'm a bit confused about the problem, though:
> I'm trying to change the default editor to vim from console, but nano is always set independently of my choice.
> [...]
> Running sensible-editor starts vim ....
So, everything works as it is supposed to be...? You run select-editor and select vim, then you run sensible-editor and it starts vim. What would you like to happen instead?

Changed in sensible-utils (Ubuntu):
status: New → Incomplete
Revision history for this message
HugoHirsch (ubuntubugs-aiki-it) wrote :

The problem is that when running svn or crontab -e I still get nano instead of the selected vim.

As is visible in the above 'screenshot' taken in the console: after I selected vim I do run select-editor again and nano is still selected although my choice for vim.

Revision history for this message
Marcel Stimberg (marcelstimberg) wrote :

Hmm, I'm still not sure I understand. If I use select-editor to change the editor to vim, sensible-editor and crontab -e change the editor to vim. In your "screenshot" I do not see that nano is still selected. It is still marked as "easiest" and still the default choice if you press enter, but it does not show the current choice at all (check the file ~/.selected_editor if you are not sure what is currently selected).
svn is a different issue, it is not using sensible-editor but the "editor" symlink (which by default links to joe). To change that link, run:
sudo update-alternatives --config editor

Revision history for this message
HugoHirsch (ubuntubugs-aiki-it) wrote :

OK - got your point.

Isn't it possible to use one tool to set the default editor - e.g. select-editor ?!
What's the sense of using different tools to set a default editor that is only partially set as an editor?

~/.selected_editor is set to vim, now I ran
sudo update-alternatives --config editor
to set the default system editor.

Actually expected select-editor to do this - what else is the sense of that tool if I have to use update-alternatives instead.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for sensible-utils (Ubuntu) because there has been no activity for 60 days.]

Changed in sensible-utils (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.