From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "J.P." Newsgroups: gmane.emacs.bugs Subject: bug#62444: [PATCH] erc: Fix "dcc get" flag parsing Date: Fri, 07 Jul 2023 21:24:38 -0700 Message-ID: <87o7kn6neh.fsf__47946.2720382557$1688790332$gmane$org@neverwas.me> References: <87mt3i56l8.fsf__17405.3245967784$1680994480$gmane$org@neverwas.me> <878rbrxfkl.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24983"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62444@debbugs.gnu.org, emacs-erc@gnu.org, daniel@dpettersson.net To: Fernando de Morais Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 08 06:25:24 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qHzVc-0006Ju-4Y for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 08 Jul 2023 06:25:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHzVI-0005we-Ne; Sat, 08 Jul 2023 00:25:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHzVH-0005vY-2S for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 00:25:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHzVG-0003Uw-PM for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 00:25:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qHzVG-00015x-BY for bug-gnu-emacs@gnu.org; Sat, 08 Jul 2023 00:25:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "J.P." Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 08 Jul 2023 04:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62444 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62444-submit@debbugs.gnu.org id=B62444.16887902934191 (code B ref 62444); Sat, 08 Jul 2023 04:25:02 +0000 Original-Received: (at 62444) by debbugs.gnu.org; 8 Jul 2023 04:24:53 +0000 Original-Received: from localhost ([127.0.0.1]:44013 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHzV7-00015X-2l for submit@debbugs.gnu.org; Sat, 08 Jul 2023 00:24:53 -0400 Original-Received: from mail-108-mta96.mxroute.com ([136.175.108.96]:46217) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qHzV2-00015M-Hm for 62444@debbugs.gnu.org; Sat, 08 Jul 2023 00:24:52 -0400 Original-Received: from mail-111-mta2.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta96.mxroute.com (ZoneMTA) with ESMTPSA id 18933beb2370007ced.001 for <62444@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sat, 08 Jul 2023 04:24:42 +0000 X-Zone-Loop: 495be0548d9ad931c557d7f12bab08ac70ed70808cf3 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=neverwas.me ; s=x; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=W3tzAQwrfOzi95xtR5m2AKHFDv26MBR1v+nEG7UYrBw=; b=ODEh57CaNdkxKAcwAygJJmf0/R C0xUemMbgeyBhDKZ5klWmY1EuZYO2zyeR2wlXz98Bnl26Z+oiTBndb10bgqMiNP2erxheZhp1GU02 I/lOxI9mvx+aSHcyxa4X3Gwg9yRw5ThNvEI4TTDq6UnoX/YBiZlS01yXK5GE2rz3WpodB4mIyo5+U YIDF8X4b8xMepsFo+GCPA2CpCnuGhZUmgYQMsavKzrzAuoSxmNC12E1OcnrfyxOf2lcZpR8IAZtBt GkH68z1O3V5V/UN+Ds++TPxFX76JyZhdeXU9dL1IAE74Y2MQgRj1HugZHKPjKytr+Tp/Y1x5WDp2V IJ2Bb/Ng==; In-Reply-To: <878rbrxfkl.fsf@gmail.com> (Fernando de Morais's message of "Sat, 08 Jul 2023 00:11:38 -0300") X-Authenticated-Id: masked@neverwas.me X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264752 Archived-At: --=-=-= Content-Type: text/plain Hi Fernando, Fernando de Morais 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? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=fernando.diff 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) --=-=-=--