On Wed 11 Jan 2017 at 09:27:17 (-0500), Boyan Penkov wrote: > 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?
In bash, you could try running reportbug in a subshell in which you unset either expand_aliases or the alias itself. I haven't bothered to search all the subsections of man zsh, but there may be something similar. Aliasing system commands is always a bit fraught. Cheers, David.