On Wed, Jan 11, 2017 at 9:27 AM, Boyan Penkov <[email protected]> wrote: > Hello, > > I am trying to use reportbug to file a bug report. > > However, my .zshrc contains "alias edit='emacsclient -c -s > /tmp/emacs1000/server", as I have an emacs session running and would like to > be able to use "edit file.txt" in the terminal to spawn a connection to > emacsclient. > > When running reportbug, this yields: > > Spawning emacsclient... > emacsclient: connect: Connection refused > emacsclient: No socket or alternate editor. Please use: > > --socket-name > --server-file (or environment variable EMACS_SERVER_FILE) > --alternate-editor (or environment variable ALTERNATE_EDITOR) > Warning: possible error exit from emacsclient: 256 > No changes were made in the editor. > > Ok, fine -- what's the workaround?
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' hope that helps raju -- Kamaraju S Kusumanchi | http://raju.shoutwiki.com/wiki/Blog

