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

2013-02-04 Thread Chris Down
I also believe these were the original semantics, but they are difficult to get around in a modern environment. Also of course this assumes that the user is even using xterm. Perhaps there should be something like SNOTES_TERMINAL="xterm -e" And, if SNOTES_TERMINAL is defined, it is put under word

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

2013-02-04 Thread Charlie Kester
On 02/04/2013 13:09, markus schnalke wrote: On my system VISUAL is set to `vi', which is a common situation. Your code assumes that VISUAL contains a graphical editor. I'm not sure, but I think the semantics when this variable first began to be used was to distinguish a full-screen editor like

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

2013-02-04 Thread v4hn
On Mon, Feb 04, 2013 at 10:09:25PM +0100, markus schnalke wrote: > [2013-02-04 20:57] v4hn > > 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

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

2013-02-04 Thread markus schnalke
[2013-02-04 20:57] v4hn > 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

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

2013-02-04 Thread v4hn
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

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

2013-02-04 Thread Chris Down
SNOTES_EDITOR=${VISUAL:+xterm -e $VISUAL} : "${SNOTES_EDITOR:=${EDITOR:-vim}}" On 4 February 2013 23:40, Petr Šabata wrote: > On Mon, Feb 04, 2013 at 10:54:17PM +0800, Chris Down wrote: > > Something like this should work: > > > > SNOTES_EDITOR=${VISUAL:-$EDITOR} > > Only if you run snotes from

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

2013-02-04 Thread Petr Šabata
On Mon, Feb 04, 2013 at 10:54:17PM +0800, Chris Down wrote: > Something like this should work: > > SNOTES_EDITOR=${VISUAL:-$EDITOR} Only if you run snotes from a terminal. P pgpvujpAFyEo7.pgp Description: PGP signature

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

2013-02-04 Thread Chris Down
Disappointing, I was waiting for SNOTES_EDITOR=${VISUAL:-${EDITOR:-acme}} ;-) On 4 February 2013 23:09, markus schnalke wrote: > [2013-02-04 22:54] Chris Down > > > > Something like this should work: > > > > SNOTES_EDITOR=${VISUAL:-$EDITOR} > > Better: > > SNOTES_EDITOR=${VISUAL:-${EDI

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

2013-02-04 Thread markus schnalke
[2013-02-04 22:54] Chris Down > > Something like this should work: > > SNOTES_EDITOR=${VISUAL:-$EDITOR} Better: SNOTES_EDITOR=${VISUAL:-${EDITOR:-vi}} meillo

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

2013-02-04 Thread Chris Down
Something like this should work: SNOTES_EDITOR=${VISUAL:-$EDITOR} On 4 February 2013 22:49, Stephen Paul Weber wrote: > Somebody claiming to be Daniel Bryan wrote: > >> On Mon, Feb 04, 2013 at 10:47:34AM +0100, Petr Šabata wrote: >> +1, though in case you hadn't noticed, you can set SNOTES_EDITO

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

2013-02-04 Thread Stephen Paul Weber
Somebody claiming to be Daniel Bryan wrote: On Mon, Feb 04, 2013 at 10:47:34AM +0100, Petr Šabata wrote: +1, though in case you hadn't noticed, you can set SNOTES_EDITOR in ~/.snotes/config. Why not just use $VISUAL or $EDITOR ? Why would someone want to use a different editor than their defa

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

2013-02-04 Thread v4hn
On Mon, Feb 04, 2013 at 10:47:34AM +0100, Petr Šabata wrote: > That looks quite usable. I can assure you, it is. I've been using it for years, literally. Sorry for not publishing it earlier. > I'm not sure how many people have graphical vim installed, > though. Perhaps you could switch to 'xterm

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

2013-02-04 Thread v4hn
Hey everyone, thanks for the suggestions, I've just included all of them. On Mon, Feb 04, 2013 at 05:09:48PM +0800, Chris Down wrote: > Since this issue cropped up I figured I might as well take a quick look at > the script. There are two other things that might be worth changing after a > quick

Re: [dev] Suckless graphs

2013-02-04 Thread markus schnalke
btw: [2013-02-04 12:22] Kai Hendry > > That "graphing script" could be as simple as calling GNUplot, ``Despite gnuplot's name, it is not part of or related to the GNU Project, nor does it use the GNU General Public License, [...]'' http://en.wikipedia.org/wiki/Gnuplot meillo

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

2013-02-04 Thread Petr Šabata
On Mon, Feb 04, 2013 at 09:41:03PM +1100, Daniel Bryan wrote: > On Mon, Feb 04, 2013 at 10:47:34AM +0100, Petr Šabata wrote: > > I'm not sure how many people have graphical vim installed, > > though. Perhaps you could switch to 'xterm -e vi' or something > > like that. Of course, no default will

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

2013-02-04 Thread Chris Down
You almost definitely want "$@", not $*. On 4 February 2013 18:45, Raphael Proust wrote: > On Mon, Feb 4, 2013 at 9:47 AM, Petr Šabata wrote: > > On Mon, Feb 04, 2013 at 04:22:51AM +0100, v4hn wrote: > > […] > > I'm not sure how many people have graphical vim installed, > > though. Perhaps you

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

2013-02-04 Thread Raphael Proust
On Mon, Feb 4, 2013 at 9:47 AM, Petr Šabata wrote: > On Mon, Feb 04, 2013 at 04:22:51AM +0100, v4hn wrote: > […] > I'm not sure how many people have graphical vim installed, > though. Perhaps you could switch to 'xterm -e vi' or something > like that. Of course, no default will work for everybod

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

2013-02-04 Thread Daniel Bryan
On Mon, Feb 04, 2013 at 10:47:34AM +0100, Petr Šabata wrote: > I'm not sure how many people have graphical vim installed, > though. Perhaps you could switch to 'xterm -e vi' or something > like that. Of course, no default will work for everybody but > this one might cover somewhat more users. +1

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

2013-02-04 Thread Petr Šabata
On Mon, Feb 04, 2013 at 04:22:51AM +0100, v4hn wrote: > Hey everyone, > > I mentioned some days ago in a private conversation > that I've written a small notes organizer using dmenu > and git. People got curious and so I cleaned it up > a bit and hereby publish > > snotes version 0.9 > > If you

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

2013-02-04 Thread Chris Down
Since this issue cropped up I figured I might as well take a quick look at the script. There are two other things that might be worth changing after a quick skim: - Not sure what's up with all the ''[ -n "`which foo`" ]'' idioms. Use ''type'' and just check the exit code. - Instead of escaping in

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

2013-02-04 Thread Chris Down
Use ''.'' instead of ''source'', it's POSIX. Chris On 4 February 2013 16:56, Thomas Dean <78...@web.de> wrote: > Great tool, thank you! > > One thing to mention: sh links to dash in my case, which has no built-in > "source" command. Is there a standalone substitute? > > TD > > >

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

2013-02-04 Thread Thomas Dean
Great tool, thank you! One thing to mention: sh links to dash in my case, which has no built-in "source" command. Is there a standalone substitute? TD