From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Matthew Bauer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 31 May 2019 20:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 36034@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155933533714159 (code B ref -1); Fri, 31 May 2019 20:43:02 +0000 Received: (at submit) by debbugs.gnu.org; 31 May 2019 20:42:17 +0000 Received: from localhost ([127.0.0.1]:36374 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWoLw-0003gJ-GS for submit@debbugs.gnu.org; Fri, 31 May 2019 16:42:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41365) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWoLu-0003fq-CU for submit@debbugs.gnu.org; Fri, 31 May 2019 16:42:14 -0400 Received: from lists.gnu.org ([209.51.188.17]:46725) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hWoLo-0004A7-Hn for submit@debbugs.gnu.org; Fri, 31 May 2019 16:42:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWoLn-0002D6-3t for bug-gnu-emacs@gnu.org; Fri, 31 May 2019 16:42:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_40, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWoAp-0001ie-M3 for bug-gnu-emacs@gnu.org; Fri, 31 May 2019 16:30:48 -0400 Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835]:45343) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWoAp-0001hS-GD for bug-gnu-emacs@gnu.org; Fri, 31 May 2019 16:30:47 -0400 Received: by mail-qt1-x835.google.com with SMTP id t1so2458393qtc.12 for ; Fri, 31 May 2019 13:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version; bh=9Y2hjSvW9xZA5JZW2JUUiKaTBjyKRANbnn2CGI10tA4=; b=OEFtlda8z39eW29sKc7zqpbuD3FT8Do9OnCrfOjjZV+1Svn1etfJtnRI9nyVp1y3hR fU/oR3MKmoZG7pGqdZUw0DBRcShZGJym5BeW1NJ7Gh8fEHLtP/wOkaMIhozM8Hk7d83N VSL2UuylsSTsW4Riy86BBRDnfW/dw5QQS3k1YyfegOiYC6MkjVV/dVuKX9AjBvlYuTgG ePJ59Bmp9S0mksQ70wuNF6o9bwaN8mEdjOzDB13RncX+bUkM7/SCXqtxvbChX74cS+np hsNV6k8kj+kahWZtJQAgjSjwBT2W86ZNni5pFdXEGXudKtzaCx/S3KZHEBqdNPHddyoP 83fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version; bh=9Y2hjSvW9xZA5JZW2JUUiKaTBjyKRANbnn2CGI10tA4=; b=IxDKarRzarMHKvxK/dyroLLrbJFeENJ9rtVLF+9irJb5vJZmIcSaIFwOYdwlD1d7UD p3ugvTXz/oxb5q4D98FLRbR1AlnTdvtaZ6dtkuc4KQ7qNdK3lRNuIbO9i40v0zGm1GnN dydbqMiXtObLhikjj34c58ZqYlfnUSuaEg/bu2sO2hJhCkWlwzST0L/L/ZNSFMD4ShTn 0+T4gNubucyYtyW9XMPbdsX3AF6ZugYbMR8EJQekBb2BP3QMl89dgHHdWj7XHpamvhIg 9MTIoG7KmlUEqlV88XbCPWpnHacHvMRyewru6DjHF/mEyitFIKYQyNIa20hAUQMFzCx2 kFgA== X-Gm-Message-State: APjAAAWzWVi65AHth6QLp5DpauJbzyjXc1ay2N+tXXlyGHUYV9EP29XK ybO93v+6FkyqRmXDExhNh6l/c9/Iz9A= X-Google-Smtp-Source: APXvYqy6ZVMQrqZwhb1jG32jScBtXKBlkukkf95Q7aUBoyOmTY/M3er/rCmLJvty7JM4zvoye7jodA== X-Received: by 2002:ac8:2448:: with SMTP id d8mr11258319qtd.197.1559334645911; Fri, 31 May 2019 13:30:45 -0700 (PDT) Received: from dellbook (static-108-30-103-121.nycmny.fios.verizon.net. [108.30.103.121]) by smtp.gmail.com with ESMTPSA id o71sm5831480qke.18.2019.05.31.13.30.44 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 31 May 2019 13:30:44 -0700 (PDT) From: Matthew Bauer Date: Fri, 31 May 2019 16:30:44 -0400 Message-ID: <87woi6e58r.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::835 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Currently, Zsh=E2=80=99s extended_history option is not handled well in Ema= cs. The comint buffer does not know to skip it when running comint-read-input-ring. The attached patch handles this. This behavior is described in the Zsh manual available at: http://zsh.sourceforge.net/Doc/Release/Options.html#History The format of this line looks like this: : :; This patch just skips those timestamp to get the part. --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch Content-Transfer-Encoding: quoted-printable >From b8a8857cd686fae1ebbeca79f4469ce878837b90 Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 31 May 2019 16:27:24 -0400 Subject: [PATCH] Add zsh extended_history handling for comint.el input ring MIME-Version: 1.0 Content-Type: text/plain; charset=3DUTF-8 Content-Transfer-Encoding: 8bit Adds handling of the Zsh extended_history to comint.el input ring. This means that the timestamp doesn=E2=80=99t show up when reading through history from other shells. The lines look like this: : :; This patch skips the part before . Zsh documents it here: http://zsh.sourceforge.net/Doc/Release/Options.html#History --- lisp/comint.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/comint.el b/lisp/comint.el index 3dce1c9c8d..c5c0ad0f7b 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -976,7 +976,11 @@ See also `comint-input-ignoredups' and `comint-write-i= nput-ring'." (setq start (if (re-search-backward comint-input-ring-separator nil t) - (match-end 0) + (progn + ;; Skip zsh extended_history stamps + (re-search-forward ": [[:digit:]]+:[[:digit:]= ]+;" nil t) + + (match-end 0)) (point-min))) (setq history (buffer-substring start end)) (goto-char start) --=20 2.21.0 --=-=-=-- From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 16:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Matthew Bauer Cc: 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.156130884012516 (code B ref 36034); Sun, 23 Jun 2019 16:54:02 +0000 Received: (at 36034) by debbugs.gnu.org; 23 Jun 2019 16:54:00 +0000 Received: from localhost ([127.0.0.1]:54366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf5ke-0003Fo-CI for submit@debbugs.gnu.org; Sun, 23 Jun 2019 12:54:00 -0400 Received: from quimby.gnus.org ([80.91.231.51]:43560) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf5kc-0003Fa-3S for 36034@debbugs.gnu.org; Sun, 23 Jun 2019 12:53:58 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf5kY-000882-TK; Sun, 23 Jun 2019 18:53:57 +0200 From: Lars Ingebrigtsen References: <87woi6e58r.fsf@gmail.com> Date: Sun, 23 Jun 2019 18:53:54 +0200 In-Reply-To: <87woi6e58r.fsf@gmail.com> (Matthew Bauer's message of "Fri, 31 May 2019 16:30:44 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matthew Bauer writes: > The format of this line looks like this: > > : :; > > This patch just skips those timestamp to get the part. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Matthew Bauer writes: > The format of this line looks like this: > > : :; > > This patch just skips those timestamp to get the part. [...] > --- a/lisp/comint.el > +++ b/lisp/comint.el > @@ -976,7 +976,11 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'." > (setq start > (if (re-search-backward comint-input-ring-separator > nil t) > - (match-end 0) > + (progn > + ;; Skip zsh extended_history stamps > + (re-search-forward ": [[:digit:]]+:[[:digit:]]+;" nil t) > + > + (match-end 0)) > (point-min))) > (setq history (buffer-substring start end)) > (goto-char start) I'm not that familiar with the comint/shell code... but this is done in the central comint code, so it would do this for all the modes that use comint? Couldn't that lead to problems in these other modes that aren't doing this timestamp thing? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Matthew Bauer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 22:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: 36034@debbugs.gnu.org X-Debbugs-Original-Cc: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.156132888725925 (code B ref -1); Sun, 23 Jun 2019 22:29:01 +0000 Received: (at submit) by debbugs.gnu.org; 23 Jun 2019 22:28:07 +0000 Received: from localhost ([127.0.0.1]:55267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfAxz-0006k5-J1 for submit@debbugs.gnu.org; Sun, 23 Jun 2019 18:28:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:57300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfAxx-0006jx-Dw for submit@debbugs.gnu.org; Sun, 23 Jun 2019 18:28:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43532) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfAxw-0001An-BW for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 18:28:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: * X-Spam-Status: No, score=1.1 required=5.0 tests=BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfAxv-0007JJ-9h for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 18:28:04 -0400 Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]:39156) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfAxu-0007Hw-Ux for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 18:28:03 -0400 Received: by mail-qk1-x729.google.com with SMTP id i125so8397735qkd.6 for ; Sun, 23 Jun 2019 15:28:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=nCIU+OvVgKES5jBaBMzy7kpC40Oo1GqHA6eLby37Jo4=; b=YZvx6kRMiM6oIFsTLAyEqzU6RbJbCGOi2Ch75iQV2QT/app+1C8hrub6tCh7p5J9lA hIPksV+VrO+2mLzDqECQooFP0KQsrGJDtdkqQUkEc8lQWArogUuUJeq18f7ZamPE1X61 39PMB/CDC+TwKvsv+tEa4p7dxYXruZcckmZpluom/3tw4SktvoIXbpRfQkYL8gA9yVjD VDPecjK0WPT7ZvXMyzzclqsZoTgFD/BiSnGKoO6giPeA9xc4757epdA8qW8CgA8owAG7 WLYAA0Qx5/stqpbgZebjSk7LhKg1QIbSJ5g6uSEGQx5O2ih4oB3Y872cbygswxHu2iIi OUYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=nCIU+OvVgKES5jBaBMzy7kpC40Oo1GqHA6eLby37Jo4=; b=gk+CBsTAUwjqQnH4avmbL2reqNxoeZn9BbYtVNkzGGMJV3x8zbBhexSo47iHMobbuc aEIdeREERCg42ME9ZLfTipd9YPO2AOou2Ju8FiGNgPhVezvq6zVHkPCs0U5ZGJiWkJ38 tYMdUW4/ppUyO6z2mDeKp3VRYGqQGZDcs2D4NaLmo6272iZce3e0/FCt0wFXk387vQwF nRYGNz6oT7N8Is7LYVFAt0d0Qm0OJYiyg3K0/I+zfnlusZO/8zF/1g7FP8k4pd/TrTbN DzmKsKNxKyGA1ibLvAnj9JhzviuTengKV49W9WToXU456+N6j6LM4oUCcrsZidI88vSR +XQg== X-Gm-Message-State: APjAAAXOVCDA3JOhad2uOfRK8zj8H1t5jwTtWNUu+1wlJcrXVJ8mGzMd MrziMg0e2uqZRXgaoAoMhZp9IP+RpHE= X-Google-Smtp-Source: APXvYqwUPhmTCQMCU2i4wXS5wuCYCgGyHWCfova8mHF3ai72UsZiP1eqzwqBu0OCdoPkqRxdZiNecA== X-Received: by 2002:a05:620a:1661:: with SMTP id d1mr43881494qko.192.1561328881505; Sun, 23 Jun 2019 15:28:01 -0700 (PDT) Received: from matthewsmacbook.home (ool-457386fe.dyn.optonline.net. [69.115.134.254]) by smtp.gmail.com with ESMTPSA id g53sm5325021qtk.65.2019.06.23.15.28.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 23 Jun 2019 15:28:00 -0700 (PDT) From: Matthew Bauer Message-Id: <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_15F7823F-BACA-48FA-AACC-09FA7E1D6CE3" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3554.18.2\)) Date: Sun, 23 Jun 2019 18:27:59 -0400 In-Reply-To: References: <87woi6e58r.fsf@gmail.com> X-Mailer: Apple Mail (2.3554.18.2) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::729 X-Spam-Score: -1.1 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --Apple-Mail=_15F7823F-BACA-48FA-AACC-09FA7E1D6CE3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 23, 2019, at 12:53 PM, Lars Ingebrigtsen = wrote: >=20 > I'm not that familiar with the comint/shell code... but this is done > in the central comint code, so it would do this for all the modes that > use comint? Couldn't that lead to problems in these other modes that > aren't doing this timestamp thing? Yes, it does apply for any comint buffer that uses = comint-read-input-ring. i had originally thought this was only used by = shell-mode, but you are correct that it is used by others. I=E2=80=99ve = added defcustom handling to the patch to properly account for this. In = addition, I have made some revisions to better account for the extended = history prefix. Any additional help on this would be appreciate! --Apple-Mail=_15F7823F-BACA-48FA-AACC-09FA7E1D6CE3 Content-Disposition: attachment; filename=0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch" Content-Transfer-Encoding: quoted-printable =46rom=2054a0aa6a4de95f898cf13c67a5eb698dbfd9a46b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Matthew=20Bauer=20=0A= Date:=20Sun,=2023=20Jun=202019=2018:08:32=20-0400=0ASubject:=20[PATCH]=20= Add=20zsh=20extended_history=20handling=20for=20comint.el=20input=20ring=0A= MIME-Version:=201.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0AAdds=20handling=20of=20the=20Zsh=20= extended_history=20to=20comint.el=20input=0Aring.=20This=20means=20that=20= the=20timestamp=20doesn=E2=80=99t=20show=20up=20when=20reading=0Athrough=20= history=20from=20other=20shells.=20The=20lines=20look=20like=20this:=0A=0A= :=20:;=0A=0AThis=20patch=20= skips=20the=20part=20before=20=20when=20the=20=E2=80=98shell=E2=80= =99=20is=0Azsh.=20This=20is=20done=20through=20the=20= comint-input-ring-file-prefix=0Avariable.=20When=20set,=20this=20will=20= skip=20a=20prefix=20of=20the=20file=20when=20loading=0Ainto=20the=20= input=20ring.=20This=20matches=20the=20behavior=20of=20Zsh.=20Zsh=20= documents=0Ait=20here:=0A=0A= http://zsh.sourceforge.net/Doc/Release/Options.html#History=0A---=0A=20= lisp/comint.el=20|=2026=20++++++++++++++++++++++++--=0A=20lisp/shell.el=20= =20|=20=206=20+++++-=0A=202=20files=20changed,=2029=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/comint.el=20b/lisp/comint.el=0A= index=2056e38e24ac..fef874387a=20100644=0A---=20a/lisp/comint.el=0A+++=20= b/lisp/comint.el=0A@@=20-249,6=20+249,12=20@@=20to=20set=20this=20in=20a=20= mode=20hook,=20rather=20than=20customize=20the=20default=20value."=0A=20=09= =09=20file)=0A=20=20=20:group=20'comint)=0A=20=0A+(defcustom=20= comint-input-ring-file-prefix=20nil=0A+=20=20"If=20non-nil,=20the=20= prefix=20to=20skip=20when=20parsing=20the=20input=20ring=20file.=0A+This=20= is=20useful=20in=20Zsh=20when=20the=20extended_history=20option=20is=20= on."=0A+=20=20:type=20'boolean=0A+=20=20:group=20'comint)=0A+=0A=20= (defcustom=20comint-scroll-to-bottom-on-input=20nil=0A=20=20=20"Controls=20= whether=20input=20to=20interpreter=20causes=20window=20to=20scroll.=0A=20= If=20nil,=20then=20do=20not=20scroll.=20=20If=20t=20or=20`all',=20scroll=20= all=20windows=20showing=20buffer.=0A@@=20-978,8=20+984,24=20@@=20See=20= also=20`comint-input-ignoredups'=20and=20`comint-write-input-ring'."=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20start=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= (re-search-backward=20comint-input-ring-separator=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20nil=20t)=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-end=200)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(point-min)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(progn=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (when=20(and=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (looking-at=20(concat=20comint-input-ring-separator=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= comint-input-ring-file-prefix)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20Skip=20zsh=20= extended_history=20stamps=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(re-search-forward=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20nil=20t))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(match-end=20= 0))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(progn=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(goto-char=20(point-min))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= (and=20comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (looking-at=20comint-input-ring-file-prefix))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (progn=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(re-search-forward=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20nil=20t)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-end=200))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(point-min)))))=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(setq=20history=20(buffer-substring=20= start=20end))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (goto-char=20start)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(when=20(and=20(not=20(string-match=20comint-input-history-ignore=0A= diff=20--git=20a/lisp/shell.el=20b/lisp/shell.el=0Aindex=20= e30825cd66..25f6892d96=20100644=0A---=20a/lisp/shell.el=0A+++=20= b/lisp/shell.el=0A@@=20-600,7=20+600,11=20@@=20buffer."=0A=20=20=20=20=20= =20=20;;=20Bypass=20a=20bug=20in=20certain=20versions=20of=20bash.=0A=20=20= =20=20=20=20=20(when=20(string-equal=20shell=20"bash")=0A=20=20=20=20=20=20= =20=20=20(add-hook=20'comint-preoutput-filter-functions=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20'shell-filter-ctrl-a-ctrl-b=20nil=20= t)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 'shell-filter-ctrl-a-ctrl-b=20nil=20t))=0A+=0A+=20=20=20=20=20=20;;=20= Skip=20extended=20history=20for=20zsh.=0A+=20=20=20=20=20=20(when=20= (string-equal=20shell=20"zsh")=0A+=20=20=20=20=20=20=20=20(setq-local=20= comint-input-ring-file-prefix=20":=20[[:digit:]]+:[[:digit:]]+;")))=0A=20= =20=20=20=20(comint-read-input-ring=20t)))=0A=20=0A=20(defun=20= shell-apply-ansi-color=20(beg=20end=20face)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_15F7823F-BACA-48FA-AACC-09FA7E1D6CE3-- From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2019 11:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Matthew Bauer Cc: 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.15613763599918 (code B ref 36034); Mon, 24 Jun 2019 11:40:02 +0000 Received: (at 36034) by debbugs.gnu.org; 24 Jun 2019 11:39:19 +0000 Received: from localhost ([127.0.0.1]:55663 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfNJf-0002Zu-Ej for submit@debbugs.gnu.org; Mon, 24 Jun 2019 07:39:19 -0400 Received: from quimby.gnus.org ([80.91.231.51]:56564) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfNJe-0002Zk-0z for 36034@debbugs.gnu.org; Mon, 24 Jun 2019 07:39:18 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfNJZ-0002YP-HD; Mon, 24 Jun 2019 13:39:15 +0200 From: Lars Ingebrigtsen In-Reply-To: <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> (Matthew Bauer's message of "Sun, 23 Jun 2019 18:27:59 -0400") Date: Mon, 24 Jun 2019 12:51:08 +0200 References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVVdZEXHjVZ0OYpMUpl j6xBUWsL3gelAAACPklEQVQ4jVWUsXbrIAyGVQJ7CTc7lc0erLLn+JCdgnn/V6mEHTdXnqJP0i8J CKTORqmX3lLp/MvAAx46w09q0VnXNygmG216K1qboiH1RmRvveAS0KPptMGjc1brLVpLdA/L19rR GCr62TpA782y3fw9qGISEbEc9S6l2O/83UC5WEeWGtMEcB8Jmv0Q2R9pWNdAxL9VATCSyMAdILpo NzDQ7OhBLIkEUELg8Mh+F0c0NZ4XIFX0RD92FHJWNKSpB9B6RQWTgDgyxo5KhhQqInqOPyT6AeLE flSW4qtTHrBDBhsErLvsDriZzMAPYCm1MwM0r91BfYE2xKUUCHiqHfCO2rsGeZxZnGeQgaVbKFxs aARQwBlOJmiizQtlgMEXI6Fj2WY0JRpWYSjm2faBJRg0+2ewCzZHF/aCKTBGyI+cEex1drRHi7FP bGXAti+OS4z4rDlBQF02bZIZmzgSdrB8hxA4gTeR8xtwVxPmKiInWXFk/Jvmuj2HvD79Am6TWia/ y+9gZFB0fjG+Gun3PYP3ydd53UKHA8x/IPn6nF8Zw70DdcHNK7P75xP0VqfV4Lfnyf8SBPQl1KAM vksLSKl6/oLy+jX1AHw+31j4q/P/QC4l8hPj72j3DxBecFJnrVVuxwGmGhZf5T08Xkn8vqxdv65+ 1DvBPA9QwydGruaPM8/jzNmuM+EHV0P5w4DzaBmgxWlBwud+02XIARb8qSxyUf5Y5Ev8hh9Xjg/1 bRTI/C4dfn1iYwn0g8i6fgEmpsN4L1MvjgAAAABJRU5ErkJggg== Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matthew Bauer writes: > Yes, it does apply for any comint buffer that uses > comint-read-input-ring. i had originally thought this was only used by > shell-mode, but you are correct that it is used by others. Ive added > d [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Matthew Bauer writes: > Yes, it does apply for any comint buffer that uses > comint-read-input-ring. i had originally thought this was only used by > shell-mode, but you are correct that it is used by others. Ive added > defcustom handling to the patch to properly account for this. Looks less dangerous now. :-) Some comments: > +(defcustom comint-input-ring-file-prefix nil > + "If non-nil, the prefix to skip when parsing the input ring file. > +This is useful in Zsh when the extended_history option is on." > + :type 'boolean > + :group 'comint) This doesn't really seem like a user-level variable, so it should just be a defvar, I think. > (setq start > (if (re-search-backward comint-input-ring-separator > nil t) > - (match-end 0) > - (point-min))) > + (progn > + (when (and > + comint-input-ring-file-prefix > + (looking-at (concat comint-input-ring-separator > + comint-input-ring-file-prefix))) > + ;; Skip zsh extended_history stamps > + (re-search-forward comint-input-ring-file-prefix > + nil t)) > + (match-end 0)) The re-search-forward here doesn't seem necessary -- can't you just go to (match-end 0) here instead? > + (progn > + (goto-char (point-min)) > + (if (and comint-input-ring-file-prefix > + (looking-at comint-input-ring-file-prefix)) > + (progn > + (re-search-forward comint-input-ring-file-prefix > + nil t) > + (match-end 0)) > + (point-min))))) And I don't understand this bit. This is when we didn't find comint-input-ring-separator, right? But you still want to skip comint-input-ring-file-prefix? If you want to skip it anyway, then you can just have the check (and the skip) after the if statement... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2019 22:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Matthew Bauer Cc: 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.15614153801406 (code B ref 36034); Mon, 24 Jun 2019 22:30:02 +0000 Received: (at 36034) by debbugs.gnu.org; 24 Jun 2019 22:29:40 +0000 Received: from localhost ([127.0.0.1]:58238 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfXT1-0000Mc-Ra for submit@debbugs.gnu.org; Mon, 24 Jun 2019 18:29:40 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37600) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfXT0-0000MQ-CP for 36034@debbugs.gnu.org; Mon, 24 Jun 2019 18:29:38 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfXSx-00007I-F0; Tue, 25 Jun 2019 00:29:37 +0200 From: Lars Ingebrigtsen In-Reply-To: <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> (Matthew Bauer's message of "Sun, 23 Jun 2019 18:27:59 -0400") Date: Mon, 24 Jun 2019 12:51:08 +0200 References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVVdZEXHjVZ0OYpMUpl j6xBUWsL3gelAAACPklEQVQ4jVWUsXbrIAyGVQJ7CTc7lc0erLLn+JCdgnn/V6mEHTdXnqJP0i8J CKTORqmX3lLp/MvAAx46w09q0VnXNygmG216K1qboiH1RmRvveAS0KPptMGjc1brLVpLdA/L19rR GCr62TpA782y3fw9qGISEbEc9S6l2O/83UC5WEeWGtMEcB8Jmv0Q2R9pWNdAxL9VATCSyMAdILpo NzDQ7OhBLIkEUELg8Mh+F0c0NZ4XIFX0RD92FHJWNKSpB9B6RQWTgDgyxo5KhhQqInqOPyT6AeLE flSW4qtTHrBDBhsErLvsDriZzMAPYCm1MwM0r91BfYE2xKUUCHiqHfCO2rsGeZxZnGeQgaVbKFxs aARQwBlOJmiizQtlgMEXI6Fj2WY0JRpWYSjm2faBJRg0+2ewCzZHF/aCKTBGyI+cEex1drRHi7FP bGXAti+OS4z4rDlBQF02bZIZmzgSdrB8hxA4gTeR8xtwVxPmKiInWXFk/Jvmuj2HvD79Am6TWia/ y+9gZFB0fjG+Gun3PYP3ydd53UKHA8x/IPn6nF8Zw70DdcHNK7P75xP0VqfV4Lfnyf8SBPQl1KAM vksLSKl6/oLy+jX1AHw+31j4q/P/QC4l8hPj72j3DxBecFJnrVVuxwGmGhZf5T08Xkn8vqxdv65+ 1DvBPA9QwydGruaPM8/jzNmuM+EHV0P5w4DzaBmgxWlBwud+02XIARb8qSxyUf5Y5Ev8hh9Xjg/1 bRTI/C4dfn1iYwn0g8i6fgEmpsN4L1MvjgAAAABJRU5ErkJggg== Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matthew Bauer writes: > Yes, it does apply for any comint buffer that uses > comint-read-input-ring. i had originally thought this was only used by > shell-mode, but you are correct that it is used by others. Ive added > d [...] Content analysis details: (-1.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 1.5 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Matthew Bauer writes: > Yes, it does apply for any comint buffer that uses > comint-read-input-ring. i had originally thought this was only used by > shell-mode, but you are correct that it is used by others. Ive added > d [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: ingebrigtsen.no] 1.1 DATE_IN_PAST_06_12 Date: is 6 to 12 hours before Received: date 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) Matthew Bauer writes: > Yes, it does apply for any comint buffer that uses > comint-read-input-ring. i had originally thought this was only used by > shell-mode, but you are correct that it is used by others. Ive added > defcustom handling to the patch to properly account for this. Looks less dangerous now. :-) Some comments: > +(defcustom comint-input-ring-file-prefix nil > + "If non-nil, the prefix to skip when parsing the input ring file. > +This is useful in Zsh when the extended_history option is on." > + :type 'boolean > + :group 'comint) This doesn't really seem like a user-level variable, so it should just be a defvar, I think. > (setq start > (if (re-search-backward comint-input-ring-separator > nil t) > - (match-end 0) > - (point-min))) > + (progn > + (when (and > + comint-input-ring-file-prefix > + (looking-at (concat comint-input-ring-separator > + comint-input-ring-file-prefix))) > + ;; Skip zsh extended_history stamps > + (re-search-forward comint-input-ring-file-prefix > + nil t)) > + (match-end 0)) The re-search-forward here doesn't seem necessary -- can't you just go to (match-end 0) here instead? > + (progn > + (goto-char (point-min)) > + (if (and comint-input-ring-file-prefix > + (looking-at comint-input-ring-file-prefix)) > + (progn > + (re-search-forward comint-input-ring-file-prefix > + nil t) > + (match-end 0)) > + (point-min))))) And I don't understand this bit. This is when we didn't find comint-input-ring-separator, right? But you still want to skip comint-input-ring-file-prefix? If you want to skip it anyway, then you can just have the check (and the skip) after the if statement... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Matthew Bauer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Jun 2019 22:47:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.15614163683264 (code B ref 36034); Mon, 24 Jun 2019 22:47:01 +0000 Received: (at 36034) by debbugs.gnu.org; 24 Jun 2019 22:46:08 +0000 Received: from localhost ([127.0.0.1]:58253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfXiw-0000qY-L1 for submit@debbugs.gnu.org; Mon, 24 Jun 2019 18:46:08 -0400 Received: from mail-qt1-f176.google.com ([209.85.160.176]:40714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfXir-0000pj-7u for 36034@debbugs.gnu.org; Mon, 24 Jun 2019 18:46:04 -0400 Received: by mail-qt1-f176.google.com with SMTP id a15so16341430qtn.7 for <36034@debbugs.gnu.org>; Mon, 24 Jun 2019 15:46:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=uEDCCmg8sGQKODS4IBmQENp4GR/PKlWEEbNzKFGo3JQ=; b=KmXYNQeNoTMqzlQqLyd7n8mNvcocxB239X7tBWODeU0OHtZqJ65GkOrtc0c56IGSPz 7zcpgElYXleaf0ogYsRBorbw8jYfB6sb0RhRcRIHdtCkfLXm0xRAISTw55+sxi1F2Cqw QoNJa9fmlKF0UAzfARuG0NiRFgxVqItkVJ8sxCyRdEZHA4c0aHsgdtLOVZV/lK1HHM5L NSuEJlJb2ndJc4nvytUuJ//8dJEqWgsJ4jNOkdNWePaqI/1OsW3v8XRyDqCVwjH2Aoo8 B8FQsDSyuFmpYpmYUDDD3vnMYAQssSjmmMVhXzoZ8VmKQZLkqq3t7tH7wqxh+xtLxhpZ 0+9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=uEDCCmg8sGQKODS4IBmQENp4GR/PKlWEEbNzKFGo3JQ=; b=TLMQNvkkmADAH9TFowO8MVLV4y1UottkYrllCDdOQG0s5ecehtxrvi61hGY29ck6EF oM85ACBgv0Q7hhs8hxp6/ZuxfmJJH4BaGaiGeeOwpeH0SbfQmcmTyNELK4hjHU4mvp/J 74m7flGEnyyjbLzE0wGYjcZb11h+LdgzzSoih9fKmUGaA+orogwUtMFZE5p46+vcCSJQ nX48iEW0NQM0kHnO/yn1IXnrO3DTEkTerCDE1ZRFo+5b6a7LS6PRjg5YGMLDxdCSGSfk DVlXozsbLZeZvvoo3MQfccJYknDfovMHp2AflvtBQXQdtsYoWZ8omyL9iZpoK5zSQkq5 bbcw== X-Gm-Message-State: APjAAAWjpUsPTV9L2rQJH1Wgbcw2bo3lA/562e8jedcAlhFgmhFgIX54 wcEgtRS4taeyANXAx34H1fg= X-Google-Smtp-Source: APXvYqzmzG2WKTe1jNiIo2BiT/GlLQi460hdgzfwEvfzMBaCmxaGx6CtjBHyEi8A+RwRDCnYqtLXiQ== X-Received: by 2002:ac8:2edc:: with SMTP id i28mr110375832qta.77.1561416355487; Mon, 24 Jun 2019 15:45:55 -0700 (PDT) Received: from matthewsmacbook.home (ool-457386fe.dyn.optonline.net. [69.115.134.254]) by smtp.gmail.com with ESMTPSA id f9sm6186616qtl.75.2019.06.24.15.45.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jun 2019 15:45:54 -0700 (PDT) From: Matthew Bauer Message-Id: <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_BAF05346-57A1-43BA-B7AD-4FA8EBCC3885" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3554.18.2\)) Date: Mon, 24 Jun 2019 18:45:51 -0400 In-Reply-To: References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> X-Mailer: Apple Mail (2.3554.18.2) X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_BAF05346-57A1-43BA-B7AD-4FA8EBCC3885 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On Jun 24, 2019, at 6:51 AM, Lars Ingebrigtsen wrote: >=20 > Matthew Bauer writes: >=20 >> +(defcustom comint-input-ring-file-prefix nil >> + "If non-nil, the prefix to skip when parsing the input ring file. >> +This is useful in Zsh when the extended_history option is on." >> + :type 'boolean >> + :group 'comint) >=20 > This doesn't really seem like a user-level variable, so it should just > be a defvar, I think. Seems reasonable, I updated the patch. >=20 >> (setq start >> (if (re-search-backward = comint-input-ring-separator >> nil t) >> - (match-end 0) >> - (point-min))) >> + (progn >> + (when (and >> + comint-input-ring-file-prefix >> + (looking-at (concat = comint-input-ring-separator >> + = comint-input-ring-file-prefix))) >> + ;; Skip zsh extended_history stamps >> + (re-search-forward = comint-input-ring-file-prefix >> + nil t)) >> + (match-end 0)) >=20 > The re-search-forward here doesn't seem necessary -- can't you just go > to (match-end 0) here instead? Without re-search-forward, the =E2=80=9Cstart=E2=80=9D integer would = just be the character right after the newline. re-search-forward skips = that prefix. >> + (progn >> + (goto-char (point-min)) >> + (if (and comint-input-ring-file-prefix >> + (looking-at = comint-input-ring-file-prefix)) >> + (progn >> + (re-search-forward = comint-input-ring-file-prefix >> + nil t) >> + (match-end 0)) >> + (point-min))))) >=20 > And I don't understand this bit. This is when we didn't find > comint-input-ring-separator, right? But you still want to skip > comint-input-ring-file-prefix? >=20 > If you want to skip it anyway, then you can just have the check (and = the > skip) after the if statement=E2=80=A6 >=20 This is for the very first line which will not have a newline before it. = In this case, we want to skip the prefix as well. This is part of why we = need special handling for =E2=80=9Cprefix" and tricks like this don=E2=80=99= t work: https://emacs.stackexchange.com/a/22295 = --Apple-Mail=_BAF05346-57A1-43BA-B7AD-4FA8EBCC3885 Content-Type: multipart/mixed; boundary="Apple-Mail=_C06798D8-295E-4113-9A8B-A6540778E10F" --Apple-Mail=_C06798D8-295E-4113-9A8B-A6540778E10F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On Jun 24, 2019, at 6:51 AM, Lars Ingebrigtsen <larsi@gnus.org> = wrote:

Matthew Bauer <mjbauer95@gmail.com> writes:

+(defcustom comint-input-ring-file-prefix = nil
+  "If non-nil, the prefix to skip when parsing = the input ring file.
+This is useful in Zsh when the = extended_history option is on."
+  :type 'boolean
+  :group 'comint)

This doesn't really seem like a user-level variable, so it = should just
be a defvar, I = think.

Seems = reasonable, I updated the patch.


=             &n= bsp;    (setq start
=             &n= bsp;          (if = (re-search-backward comint-input-ring-separator
=             &n= bsp;           &nbs= p;            =           nil t)
- =             &n= bsp;           &nbs= p; (match-end 0)
- =             &n= bsp;           (poi= nt-min)))
+ =             &n= bsp;           &nbs= p; (progn
+ =             &n= bsp;           &nbs= p;   (when (and
+ =             &n= bsp;           &nbs= p;          comint-input= -ring-file-prefix
+ =             &n= bsp;           &nbs= p;          (looking-at = (concat comint-input-ring-separator
+ =             &n= bsp;           &nbs= p;            =             &n= bsp;     comint-input-ring-file-prefix)))
+ =             &n= bsp;           &nbs= p;     ;; Skip zsh extended_history stamps
+ =             &n= bsp;           &nbs= p;     (re-search-forward = comint-input-ring-file-prefix
+ =             &n= bsp;           &nbs= p;            =             ni= l t))
+ =             &n= bsp;           &nbs= p;   (match-end 0))

The re-search-forward here doesn't seem necessary -- can't = you just go
to (match-end 0) here instead?

Without = re-search-forward, the =E2=80=9Cstart=E2=80=9D integer would just be the = character right after the newline. re-search-forward skips that = prefix.

+ =             &n= bsp;           (pro= gn
+ =             &n= bsp;           &nbs= p; (goto-char (point-min))
+ =             &n= bsp;           &nbs= p; (if (and comint-input-ring-file-prefix
+ =             &n= bsp;           &nbs= p;          (looking-at = comint-input-ring-file-prefix))
+ =             &n= bsp;           &nbs= p;     (progn
+ =             &n= bsp;           &nbs= p;       (re-search-forward = comint-input-ring-file-prefix
+ =             &n= bsp;           &nbs= p;            =             &n= bsp; nil t)
+ =             &n= bsp;           &nbs= p;       (match-end 0))
+= =             &n= bsp;           &nbs= p;   (point-min)))))

And I don't understand this bit.  This is when we didn't = find
comint-input-ring-separator, right?  But you = still want to skip
comint-input-ring-file-prefix?

If you want to skip it anyway, then you can = just have the check (and the
skip) after the if = statement=E2=80=A6


This is = for the very first line which will not have a newline before it. In this = case, we want to skip the prefix as well. This is part of why we need = special handling for =E2=80=9Cprefix" and tricks like this don=E2=80=99t = work:


= --Apple-Mail=_C06798D8-295E-4113-9A8B-A6540778E10F Content-Disposition: attachment; filename=0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ad957ff66cb9d48a1ae7772758b40e534392f097=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Matthew=20Bauer=20=0A= Date:=20Sun,=2023=20Jun=202019=2018:08:32=20-0400=0ASubject:=20[PATCH]=20= Add=20zsh=20extended_history=20handling=20for=20comint.el=20input=20ring=0A= MIME-Version:=201.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0AAdds=20handling=20of=20the=20Zsh=20= extended_history=20to=20comint.el=20input=0Aring.=20This=20means=20that=20= the=20timestamp=20doesn=E2=80=99t=20show=20up=20when=20reading=0Athrough=20= history=20from=20other=20shells.=20The=20lines=20look=20like=20this:=0A=0A= :=20:;=0A=0AThis=20patch=20= skips=20the=20part=20before=20=20when=20the=20=E2=80=98shell=E2=80= =99=20is=0Azsh.=20This=20is=20done=20through=20the=20= comint-input-ring-file-prefix=0Avariable.=20When=20set,=20this=20will=20= skip=20a=20prefix=20of=20the=20file=20when=20loading=0Ainto=20the=20= input=20ring.=20This=20matches=20the=20behavior=20of=20Zsh.=20Zsh=20= documents=0Ait=20here:=0A=0A= http://zsh.sourceforge.net/Doc/Release/Options.html#History=0A---=0A=20= lisp/comint.el=20|=2024=20++++++++++++++++++++++--=0A=20lisp/shell.el=20=20= |=20=206=20+++++-=0A=202=20files=20changed,=2027=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/comint.el=20b/lisp/comint.el=0A= index=2056e38e24ac..dbf239b463=20100644=0A---=20a/lisp/comint.el=0A+++=20= b/lisp/comint.el=0A@@=20-249,6=20+249,10=20@@=20to=20set=20this=20in=20a=20= mode=20hook,=20rather=20than=20customize=20the=20default=20value."=0A=20=09= =09=20file)=0A=20=20=20:group=20'comint)=0A=20=0A+(defvar=20= comint-input-ring-file-prefix=20nil=0A+=20=20"The=20prefix=20to=20skip=20= when=20parsing=20the=20input=20ring=20file.=0A+This=20is=20useful=20in=20= Zsh=20when=20the=20extended_history=20option=20is=20on.")=0A+=0A=20= (defcustom=20comint-scroll-to-bottom-on-input=20nil=0A=20=20=20"Controls=20= whether=20input=20to=20interpreter=20causes=20window=20to=20scroll.=0A=20= If=20nil,=20then=20do=20not=20scroll.=20=20If=20t=20or=20`all',=20scroll=20= all=20windows=20showing=20buffer.=0A@@=20-978,8=20+982,24=20@@=20See=20= also=20`comint-input-ignoredups'=20and=20`comint-write-input-ring'."=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20start=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= (re-search-backward=20comint-input-ring-separator=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20nil=20t)=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-end=200)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(point-min)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(progn=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (when=20(and=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (looking-at=20(concat=20comint-input-ring-separator=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= comint-input-ring-file-prefix)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20Skip=20zsh=20= extended_history=20stamps=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(re-search-forward=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20nil=20t))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(match-end=20= 0))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(progn=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(goto-char=20(point-min))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= (and=20comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (looking-at=20comint-input-ring-file-prefix))=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (progn=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20(re-search-forward=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20nil=20t)=0A+=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-end=200))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(point-min)))))=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20(setq=20history=20(buffer-substring=20= start=20end))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (goto-char=20start)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(when=20(and=20(not=20(string-match=20comint-input-history-ignore=0A= diff=20--git=20a/lisp/shell.el=20b/lisp/shell.el=0Aindex=20= e30825cd66..25f6892d96=20100644=0A---=20a/lisp/shell.el=0A+++=20= b/lisp/shell.el=0A@@=20-600,7=20+600,11=20@@=20buffer."=0A=20=20=20=20=20= =20=20;;=20Bypass=20a=20bug=20in=20certain=20versions=20of=20bash.=0A=20=20= =20=20=20=20=20(when=20(string-equal=20shell=20"bash")=0A=20=20=20=20=20=20= =20=20=20(add-hook=20'comint-preoutput-filter-functions=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20'shell-filter-ctrl-a-ctrl-b=20nil=20= t)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= 'shell-filter-ctrl-a-ctrl-b=20nil=20t))=0A+=0A+=20=20=20=20=20=20;;=20= Skip=20extended=20history=20for=20zsh.=0A+=20=20=20=20=20=20(when=20= (string-equal=20shell=20"zsh")=0A+=20=20=20=20=20=20=20=20(setq-local=20= comint-input-ring-file-prefix=20":=20[[:digit:]]+:[[:digit:]]+;")))=0A=20= =20=20=20=20(comint-read-input-ring=20t)))=0A=20=0A=20(defun=20= shell-apply-ansi-color=20(beg=20end=20face)=0A--=20=0A2.21.0=0A=0A= --Apple-Mail=_C06798D8-295E-4113-9A8B-A6540778E10F Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii --Apple-Mail=_C06798D8-295E-4113-9A8B-A6540778E10F-- --Apple-Mail=_BAF05346-57A1-43BA-B7AD-4FA8EBCC3885-- From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2019 11:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Matthew Bauer Cc: 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.15614607283304 (code B ref 36034); Tue, 25 Jun 2019 11:06:01 +0000 Received: (at 36034) by debbugs.gnu.org; 25 Jun 2019 11:05:28 +0000 Received: from localhost ([127.0.0.1]:58713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfjGR-0000rE-Qu for submit@debbugs.gnu.org; Tue, 25 Jun 2019 07:05:28 -0400 Received: from quimby.gnus.org ([80.91.231.51]:46838) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfjGQ-0000r5-Dl for 36034@debbugs.gnu.org; Tue, 25 Jun 2019 07:05:26 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfjGN-0007BN-2x; Tue, 25 Jun 2019 13:05:25 +0200 From: Lars Ingebrigtsen References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEVqhlq8HEWOwMzqJzbx JDbnITb4+DtnYFi6GS+/LkGpFTKDCUjkD3+EP1uBqoLTHj/f+5OGAAACV0lEQVQ4jV3TTWgTURAA 4AeC0YtQ8OhpL6EgvWSR2nqRzvbXEIQs+IMUWtlzscpShV7s4WU9JGigTUE8NIclFy+WSJ4/CN4S D0ohgiyIl9DLnhq6TQ9x5r39S+a28+28mXnZsIlrHRnfYSTmWAy5UWFhvtMRYNSdfsMZnLkzpVIC 38SOcVjm7nngOM5gkEBbfFCHjx/VFjsAhttwpl+WnZKT7qEjHATO9Ec3GNSAdZLmGCcGQA6MJe36 GMhYfvBL01LwecK7qmA3O5UGz/N+SshrWqrCI/DkwFoM7U8/PAVFKvgn4RbBYd5LKvL2EwL9Du5W Lyg4UkDCdFgUog5578/G5T6EgML05dYsAsxdtKx1Ca8RthEW9VnxFWDewnishlUA8Ko1A3DDkpHL 0UwhnNNthGBZNomCFYL5GOS0EgpjEO6BSXmxKQj3wEVSsNZLYKUFSXdNy8bwUH4GqsmaRhJV1OVt U37dpomyCgrd51Up9C125Rpqql3sdhD93t1wDYQlms+uJoD3QVA8lbCZAupzzO6zjBRdwe2uhEnO KgwDH56GJXdRtKk9zlgIW5CI9ps7LJYwb5r3mpNBDJkYDHM14DwGFoFpmsMhQiOCzFZUYAZY0YiB bZ55VQnD8ijQYEU6ig5yEniLkD2BIp5EHSJ4Awu2aNpH2AFnwvcRarVa5QLAQla8EM9wplUeQr9I n/7NSk/YzXfYQXYmCN5j/pSxnmhu+P7xkEcwcPFPytiVXlNs+75/iXNXHcXLJuAN+70vNub9v6pD o8V433zECOh9jH2ZF+I/QIbz8E4uSaIAAAAASUVORK5CYII= Date: Tue, 25 Jun 2019 13:05:22 +0200 In-Reply-To: <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> (Matthew Bauer's message of "Mon, 24 Jun 2019 18:45:51 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matthew Bauer writes: > - (match-end 0) > - (point-min))) > + (progn > + (when (and > + comint-input-ring-file-prefix > + (looking-at (concat > comint-input-ring-separator > + comint-input-ring-file-prefix))) > + ;; Skip z [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Matthew Bauer writes: > - (match-end 0) > - (point-min))) > + (progn > + (when (and > + comint-input-ring-file-prefix > + (looking-at (concat > comint-input-ring-separator > + comint-input-ri= ng-file-prefix))) > + ;; Skip zsh extended_history stamps > + (re-search-forward comint-input-ring-fil= e-prefix > + nil t)) > + (match-end 0)) > > The re-search-forward here doesn't seem necessary -- can't you just go > to (match-end 0) here instead? > > Without re-search-forward, the =E2=80=9Cstart=E2=80=9D integer would just= be the character > right after the newline. re-search-forward skips that prefix. You first do a (looking-at (concat comint-input-ring-separator comint-input-ring-file-pref= ix))) and then (re-search-forward comint-input-ring-file-prefix) This will make point end up at where (match-end 0) would be after the looking-at, surely? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Matthew Bauer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 29 Jun 2019 21:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.156184412919535 (code B ref 36034); Sat, 29 Jun 2019 21:36:02 +0000 Received: (at 36034) by debbugs.gnu.org; 29 Jun 2019 21:35:29 +0000 Received: from localhost ([127.0.0.1]:44972 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhL0K-000551-Sf for submit@debbugs.gnu.org; Sat, 29 Jun 2019 17:35:29 -0400 Received: from mail-qt1-f180.google.com ([209.85.160.180]:41235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hhL0I-00054o-Tt for 36034@debbugs.gnu.org; Sat, 29 Jun 2019 17:35:27 -0400 Received: by mail-qt1-f180.google.com with SMTP id d17so10408314qtj.8 for <36034@debbugs.gnu.org>; Sat, 29 Jun 2019 14:35:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=iFXB/0gNsWCtEzVNZ1I3ix4MHp3mIx5WIVLB7EA1yZo=; b=mIXw17msTBdTycVHQFRlKQ0Tyyd3kn1t0YthkiXdBFIbhDK8hkcwYFsIViAltpAMCv R/MLYor1WngkSl1v9C4Ze909tLVdl4X1X3Po8ACktywcd1YvsNzfxG3S+SHlK4CQZyiV lRUzGVngCUbh2YvoxjpIa+b9OIsF8g++xW7hdfJAKcA0BvD6mBtkJSJd2wpY+oNbqZFx siLiSVBrs755ScIwdaMkq847G0o6MT7JgbrdJgcxEG/Bybz3ZjWM1HcsvlPsXwPq8kOx 1O83ZZV+ZRErx1kSqeoE12k3xx0gnyowqXdxLpyTei2sRrV2mwLLW7GU6dJsrKRUJjgU Mx2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=iFXB/0gNsWCtEzVNZ1I3ix4MHp3mIx5WIVLB7EA1yZo=; b=EYuFfCkw1JYAPrjQzID8LNaau9Pli6IQL2yJlc0WqIs8oUzqz7Px997K8fMIRQ0Oxh y/056YPv7KHXI3V8sENw7S3Em5dXq+FwNkF861Av+bs88nlxG+zcPtHxdMYffWhfVVpT TgvICo/MyTMHBX6wjWhLR9OgGbzbJmrgaHTEXQdDf4JU38jQjvKkzQivbzpZje8TsWTJ I4296UNvhO1MPkx6TDSZU8Z8Q7GE7YaWGF7uEJBfNip5ZeqjatbOatoDzEj3WBY0bjMr qfdPJ85uZkmgI+Ts9PS1QDzkIPPAhQ5e9j7Aa7Ikt0R4mJcbRhb+1+RDW3+CnJ7cZOml YhVA== X-Gm-Message-State: APjAAAUT99qdZ68Gb+3uHqh0DtbwppDs8EY5l9V6vAFFLHzUfRWTWEsv r+ZdJ4bSbB9wPlpnzfiP6mw= X-Google-Smtp-Source: APXvYqwrF5GXaE4Qt3GTpDhJZeRE/7rh2eELyZv1UNhK83YCuEhwq2U9v3RN22sPj8M4zI9hC+42QQ== X-Received: by 2002:a0c:b7a8:: with SMTP id l40mr14465944qve.142.1561844121088; Sat, 29 Jun 2019 14:35:21 -0700 (PDT) Received: from matthewsmacbook.home (ool-457386fe.dyn.optonline.net. [69.115.134.254]) by smtp.gmail.com with ESMTPSA id o54sm3213235qtb.63.2019.06.29.14.35.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 29 Jun 2019 14:35:20 -0700 (PDT) From: Matthew Bauer Message-Id: <3761BF5D-AD36-4F7D-8518-CEFD3A3AC6E6@gmail.com> Content-Type: multipart/mixed; boundary="Apple-Mail=_2DCFBCEE-AC5B-4EBD-B21F-34F6283C9E5D" Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3560.7\)) Date: Sat, 29 Jun 2019 17:35:19 -0400 In-Reply-To: References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> X-Mailer: Apple Mail (2.3560.7) X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --Apple-Mail=_2DCFBCEE-AC5B-4EBD-B21F-34F6283C9E5D Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii > On Jun 25, 2019, at 7:05 AM, Lars Ingebrigtsen wrote: > This will make point end up at where (match-end 0) would be after the > looking-at, surely? > Ok yeah that simplified things a bit. Attached an updated version. --Apple-Mail=_2DCFBCEE-AC5B-4EBD-B21F-34F6283C9E5D Content-Disposition: attachment; filename=0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch" Content-Transfer-Encoding: quoted-printable =46rom=20286ceba115b3deabfd90e589c3dbebf03a992e25=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Matthew=20Bauer=20=0A= Date:=20Sun,=2023=20Jun=202019=2018:08:32=20-0400=0ASubject:=20[PATCH]=20= Add=20zsh=20extended_history=20handling=20for=20comint.el=20input=20ring=0A= MIME-Version:=201.0=0AContent-Type:=20text/plain;=20charset=3DUTF-8=0A= Content-Transfer-Encoding:=208bit=0A=0AAdds=20handling=20of=20the=20Zsh=20= extended_history=20to=20comint.el=20input=0Aring.=20This=20means=20that=20= the=20timestamp=20doesn=E2=80=99t=20show=20up=20when=20reading=0Athrough=20= history=20from=20other=20shells.=20The=20lines=20look=20like=20this:=0A=0A= :=20:;=0A=0AThis=20patch=20= skips=20the=20part=20before=20=20when=20the=20=E2=80=98shell=E2=80= =99=20is=0Azsh.=20This=20is=20done=20through=20the=20= comint-input-ring-file-prefix=0Avariable.=20When=20set,=20this=20will=20= skip=20a=20prefix=20of=20the=20file=20when=20loading=0Ainto=20the=20= input=20ring.=20This=20matches=20the=20behavior=20of=20Zsh.=20Zsh=20= documents=0Ait=20here:=0A=0A= http://zsh.sourceforge.net/Doc/Release/Options.html#History=0A---=0A=20= lisp/comint.el=20|=2018=20++++++++++++++++--=0A=20lisp/shell.el=20=20|=20= =206=20+++++-=0A=202=20files=20changed,=2021=20insertions(+),=203=20= deletions(-)=0A=0Adiff=20--git=20a/lisp/comint.el=20b/lisp/comint.el=0A= index=2056e38e24ac..6d4293b722=20100644=0A---=20a/lisp/comint.el=0A+++=20= b/lisp/comint.el=0A@@=20-249,6=20+249,10=20@@=20to=20set=20this=20in=20a=20= mode=20hook,=20rather=20than=20customize=20the=20default=20value."=0A=20=09= =09=20file)=0A=20=20=20:group=20'comint)=0A=20=0A+(defvar=20= comint-input-ring-file-prefix=20nil=0A+=20=20"The=20prefix=20to=20skip=20= when=20parsing=20the=20input=20ring=20file.=0A+This=20is=20useful=20in=20= Zsh=20when=20the=20extended_history=20option=20is=20on.")=0A+=0A=20= (defcustom=20comint-scroll-to-bottom-on-input=20nil=0A=20=20=20"Controls=20= whether=20input=20to=20interpreter=20causes=20window=20to=20scroll.=0A=20= If=20nil,=20then=20do=20not=20scroll.=20=20If=20t=20or=20`all',=20scroll=20= all=20windows=20showing=20buffer.=0A@@=20-978,8=20+982,18=20@@=20See=20= also=20`comint-input-ignoredups'=20and=20`comint-write-input-ring'."=0A=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20start=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20= (re-search-backward=20comint-input-ring-separator=0A=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20nil=20t)=0A-=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (match-end=200)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(point-min)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(progn=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (when=20comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20;;=20Skip=20= zsh=20extended_history=20stamps=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(re-search-forward=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20nil=20t))=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(match-end=20= 0))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20(progn=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(goto-char=20(point-min))=0A+=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(when=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(re-search-forward=20= comint-input-ring-file-prefix=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20nil=20t))=0A+=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(point))))=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(setq=20history=20= (buffer-substring=20start=20end))=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(goto-char=20start)=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20(when=20(and=20(not=20(string-match=20= comint-input-history-ignore=0Adiff=20--git=20a/lisp/shell.el=20= b/lisp/shell.el=0Aindex=20e30825cd66..25f6892d96=20100644=0A---=20= a/lisp/shell.el=0A+++=20b/lisp/shell.el=0A@@=20-600,7=20+600,11=20@@=20= buffer."=0A=20=20=20=20=20=20=20;;=20Bypass=20a=20bug=20in=20certain=20= versions=20of=20bash.=0A=20=20=20=20=20=20=20(when=20(string-equal=20= shell=20"bash")=0A=20=20=20=20=20=20=20=20=20(add-hook=20= 'comint-preoutput-filter-functions=0A-=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20'shell-filter-ctrl-a-ctrl-b=20nil=20t)))=0A+=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20'shell-filter-ctrl-a-ctrl-b=20= nil=20t))=0A+=0A+=20=20=20=20=20=20;;=20Skip=20extended=20history=20for=20= zsh.=0A+=20=20=20=20=20=20(when=20(string-equal=20shell=20"zsh")=0A+=20=20= =20=20=20=20=20=20(setq-local=20comint-input-ring-file-prefix=20":=20= [[:digit:]]+:[[:digit:]]+;")))=0A=20=20=20=20=20(comint-read-input-ring=20= t)))=0A=20=0A=20(defun=20shell-apply-ansi-color=20(beg=20end=20face)=0A= --=20=0A2.22.0=0A=0A= --Apple-Mail=_2DCFBCEE-AC5B-4EBD-B21F-34F6283C9E5D-- From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jul 2019 13:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Matthew Bauer Cc: 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.15622474557197 (code B ref 36034); Thu, 04 Jul 2019 13:38:02 +0000 Received: (at 36034) by debbugs.gnu.org; 4 Jul 2019 13:37:35 +0000 Received: from localhost ([127.0.0.1]:50581 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hj1vb-0001s1-Gf for submit@debbugs.gnu.org; Thu, 04 Jul 2019 09:37:35 -0400 Received: from quimby.gnus.org ([80.91.231.51]:37468) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hj1vZ-0001rq-LO for 36034@debbugs.gnu.org; Thu, 04 Jul 2019 09:37:34 -0400 Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hj1vV-0001zo-Ct; Thu, 04 Jul 2019 15:37:31 +0200 From: Lars Ingebrigtsen References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> <3761BF5D-AD36-4F7D-8518-CEFD3A3AC6E6@gmail.com> Date: Thu, 04 Jul 2019 15:37:29 +0200 In-Reply-To: <3761BF5D-AD36-4F7D-8518-CEFD3A3AC6E6@gmail.com> (Matthew Bauer's message of "Sat, 29 Jun 2019 17:35:19 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matthew Bauer writes: > (setq start > (if (re-search-backward comint-input-ring-separator > nil t) > - (match-end 0) > - (point-min))) > + (progn > + (when comint-input-ring-file-prefix > + ;; Skip zsh extended_history sta [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Matthew Bauer writes: > (setq start > (if (re-search-backward comint-input-ring-separator > nil t) > - (match-end 0) > - (point-min))) > + (progn > + (when comint-input-ring-file-prefix > + ;; Skip zsh extended_history stamps > + (re-search-forward comint-input-ring-file-prefix > + nil t)) > + (match-end 0)) Hm... I don't think this is right, either. If the re-search-forward fails, then (match-end 0) will fail, too. And since (if I understood correctly), the prefix will follow on directly from where point it, using looking-at would be better, anyway... > ;; Bypass a bug in certain versions of bash. > (when (string-equal shell "bash") > (add-hook 'comint-preoutput-filter-functions > - 'shell-filter-ctrl-a-ctrl-b nil t))) > + 'shell-filter-ctrl-a-ctrl-b nil t)) > + > + ;; Skip extended history for zsh. > + (when (string-equal shell "zsh") > + (setq-local comint-input-ring-file-prefix ": [[:digit:]]+:[[:digit:]]+;"))) > (comint-read-input-ring t))) And this bit didn't apply. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 20 Jan 2020 19:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen Cc: Matthew Bauer , 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.157954944130328 (code B ref 36034); Mon, 20 Jan 2020 19:44:02 +0000 Received: (at 36034) by debbugs.gnu.org; 20 Jan 2020 19:44:01 +0000 Received: from localhost ([127.0.0.1]:46096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itcxt-0007t5-Cg for submit@debbugs.gnu.org; Mon, 20 Jan 2020 14:44:01 -0500 Received: from ted.gofardesign.uk ([67.225.143.91]:40346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1itcxr-0007sp-Ie for 36034@debbugs.gnu.org; Mon, 20 Jan 2020 14:44:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=marxist.se; s=default; 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=ZfdwDzVqRrRBRt/mGKufT+ICLa/UeW6RZkEYRLQRnyw=; b=KONdHDQkDsKG2cRdzwofrrjx/Y vOaZLb5iiB9ZgRUP6PoPVX/nx69VAur+oDhSEJeDVzpOv8cFWiVfmsWvbcqDOozBMR1Ic1dSGY4E8 lrKsKH8Ww43ScMxNrQkapsXIJMQ1hHQE6hQajCzcrwQn3+ZOADutRzUV3JDUaOcZ7KJajDbtMD61T JYBR1e4JdYCntRu8QZdGeea6H7BmV83xxXbJDgaK7R+nf52SoFdwHDbkRDff4IdDgzyRV++StupzN jb7xID6exglyLOdtrnZ84xif0ZkYbesWFXBcYOq4prAzcjldymg9dib1mGXGi8veDiWCYqkIoDSOH 7ZDh4gkw==; Received: from h-70-69.a785.priv.bahnhof.se ([155.4.70.69]:36104 helo=localhost) by ted.gofardesign.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1itcxl-0003vF-Cw; Mon, 20 Jan 2020 14:43:53 -0500 From: Stefan Kangas In-Reply-To: (Lars Ingebrigtsen's message of "Thu, 04 Jul 2019 15:37:29 +0200") References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> <3761BF5D-AD36-4F7D-8518-CEFD3A3AC6E6@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Mon, 20 Jan 2020 20:43:51 +0100 Message-ID: <875zh5syko.fsf@marxist.se> MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - ted.gofardesign.uk X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - marxist.se X-Get-Message-Sender-Via: ted.gofardesign.uk: authenticated_id: stefan@marxist.se X-Authenticated-Sender: ted.gofardesign.uk: stefan@marxist.se X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Matthew Bauer writes: > >> (setq start >> (if (re-search-backward comint-input-ring-separator >> nil t) >> - (match-end 0) >> - (point-min))) >> + (progn >> + (when comint-input-ring-file-prefix >> + ;; Skip zsh extended_history stamps >> + (re-search-forward comint-input-ring-file-prefix >> + nil t)) >> + (match-end 0)) > > Hm... I don't think this is right, either. If the re-search-forward > fails, then (match-end 0) will fail, too. And since (if I understood > correctly), the prefix will follow on directly from where point it, > using looking-at would be better, anyway... > >> ;; Bypass a bug in certain versions of bash. >> (when (string-equal shell "bash") >> (add-hook 'comint-preoutput-filter-functions >> - 'shell-filter-ctrl-a-ctrl-b nil t))) >> + 'shell-filter-ctrl-a-ctrl-b nil t)) >> + >> + ;; Skip extended history for zsh. >> + (when (string-equal shell "zsh") >> + (setq-local comint-input-ring-file-prefix ": [[:digit:]]+:[[:digit:]]+;"))) >> (comint-read-input-ring t))) > > And this bit didn't apply. That was 7 months ago. Did you have any time to look into the comments by Lars above? Thanks. Best regards, Stefan Kangas From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Matthew Bauer Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Mar 2020 15:06:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Lars Ingebrigtsen , Stefan Kangas , 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.158454393116708 (code B ref 36034); Wed, 18 Mar 2020 15:06:01 +0000 Received: (at 36034) by debbugs.gnu.org; 18 Mar 2020 15:05:31 +0000 Received: from localhost ([127.0.0.1]:41035 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEaGA-0004LP-OW for submit@debbugs.gnu.org; Wed, 18 Mar 2020 11:05:31 -0400 Received: from mail-il1-f181.google.com ([209.85.166.181]:33118) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jEaG8-0004LB-GM for 36034@debbugs.gnu.org; Wed, 18 Mar 2020 11:05:29 -0400 Received: by mail-il1-f181.google.com with SMTP id k29so23985490ilg.0 for <36034@debbugs.gnu.org>; Wed, 18 Mar 2020 08:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=nhrHCCraXLdwYrHJR4YmIGWAT53SONBQqd/YHr+ExjQ=; b=hmop0uWtN+ojBiH0byyHXutcKBAM5w+Yhm2MkA3f0Kz83l8nmtWio1Sq2MK2EbM26M m7rm2Lwf+9UiA2k8hWs9zHBZJi8BlnIzCBJjJloYmUnFZroBNGfaGx6YrH0Uuf+R6bFK MBZ145Ymgb29bhCfwxu1qycJCAdQ+wWNlnMyHwiQKgxwQE3pM8leJEpkRNI522Ug8fmm ZyLXeo76Eb2VqNyVCFpItk+CSsIXlFSkWtRZfYVAxxmpiYb1t85LwvClzsPP7I0wehrw MwHnIvMk06nq9K89xV6hZuP4OL0tw2tKQGVoJTe4gmB/ngn0FZFCEUHRPfmzHu+Si4xX qo7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=nhrHCCraXLdwYrHJR4YmIGWAT53SONBQqd/YHr+ExjQ=; b=WPLRYZ+E9fSSKIUarq0XpPImufewQxNUxnSq6YJANmKjUnCC1TuSy2DraQ7sDagtGB yFjZ9+qvMWOz+GWkcZkZuOJmp31YrwmzHakp0vmVh6DcXoiGQCuTI/Bjh81zBb50apAx JGnMRQ4SyDJsiXM9CkkpnbWRpHz8M1lF+dZ0Q1nrPJW/Rss6AbsOeCQP0T5E6kf59dE2 v138jjuyhW80p7Ir72/l7bEbE/Qa9+s+eo/x7Jaiam47pLansIXrNke2Z5rMIRM6yohT hfVRYAyYvwQubs3tXc1EwMxq5dbaIWSiJxgbSoWzlWVXfjlC6UgX7Zhd0N6D2HQzYHgf R3UQ== X-Gm-Message-State: ANhLgQ1lr9WwL0qwm2RZTKyOfCxgezffU5ElEH0As7O2aQ+hsl58u9xD lHv/SX8GSl16D+UJLwnQBIjPF+NCN4LRYcAjxB4= X-Google-Smtp-Source: ADFU+vuiTlTdpxygdKqywQbCsDpJKV+bL93q+TSiblvf+o70pLVEFKCWhOx+r0uDNx+ffweFAsFTQFbP2pu7w4P+iz8= X-Received: by 2002:a92:3d8c:: with SMTP id k12mr4473194ilf.7.1584543921928; Wed, 18 Mar 2020 08:05:21 -0700 (PDT) MIME-Version: 1.0 References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> <3761BF5D-AD36-4F7D-8518-CEFD3A3AC6E6@gmail.com> In-Reply-To: From: Matthew Bauer Date: Wed, 18 Mar 2020 11:05:09 -0400 Message-ID: Content-Type: multipart/mixed; boundary="0000000000009a2a5205a122610e" X-Spam-Score: 0.3 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0000000000009a2a5205a122610e Content-Type: multipart/alternative; boundary="0000000000009a2a4f05a122610c" --0000000000009a2a4f05a122610c Content-Type: text/plain; charset="UTF-8" Sorry for the late reply. Attached is the updated patch, using looking-at and on top of latest Emacs master. On Thu, Jul 4, 2019 at 9:37 AM Lars Ingebrigtsen wrote: > Matthew Bauer writes: > > > (setq start > > (if (re-search-backward > comint-input-ring-separator > > nil t) > > - (match-end 0) > > - (point-min))) > > + (progn > > + (when comint-input-ring-file-prefix > > + ;; Skip zsh extended_history stamps > > + (re-search-forward > comint-input-ring-file-prefix > > + nil t)) > > + (match-end 0)) > > Hm... I don't think this is right, either. If the re-search-forward > fails, then (match-end 0) will fail, too. And since (if I understood > correctly), the prefix will follow on directly from where point it, > using looking-at would be better, anyway... > > > ;; Bypass a bug in certain versions of bash. > > (when (string-equal shell "bash") > > (add-hook 'comint-preoutput-filter-functions > > - 'shell-filter-ctrl-a-ctrl-b nil t))) > > + 'shell-filter-ctrl-a-ctrl-b nil t)) > > + > > + ;; Skip extended history for zsh. > > + (when (string-equal shell "zsh") > > + (setq-local comint-input-ring-file-prefix ": > [[:digit:]]+:[[:digit:]]+;"))) > > (comint-read-input-ring t))) > > And this bit didn't apply. > > -- > (domestic pets only, the antidote for overdose, milk.) > bloggy blog: http://lars.ingebrigtsen.no > --0000000000009a2a4f05a122610c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Sorry for=C2=A0the late reply. Attached is the updated pat= ch, using looking-at and on top of latest=C2=A0Emacs master.

On Thu, Jul 4, = 2019 at 9:37 AM Lars Ingebrigtsen <lar= si@gnus.org> wrote:
Matthew Bauer <mjbauer95@gmail.com> writes:

>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(s= etq start
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0(if (re-search-backward comint-input-ring-separator
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nil t)
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0(match-end 0)
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0(point-min)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0(progn
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(when comint-input-ring-file-prefix
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Skip zsh extended_history stam= ps
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(re-search-forward comint-input-r= ing-file-prefix
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil t))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(match-end 0))

Hm...=C2=A0 I don't think this is right, either.=C2=A0 If the re-search= -forward
fails, then (match-end 0) will fail, too.=C2=A0 And since (if I understood<= br> correctly), the prefix will follow on directly from where point it,
using looking-at would be better, anyway...

>=C2=A0 =C2=A0 =C2=A0 =C2=A0 ;; Bypass a bug in certain versions of bash= .
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (when (string-equal shell "bash")=
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (add-hook 'comint-preoutput-filt= er-functions
> -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 's= hell-filter-ctrl-a-ctrl-b nil t)))
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 's= hell-filter-ctrl-a-ctrl-b nil t))
> +
> +=C2=A0 =C2=A0 =C2=A0 ;; Skip extended history for zsh.
> +=C2=A0 =C2=A0 =C2=A0 (when (string-equal shell "zsh")
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq-local comint-input-ring-file-prefix= ": [[:digit:]]+:[[:digit:]]+;")))
>=C2=A0 =C2=A0 =C2=A0 (comint-read-input-ring t)))

And this bit didn't apply.

--
(domestic pets only, the antidote for overdose, milk.)
=C2=A0 =C2=A0bloggy blog: http://lars.ingebrigtsen.no
--0000000000009a2a4f05a122610c-- --0000000000009a2a5205a122610e Content-Type: text/x-patch; charset="UTF-8"; name="0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch" Content-Disposition: attachment; filename="0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_k7xgj2kl0 RnJvbSAwNDI3NTRkZmE4NzVhMWJkMTY5YjZmZjIyNDdlYzk0Yzc1ZTFmNzg5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBNYXR0aGV3IEJhdWVyIDxtamJhdWVyOTVAZ21haWwuY29tPgpE YXRlOiBXZWQsIDE4IE1hciAyMDIwIDEwOjU5OjQ1IC0wNDAwClN1YmplY3Q6IFtQQVRDSF0gQWRk IHpzaCBleHRlbmRlZF9oaXN0b3J5IGhhbmRsaW5nIGZvciBjb21pbnQuZWwgaW5wdXQgcmluZwpN SU1FLVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRGLTgK Q29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogOGJpdAoKQWRkcyBoYW5kbGluZyBvZiB0aGUgWnNo IGV4dGVuZGVkX2hpc3RvcnkgdG8gY29taW50LmVsIGlucHV0CnJpbmcuIFRoaXMgbWVhbnMgdGhh dCB0aGUgdGltZXN0YW1wIGRvZXNu4oCZdCBzaG93IHVwIHdoZW4gcmVhZGluZwp0aHJvdWdoIGhp c3RvcnkgZnJvbSBvdGhlciBzaGVsbHMuIFRoZSBsaW5lcyBsb29rIGxpa2UgdGhpczoKCjogPGJl Z2lubmluZyB0aW1lPjo8ZWxhcHNlZCBzZWNvbmRzPjs8Y29tbWFuZD4KClRoaXMgcGF0Y2ggc2tp cHMgdGhlIHBhcnQgYmVmb3JlIDxjb21tYW5kPiB3aGVuIHRoZSDigJhzaGVsbOKAmSBpcwp6c2gu IFRoaXMgaXMgZG9uZSB0aHJvdWdoIHRoZSBjb21pbnQtaW5wdXQtcmluZy1maWxlLXByZWZpeAp2 YXJpYWJsZS4gV2hlbiBzZXQsIHRoaXMgd2lsbCBza2lwIGEgcHJlZml4IG9mIHRoZSBmaWxlIHdo ZW4gbG9hZGluZwppbnRvIHRoZSBpbnB1dCByaW5nLiBUaGlzIG1hdGNoZXMgdGhlIGJlaGF2aW9y IG9mIFpzaC4gWnNoIGRvY3VtZW50cwppdCBoZXJlOgoKaHR0cDovL3pzaC5zb3VyY2Vmb3JnZS5u ZXQvRG9jL1JlbGVhc2UvT3B0aW9ucy5odG1sI0hpc3RvcnkKLS0tCiBsaXNwL2NvbWludC5lbCB8 IDIwICsrKysrKysrKysrKysrKysrKy0tCiBsaXNwL3NoZWxsLmVsICB8ICA2ICsrKysrLQogMiBm aWxlcyBjaGFuZ2VkLCAyMyBpbnNlcnRpb25zKCspLCAzIGRlbGV0aW9ucygtKQoKZGlmZiAtLWdp dCBhL2xpc3AvY29taW50LmVsIGIvbGlzcC9jb21pbnQuZWwKaW5kZXggZWEwNmY4YWY4Ny4uMDM4 OThjMzAyNyAxMDA2NDQKLS0tIGEvbGlzcC9jb21pbnQuZWwKKysrIGIvbGlzcC9jb21pbnQuZWwK QEAgLTI0OSw2ICsyNDksMTAgQEAgdG8gc2V0IHRoaXMgaW4gYSBtb2RlIGhvb2ssIHJhdGhlciB0 aGFuIGN1c3RvbWl6ZSB0aGUgZGVmYXVsdCB2YWx1ZS4iCiAJCSBmaWxlKQogICA6Z3JvdXAgJ2Nv bWludCkKIAorKGRlZnZhciBjb21pbnQtaW5wdXQtcmluZy1maWxlLXByZWZpeCBuaWwKKyAgIlRo ZSBwcmVmaXggdG8gc2tpcCB3aGVuIHBhcnNpbmcgdGhlIGlucHV0IHJpbmcgZmlsZS4KK1RoaXMg aXMgdXNlZnVsIGluIFpzaCB3aGVuIHRoZSBleHRlbmRlZF9oaXN0b3J5IG9wdGlvbiBpcyBvbi4i KQorCiAoZGVmY3VzdG9tIGNvbWludC1zY3JvbGwtdG8tYm90dG9tLW9uLWlucHV0IG5pbAogICAi Q29udHJvbHMgd2hldGhlciBpbnB1dCB0byBpbnRlcnByZXRlciBjYXVzZXMgd2luZG93IHRvIHNj cm9sbC4KIElmIG5pbCwgdGhlbiBkbyBub3Qgc2Nyb2xsLiAgSWYgdCBvciBgYWxsJywgc2Nyb2xs IGFsbCB3aW5kb3dzIHNob3dpbmcgYnVmZmVyLgpAQCAtOTg3LDggKzk5MSwyMCBAQCBTZWUgYWxz byBgY29taW50LWlucHV0LWlnbm9yZWR1cHMnIGFuZCBgY29taW50LXdyaXRlLWlucHV0LXJpbmcn LiIKICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGVuZCAobWF0Y2gtYmVnaW5uaW5n IDApKSkKICAgICAgICAgICAgICAgICAgKHNldHEgc3RhcnQKICAgICAgICAgICAgICAgICAgICAg ICAgKGlmIChyZS1zZWFyY2gtYmFja3dhcmQgcmluZy1zZXBhcmF0b3IgbmlsIHQpCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAobWF0Y2gtZW5kIDApCi0gICAgICAgICAgICAgICAgICAgICAg ICAgKHBvaW50LW1pbikpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKHByb2duCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICh3aGVuIChhbmQgY29taW50LWlucHV0LXJpbmctZmls ZS1wcmVmaXgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobG9va2lu Zy1hdCBjb21pbnQtaW5wdXQtcmluZy1maWxlLXByZWZpeCkpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOzsgU2tpcCB6c2ggZXh0ZW5kZWRfaGlzdG9yeSBzdGFtcHMKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAocmUtc2VhcmNoLWZvcndhcmQgY29taW50LWlucHV0LXJp bmctZmlsZS1wcmVmaXgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgbmlsIHQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2gtZW5k IDApKQorICAgICAgICAgICAgICAgICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGdvdG8tY2hhciAocG9pbnQtbWluKSkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICh3aGVuIChhbmQgY29taW50LWlucHV0LXJpbmctZmlsZS1wcmVmaXgKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxvb2tpbmctYXQgY29taW50LWlucHV0LXJpbmct ZmlsZS1wcmVmaXgpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocmUtc2VhcmNoLWZv cndhcmQgY29taW50LWlucHV0LXJpbmctZmlsZS1wcmVmaXgKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5pbCB0KSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgIChwb2ludCkpKSkKICAgICAgICAgICAgICAgICAgKHNldHEgaGlzdG9yeSAoYnVmZmVy LXN1YnN0cmluZyBzdGFydCBlbmQpKQogICAgICAgICAgICAgICAgICAoZ290by1jaGFyIHN0YXJ0 KQogICAgICAgICAgICAgICAgICAod2hlbiAoYW5kIChub3QgKHN0cmluZy1tYXRjaCBoaXN0b3J5 LWlnbm9yZSBoaXN0b3J5KSkKZGlmZiAtLWdpdCBhL2xpc3Avc2hlbGwuZWwgYi9saXNwL3NoZWxs LmVsCmluZGV4IDFlMjY3OWY3MjMuLjNhNjM5NDk4MjEgMTAwNjQ0Ci0tLSBhL2xpc3Avc2hlbGwu ZWwKKysrIGIvbGlzcC9zaGVsbC5lbApAQCAtNjIyLDcgKzYyMiwxMSBAQCBidWZmZXIuIgogICAg ICAgOzsgQnlwYXNzIGEgYnVnIGluIGNlcnRhaW4gdmVyc2lvbnMgb2YgYmFzaC4KICAgICAgICh3 aGVuIChzdHJpbmctZXF1YWwgc2hlbGwgImJhc2giKQogICAgICAgICAoYWRkLWhvb2sgJ2NvbWlu dC1wcmVvdXRwdXQtZmlsdGVyLWZ1bmN0aW9ucwotICAgICAgICAgICAgICAgICAgIydzaGVsbC1m aWx0ZXItY3RybC1hLWN0cmwtYiBuaWwgdCkpKQorICAgICAgICAgICAgICAgICAgIydzaGVsbC1m aWx0ZXItY3RybC1hLWN0cmwtYiBuaWwgdCkpCisKKyAgICAgIDs7IFNraXAgZXh0ZW5kZWQgaGlz dG9yeSBmb3IgenNoLgorICAgICAgKHdoZW4gKHN0cmluZy1lcXVhbCBzaGVsbCAienNoIikKKyAg ICAgICAgKHNldHEtbG9jYWwgY29taW50LWlucHV0LXJpbmctZmlsZS1wcmVmaXggIjogW1s6ZGln aXQ6XV0rOltbOmRpZ2l0Ol1dKzsiKSkpCiAgICAgKGNvbWludC1yZWFkLWlucHV0LXJpbmcgdCkp KQogCiAoZGVmdW4gc2hlbGwtYXBwbHktYW5zaS1jb2xvciAoYmVnIGVuZCBmYWNlKQotLSAKMi4y My4xCgo= --0000000000009a2a5205a122610e-- From unknown Sun Jun 15 08:50:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 Aug 2020 11:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36034 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Matthew Bauer Cc: Stefan Kangas , 36034@debbugs.gnu.org Received: via spool by 36034-submit@debbugs.gnu.org id=B36034.15970579106542 (code B ref 36034); Mon, 10 Aug 2020 11:12:01 +0000 Received: (at 36034) by debbugs.gnu.org; 10 Aug 2020 11:11:50 +0000 Received: from localhost ([127.0.0.1]:34642 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55iX-0001hP-KB for submit@debbugs.gnu.org; Mon, 10 Aug 2020 07:11:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55iV-0001h5-Sy for 36034@debbugs.gnu.org; Mon, 10 Aug 2020 07:11:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: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=PkRmS8qxp0axRlUYiPWKsm/1wPq+L77qeIq5r7jkBzQ=; b=QEua+P+hoEf9Ep1I77Z93N9x4e jz+afzgd2Y7YwEwSN1a83ctf+BaU31EfjYPxYRNkhJ3pSD01az2kLf5QJrRohzWSM/oY9QAf6M2yN Ct3f4ODS4O8Sptiw/nI1r1FAaDVYLSF0pugr9Q00X+mHeWBTj+C7fK68HEz5SJeAHMJs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k55iM-0003Cn-CB; Mon, 10 Aug 2020 13:11:41 +0200 From: Lars Ingebrigtsen References: <87woi6e58r.fsf@gmail.com> <87E1A7E1-B0B3-45F9-9282-82A19DDB2516@gmail.com> <3FE84EF1-D1F2-4F8B-B89C-C147C922F32D@gmail.com> <3761BF5D-AD36-4F7D-8518-CEFD3A3AC6E6@gmail.com> Date: Mon, 10 Aug 2020 13:11:32 +0200 In-Reply-To: (Matthew Bauer's message of "Wed, 18 Mar 2020 11:05:09 -0400") Message-ID: <87mu327o2j.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Matthew Bauer writes: > Adds handling of the Zsh extended_history to comint.el input > ring. This means that the timestamp =?UTF-8?Q?doesn=E2=80=99t?= show up when reading > through history from other shells. The lines look like this: > > : [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Matthew Bauer writes: > Adds handling of the Zsh extended_history to comint.el input > ring. This means that the timestamp doesn=E2=80=99t show up when reading > through history from other shells. The lines look like this: > > : :; Thanks; I applied your patch (with some changes -- I replaced a couple of re-search-forwards that didn't seem to do much more than (goto (match-end 0))). Please check that I didn't mess something up when doing that fix. :-) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 10 07:11:56 2020 Received: (at control) by debbugs.gnu.org; 10 Aug 2020 11:11:56 +0000 Received: from localhost ([127.0.0.1]:34645 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55id-0001hj-Vd for submit@debbugs.gnu.org; Mon, 10 Aug 2020 07:11:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k55ic-0001hO-87 for control@debbugs.gnu.org; Mon, 10 Aug 2020 07:11:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iOpK3cqMRp0waOoCfLV08ddLYqwhEPCn1hx4WVOFY7o=; b=hiRTThXNWKr10IJQxNyBDWOzvo qDhMy3pec7czIV6qWX96RktBNQXnrYNzIUkIVkDAhoOJE007C/mLPZXeW6vx6wZVsIQud+07rH/2A n/ksHCZxEhF8TMZztFBWCujzCVMNsHMKgH18ZJVWCbdS+5On+Xrsqp6lQobe7yw2OBUw=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k55iU-0003Cu-8C for control@debbugs.gnu.org; Mon, 10 Aug 2020 13:11:48 +0200 Date: Mon, 10 Aug 2020 13:11:44 +0200 Message-Id: <87lfim7o27.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #36034 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 36034 fixed close 36034 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 36034 fixed close 36034 28.1 quit