Re: [dev] snotes v0.9 - a simple notes system

From: v4hn <me_AT_v4hn.de>
Date: Tue, 5 Feb 2013 13:16:16 +0100

On Tue, Feb 05, 2013 at 12:10:12PM +0100, markus schnalke wrote:
> [2013-02-05 00:54] v4hn <me_AT_v4hn.de>
> > I see. Thanks for note. I've changed it to the following now,
> > which should work for all reasonable setups.
> > If this doesn't work for someone, honestly, I couldn't care less.
> > It's a default, not the final truth.
> >
> > SNOTES_EDITOR="${EDITOR:+xterm -e $EDITOR}"
> > SNOTES_EDITOR="${SNOTES_EDITOR:-xterm -e vi}"
>
> Sorry, but you've missed the point. This setup does not solve
> the issue at all.

Missing the point(VISUAL) was the idea. Quoting from Wikibooks[0]:

Generally you will want to set it [VISUAL] to the same value as the EDITOR
variable. Originally EDITOR would have be set to ed (a line-based editor)
and VISUAL would've been set to vi (a screen-based editor). These days,
you're unlikely to ever find yourself using a teletype as your terminal,
so there is no need to choose different editors for the two.

ok, so either I'll keep the above two lines or I'll move the logic
to the initialization to retain a clean config file without sequential logic:

 SNOTES_EDITOR=${VISUAL:-${EDITOR:-vi}}
 SNOTES_EDITOR="xterm -e $SNOTES_EDITOR"
 cat > $HOME/.snotes/config <<EOF
SNOTES_EDITOR="$SNOTES_EDITOR"
[...]

You may choose.


v4hn
---
[0] - http://en.wikibooks.org/wiki/Guide_to_Unix/Environment_Variables#VISUAL

Received on Tue Feb 05 2013 - 13:16:16 CET

This archive was generated by hypermail 2.3.0 : Tue Feb 05 2013 - 13:24:04 CET