GNU bug report logs - #36034
[PATCH] Zsh extended_history shows up in comint input ring

Previous Next

Package: emacs;

Reported by: Matthew Bauer <mjbauer95 <at> gmail.com>

Date: Fri, 31 May 2019 20:43:02 UTC

Severity: normal

Tags: fixed, patch

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matthew Bauer <mjbauer95 <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Stefan Kangas <stefan <at> marxist.se>, 36034 <at> debbugs.gnu.org
Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring
Date: Wed, 18 Mar 2020 11:05:09 -0400
[Message part 1 (text/plain, inline)]
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 <larsi <at> gnus.org> wrote:

> Matthew Bauer <mjbauer95 <at> gmail.com> 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
>
[Message part 2 (text/html, inline)]
[0001-Add-zsh-extended_history-handling-for-comint.el-inpu.patch (text/x-patch, attachment)]

This bug report was last modified 4 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.