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

Re: reportbug and remapped "edit"



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

or set the EDITOR environment variable for just the reportbug command.
For example

% EDITOR=emacs reportbug

raju
-- 
Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog


Reply to: