Re: bug#62444: [PATCH] erc: Fix "dcc get" flag parsing
"J.P." <[email protected]>
| Newsgroups | gmane.emacs.erc.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Fernando, Fernando de Morais <[email protected]> writes: > I can no longer receive files from senders whose > nicknames contains a "|" pipe character. > > Example: > > /DCC GET EXAMPLE|Nick file_name.txt > > ERC returns in its buffer (followed by an *Apropos* buffer showing up in > another window): > > *** DCC: Nick undefined subcommand. GET, CHAT and LIST are defined. Thanks for the heads up. This looks like my bad. Would something like the attached (untried) maybe suffice as a temporary workaround?
fernando.diff
(text/x-patch, 861 B)
diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el index 29892b78a39..6f091668087 100644 --- a/lisp/erc/erc-compat.el +++ b/lisp/erc/erc-compat.el @@ -461,10 +461,14 @@ erc-compat--28-split-string-shell-command (defmacro erc-compat--split-string-shell-command (string) ;; Autoloaded in Emacs 28. - (list (if (fboundp 'split-string-shell-command) - 'split-string-shell-command - 'erc-compat--28-split-string-shell-command) - string)) + `(progn + (advice-add 'shell-backward-command :override #'goto-char) + (unwind-protect + ,(list (if (fboundp 'split-string-shell-command) + 'split-string-shell-command + 'erc-compat--28-split-string-shell-command) + string) + (advice-remove 'shell-backward-command #'goto-char)))) (provide 'erc-compat)