George Brown [off-list ref] writes:
quoted
The are editors that open their own window, or tell an already open
editor instance to edit the buffer (think: emacsclient) and in order
to be functional, they do not have to be launched from inside a
working terminal window (whose input comes from the keyboard---the
test "-t 1" is an approximate check for that).
Wouldn't this change hurt the users of such an editor?
I'm unsure of emacsclient but I would have thought that editors in
general would be more amenable to receiving lines than relying on
additional spawned instances to behave as clients.
I am not sure what you mean by "receiving lines". Your patch makes
the "git jump" command completely ignore configured GIT_EDITOR and
refuse to invoke *any* editor.
I am not sure what you mean by "receiving lines". Your patch makes
the "git jump" command completely ignore configured GIT_EDITOR and
refuse to invoke *any* editor.
Running "git jump" from a shell prompt works as before with this patch.
But now within Vim it can also be used to populate the quickfix list
with something like ":cexpr system('git jump')". Because instead of
invoking another instance of (which does not work well for Vim) it
just receives the lines as formatted by "git jump".
quoted
Would it work to set GIT_EDITOR to "cat" while performing the
"populating quickfix list" (whatever that is) operation?
It would, though I considered this to be less elegant.
Just to revise this, it wouldn't actually as the editor is always passed
"-q" (intended for Vim's quickfix list). So overriding this to "cat"
causes as error as "-q" is not a valid option for it.
I'm aware the examples I'm giving are specific to Vim but it really
seems that "git jump" was intended with Vim in mind. That said I'd argue
most other editors would work better with "git jump" if when they
invoked it another instance wasn't created. I've tried find an
equivalent to Vim's quickfix in Emacs this morning but can't quite wrap
my head around it.