[xmonad] darcs patch: Shell.hs: +getBrowser, getEditor,
helper... (and 5 more)
gwern0 at gmail.com
gwern0 at gmail.com
Thu Apr 3 17:16:01 EDT 2008
On 2008.04.03 15:20:22 -0500, Spencer Janssen <sjanssen at cse.unl.edu> scribbled 1.8K characters:
> I think this $EDITOR business is a bit silly, for several reasons. $EDITOR by
> default is set to a terminal based program, like vi or nano. This means that
> the raiseEditor function, for many users (essentially everyone that doesn't use
> emacs), is totally useless. What is the advantage of raiseEditor over
> runOrRaise "emacs"?
>
> Also, I'm morally opposed to the default of "emacs" in getEditor, but we can
> leave religion out of this.
>
> Cheers,
> Spencer Janssen
Well, my idea of adding another slot in the default config (and a useful binding) was rejected. The state has to live *somewhere*, and Roundy's idea was the only viable one mooted. It's also the more Unixy solution of configuring the default editor. Hence using $EDITOR.
Now, I suspect this could be improved. For example, I was unsure whether to default to 'emacs' or 'emacsclient'; the problem with the latter is that sometimes it's invisible, when the buffer pops up in some emacs far far away or maybe pretty inaccessible (a forgotten Emacs in a screen session?), and I was also unsure whether emacsclient would do the right thing if no Emacs was running.
Another suggestion I saw is to use VISUAL, since apparently that's also used sometimes (but surely even less than EDITOR - even my extensive config files just define VISUAL=$EDITOR).
So I'll send a patch for those two changes.
But why have this in general? Because it was a repeated pattern in my config file; because it could be useful to others; because it's an interesting extension of RunOrRaise. And so on. If you don't see the appeal, I'm not sure I can explain it better than that.
--
gwern
initia POCSAG Corporate SARD PARASAR Chicago I special ^ MKDELTA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080403/5ea25f57/attachment.bin
More information about the xmonad
mailing list