[xmonad] darcs patch: Shell.hs: +getBrowser, getEditor,
helper... (and 5 more)
gwern0 at gmail.com
gwern0 at gmail.com
Thu Apr 3 21:52:52 EDT 2008
On 2008.04.03 17:26:39 -0500, Spencer Janssen <sjanssen at cse.unl.edu> scribbled 2.7K characters:
> On Thu, Apr 03, 2008 at 05:16:01PM -0400, gwern0 at gmail.com wrote:
> > Well, my idea of adding another slot in the default config (and a useful binding) was rejected.
> Your previous proposal was to add browser to the configuration, which we
> decided against. I'm perfectly okay with the $BROWSER use in the search module
> and other places.
> > 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.
> The problem with $EDITOR is that you're, more than likely, using it wrong.
> What happens when $EDITOR is set to vi, as it is on most systems by default?
> The raiseEditor binding will simply not work, because vi is a terminal
> application and not an X11 application. raiseEditor is pretending to be more
> general than it really is -- it will only work for emacs users (or for the
> other rare cases where an X11 editor is set). Because of this, I'm in favor of
> removing the editor bindings.
Is this truly your biggest problem, it 'pretending to be more general than it really is'? Would it suffice to rename it to 'raiseXEditor' or something?
> > 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.
> Do you really use the editor in multiple places in your config? getEditor is
> only used by raiseEditor in contrib, which isn't flexible enough to have more
> than one keybinding to it anyway.
> Spencer Janssen
The infrastructure of getEditor and getBrowser is used at least 7 times in my config, although those two specific functions are only each called once.
Blowpipe of NSLEP world diwn Serbian BBC Indigo ISS-ADP SONANGOL
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/xmonad/attachments/20080403/806208bf/attachment.bin
More information about the xmonad