[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reportbug and remapped "edit"




On 01/12/2017 08:58 PM, kamaraju kusumanchi wrote:
> On Wed, Jan 11, 2017 at 11:53 PM, David Wright <deblis@lionunicorn.co.uk> wrote:
>> On Wed 11 Jan 2017 at 22:38:48 (-0500), kamaraju kusumanchi wrote:
>>
>>> Just unalias the alias corresponding to edit (the one you set up in
>>> ~/.zshrc) before launching reportbug. After that set it back. IIUC
>>> there is no need to launch a bash subshell to do this. You can do
>>> everything while you are in zsh.
>>>
>>> So the sequence of commands would be
>>>
>>> % unalias edit
>>> % reportbug &
>>> % alias edit='emacsclient -c -s /tmp/emacs1000/server'
>> If you're going to do it that way, you've really got to
>> interrogate the old value and restore it afterwards, rather
>> than having edit defined in two places. Otherwise, how do
>> you keep them in sync.
>>
>> Most people wouldn't run reportbug often enough to worry
>> about a subshell, would they?
> I have another idea to try. You can specify the editor explicitly by
> using the -e option.
>
> % reportbug -e emacs

Sorry for the preposterously long delay; what, we went through two
freezes while this came up again?

This does work; similarly

% reportbug -e "emacsclient -c -s /tmp/emacs1000/server"

works with the behavior I expect (spawn an emacs window connected to the
current session...)

Now, following the discussion about aliases, is it safe to have

alias reportbug='reportbug -e "emacsclient -c -s /tmp/emacs1000/server"
' somewhere?
>
> or set the EDITOR environment variable for just the reportbug command.
> For example
>
> % EDITOR=emacs reportbug
>
> raju

-- 
Boyan Penkov
www.boyanpenkov.com


Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: