[2013-02-04 20:57] v4hn <m...@v4hn.de> > On Mon, Feb 04, 2013 at 11:46:51PM +0800, Chris Down wrote: >> SNOTES_EDITOR=${VISUAL:+xterm -e $VISUAL} >> : "${SNOTES_EDITOR:=${EDITOR:-vim}}" > > That would make the config do more than it is supposed to. > I agree that it makes sense to respect $VISUAL though. > I now changed the line to > > SNOTES_EDITOR=${VISUAL:-xterm -e vi} > > to meet that requirement.
On my system VISUAL is set to `vi', which is a common situation. Your code assumes that VISUAL contains a graphical editor. Thus the setup breaks for me AFAICS. I suggest you split the task: 1) evaluate the preferred editor. 2) launch it with xterm. If someone sets VISUAL to a graphical editor, the terminal window is superfluous but would do no harm. meillo