mcedit is not longer the default editor

Bug #263442 reported by Markus Schulz
52
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Ubuntu Server papercuts
Fix Released
Medium
Thierry Carrez
mc (Ubuntu)
Fix Released
Wishlist
Thierry Carrez
Nominated for Karmic by Volodymyr Shcherbyna

Bug Description

Binary package hint: mc

mcedit is the best editor for mc users, so it should be default in mc... like on all the other versions of Ubuntu before and like on all the Redhat and Suse Linux I worked on... this is blasphemy ;)

Related branches

Revision history for this message
Stefan Kottwitz (stefan.k) wrote :

Go into the menu of mc: Options, Configuration and check the option "use internal edit" to make mcedit the default editor again. Perhaps activate "use internal view" too.
On my system with Ubuntu Linux 8.04 and mc 1:4.6.1-8ubuntu1 mcedit was the default editor after installation. Let us know if the problem is solved for you.

Revision history for this message
Markus Schulz (schulz-alpharesearch) wrote :

Ubuntu Linux 8.04 is is OK, but Beta 8.10 it is not. By the way, the internal view is checked by default only the internal edit is not nd it opens nano. Like I said, on all distributions I ever used mc always defaulted to it's own editor. I think this should be corrected before the final release. As a test I installed all the updates today on my 8.10 virtual machine and deleted the .mc directory. After this action I stated mc up and it was still wrong. Any suggestions?

Revision history for this message
Vojtěch Trefný (vojtech.trefny) wrote :

I can confirm this.

MC version: 2:4.6.2~git20080311-2

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu intrepid (development branch)
Release: 8.10
Codename: intrepid

$ uname -a
Linux ubuntu 2.6.27-3-generic #1 SMP Wed Sep 10 16:02:00 UTC 2008 i686 GNU/Linux

Changed in mc:
status: New → Confirmed
Revision history for this message
Adilson Oliveira (agoliveira) wrote :

I just tested this. My mc had the "use internal edit" unchecked, I checked and it's fine now but I agree that should not be the default behaviour.

Revision history for this message
Uldis Kalniņš (ulcha) wrote :

I can confirm same bug for 9.04. mc version - 4.6.2-pre1.

Revision history for this message
szczym (szczym) wrote :

its really annoying and outstanding bug, any time i edit stuff from inside mc on new box, i have to change to vi.

i hope it will not change into flame between mcedit and vim users...
any one of you know what to do to have it fixed in karmic ?

Revision history for this message
jhmos (jhmos) wrote :

The solution for using vi is to use the command: sudo update-alternatives --config editor
This will show the following (in 9.04 at least) from which you can change the default editor to vim:

There are 4 alternatives which provide `editor'.

  Selection Alternative
-----------------------------------------------
* 1 /usr/bin/vim.tiny
          2 /bin/ed
 + 3 /bin/nano
          4 /usr/bin/mcedit-debian

Press enter to keep the default[*], or type selection number:

Revision history for this message
Markus Schulz (schulz-alpharesearch) wrote :

For mc users "sudo update-alternatives --config editor" is not the final solution to the problem. The solution is to make the default mc configuration to use mcedit. This was the default for ages and this worked very well...

Revision history for this message
Marcel Schaal (marcelschaal) wrote :

it's the same for ubuntu 9.10 and a shame that it is not fixed. i think mc is an application for fast file browsing, viewing and editing. the last one is broken with the decision to use an external editor.

Revision history for this message
Markus Schulz (schulz-alpharesearch) wrote :

Looks like the PROBLEM was introduced upstream, have a look at this: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=413258 (debian bug 413258). In the case of Midnight Commander I don't agree that this should behave like any other editor and Ubuntu is not Debian. I suggest to change this back to the non debian way! This should be a easy fix, just reverse the patch from debian bug 413258

Revision history for this message
Markus Schulz (schulz-alpharesearch) wrote :

I'm just looking through some file and it looks like there is a configure option: --with-edit Enable internal editor [yes]

Revision history for this message
szczym (szczym) wrote :

i just would like to add my 5 cents: the mc bug _really_ annoys me, please fix it like it was for 4 good years with ubuntu server.

Revision history for this message
Volodymyr Shcherbyna (volodymyr) wrote :

I can confirm this problem in Ubuntu 9.10.

mc is using nano as default editor (when you press F4 on file), while using internal mc viewer (when pressing F3).

There is an option "Options-Configuration-Use internal editor" to force mc to use internal editor, BUT IT IS NOT PERSISTENT. I select that option, press "Save configuration", I see confirmation that config file is saved, but the next time I start mc it is again using nano!

How I can make sure the option is saved? Or, how can I change default editor of mc from nano to vim? Any help is appriciated ;)

Revision history for this message
Volodymyr Shcherbyna (volodymyr) wrote :

Btw, I tried to set vi as default editor/viewer in mc like described here: http://www.cyberciti.biz/tips/midnightcommander-set-vi-as-default-editor-viewer.html

After I make:

Open=%var{EDITOR:vi} %f
View=%var{EDITOR:vi} %f

mc still using nano to edit, but vi to view :)

Revision history for this message
Ugra Dániel (daniel.ugra-deactivatedaccount) wrote :

@Volodymyr M. Shcherbyna wrote: "There is an option "Options-Configuration-Use internal editor" to force mc to use internal editor, BUT IT IS NOT PERSISTENT."

It seems that there is another bug in mc: when there is no ~/.mc directory configuration isn’t saved.
If you create it manually (eg. with: mkdir ~/.mc), you will be able to save your configuration.
This way “Use internal editor” option will work as expected.

szczym (szczym)
Changed in mc (Ubuntu):
assignee: nobody → Ubuntu Server papercutters (server-papercutters)
Thierry Carrez (ttx)
Changed in mc (Ubuntu):
assignee: Ubuntu Server papercutters (server-papercutters) → nobody
Revision history for this message
Jancis (beaver-inbox) wrote :

this but really annoys me, when is it gonna be fixed? :| I have saved settings a dozen times already and every time that stupid black editor (sorry, no offence, just unexpected result) comes up.

Revision history for this message
szczym (szczym) wrote :

This bug also really bugs me, i have followed it upstream - its solution looks very complicated in debian (from social perspective).

Well i did a team in launchpad committed for fixing it. Its called <a href="https://launchpad.net/~cure-for-mc">Cure for MC</a>! Lets see what can we do together in a launchpad way. I hope it makes it easer to fix in "Ubuntu Way".

szczym (szczym)
Changed in server-papercuts:
assignee: nobody → Cure for mc (cure-for-mc)
assignee: Cure for mc (cure-for-mc) → nobody
Changed in mc (Ubuntu):
assignee: nobody → Cure for mc (cure-for-mc)
Thierry Carrez (ttx)
Changed in server-papercuts:
importance: Undecided → Medium
status: New → Confirmed
Thierry Carrez (ttx)
Changed in server-papercuts:
milestone: none → lucid-beta-1
Thierry Carrez (ttx)
Changed in server-papercuts:
assignee: nobody → Thierry Carrez (ttx)
Changed in mc (Ubuntu):
assignee: Cure for mc (cure-for-mc) → Thierry Carrez (ttx)
Thierry Carrez (ttx)
Changed in mc (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mc - 3:4.7.0-1ubuntu2

---------------
mc (3:4.7.0-1ubuntu2) lucid; urgency=low

  * Disable 05_disable_internal_editor.patch to use
    by default MC's internal editor again, by popular demand (LP: #263442)
 -- Thierry Carrez <email address hidden> Mon, 08 Mar 2010 16:40:33 +0100

Changed in mc (Ubuntu):
status: Confirmed → Fix Released
Thierry Carrez (ttx)
Changed in server-papercuts:
status: Confirmed → Fix Released
Revision history for this message
Mihai Rainer (liste-mihairainer) wrote :

Well, it seems like save is working if you manually create ~/.mc directory first. Then launch mc set internal editor and save settings. After that restart mc and voila :)

Mihai Rainer

Revision history for this message
Yury V. Zaytsev (zyv) wrote :

You can try latest Debian package which should fix the issue with mc not being able to save the configuration, but the sensible-editor patch is still in place as per Debian policy (nothing prevents you, however, from choosing mcedit in update-alternatives). Sorry.

https://launchpad.net/~zyv/+archive/ppa/+packages

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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