unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Matthew Bauer <mjbauer95@gmail.com>, 36034@debbugs.gnu.org
Subject: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring
Date: Mon, 20 Jan 2020 20:43:51 +0100	[thread overview]
Message-ID: <875zh5syko.fsf@marxist.se> (raw)
In-Reply-To: <m3k1cx7wfa.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 04 Jul 2019 15:37:29 +0200")

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Matthew Bauer <mjbauer95@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.

That was 7 months ago.  Did you have any time to look into the
comments by Lars above?  Thanks.

Best regards,
Stefan Kangas





  reply	other threads:[~2020-01-20 19:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 20:30 bug#36034: [PATCH] Zsh extended_history shows up in comint input ring Matthew Bauer
2019-06-23 16:53 ` Lars Ingebrigtsen
2019-06-23 22:27   ` Matthew Bauer
2019-06-24 10:51     ` Lars Ingebrigtsen
2019-06-24 10:51     ` Lars Ingebrigtsen
2019-06-24 22:45       ` Matthew Bauer
2019-06-25 11:05         ` Lars Ingebrigtsen
2019-06-29 21:35           ` Matthew Bauer
2019-07-04 13:37             ` Lars Ingebrigtsen
2020-01-20 19:43               ` Stefan Kangas [this message]
2020-03-18 15:05               ` Matthew Bauer
2020-08-10 11:11                 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=875zh5syko.fsf@marxist.se \
    --to=stefan@marxist.se \
    --cc=36034@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=mjbauer95@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).