Re: replace mcedit with emacsclient without chaning $EDITOR

On Tue, Feb 09, 2010 at 09:13:00AM +0300, Andrew Borodin wrote:
On Mon, 8 Feb 2010 19:38:15 -0500 Haines Brown KB1GRM ET1 wrote:

Please write exactly what you did.

/usr/share/mc/bin/ must be run directly or via some wrapper
like /etc/bashrc.d/

In, I added


line before 

/usr/bin/mc -P "$MC_PWD_FILE" "$@"

then started mc and unchecked the 'use internal edIt' option. If I
press F4 key, the selected file is opened in vim.

In MC Configuration Options, I have unchecked Use intenal edit and Use 
internal view. I assume this is why nano normally comes up as editor 
rather than mcedit.

In  /usr/share/mc/bin/ I followed your advice and moved 
the "EDITOR=/usr/bin/emacsclient" line to before the "/usr/bin/mc -P 
"$MC_PWD_FILE" "$@"" line. Nano still comes up as editor. I tried 
using "EDITOR=/usr/bin/emacs" instead, but had same result. 

This is all I did. I'm unclear how is run directly, for 
it is not an executable on my machine and belongs to root, and I'm 
assuming you are not suggesting a change in those default parameters.

My is in the same directory as, and only provides 
an alias for mc:

alias mc='. /usr/share/mc/bin/'

The space between . and / puzzles me. Also, emacsclient command, 
unlike vim, needs an argument.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]