zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Re: PATCH: parse from even deeper in hell
Date: Mon, 23 Feb 2015 09:54:43 +0000	[thread overview]
Message-ID: <20150223095443.028f0905@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <20150222182619.1851e983@ntlworld.com>

Apparently this message from Mikael didn't go to the list...

I've shortened the quotation.

I'll reply to it separately.

pws

On Sun, Feb 22, 2015 at 7:26 PM, Peter Stephenson
<p.w.stephenson@ntlworld.com> wrote:
> On Fri, 20 Feb 2015 11:12:39 +0100
> Mikael Magnusson <mikachu@gmail.com> wrote:
>> > The question is where to put this in on history read.  I think it's
>> > going to affect non-lexical history, too, but the error on reading won't
>> > be flagged up.
>>
>> I don't think so, unmetafy() doesn't care about the table. And as I
>> checked earlier, both the old and new version of the string in my
>> history file is unmetafied to the correct UTF-8 string. The 'only'
>> problem is that the lexer is looking at some bytes before it's
>> unmetafied and some stuff that should have been metafied to avoid
>> being parsed as tokens, isn't, because they weren't special in the old
>> version. That's why I think running unmetafy before lexing is
>> needed... And if the lexer wants metafied text then we'd just have to
>> metafy it again right away.
>
> See if this fixes the problems, then.

I actually thought the patch in 34587 had fixed it, turns out I just
lost my --enable-zsh-debug flag. This patch doesn't fix it either
though, and I get a different set of errors every time I open a
terminal now, so that's fun. Which is to say it's all the same
wordsplit error, but it's printed for a different set of lines. Some
of them are the same though.

I noticed another thing from these errors too, they're printed also
when I exit zsh. There's not much point in lexing the history at
write-out time, is there?

I tried playing around with the code a bit. The thing that looks
suspicious to me is
    if (*ptr != Meta && imeta(*ptr)) {
Shouldn't they check ptr[0] and ptr[1] or so? I tried this,
    if ((ptr == lineptr || ptr[-1] != Meta) && imeta(ptr[0])) {
(in both places) but it didn't improve matters.

I tried the following instead of the for+if:
    unmetafy(lineptr, NULL);
    lineptr = metafy(lineptr, -1, META_USEHEAP);
and it gets rid of the errors, but it also causes insert-last-word to
do nothing. So maybe my whole theory is wrong.

-- 
Mikael Magnusson


  reply	other threads:[~2015-02-23  9:54 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19 10:13 Peter Stephenson
2015-02-19 21:47 ` Mikael Magnusson
2015-02-19 22:03   ` Peter Stephenson
2015-02-20  3:16     ` Mikael Magnusson
2015-02-20  3:22       ` Mikael Magnusson
2015-02-20  3:33         ` Mikael Magnusson
2015-02-20  3:43           ` Mikael Magnusson
2015-02-20  4:19             ` Ray Andrews
2015-02-20  9:54               ` Peter Stephenson
2015-02-20 10:00             ` Peter Stephenson
2015-02-20 10:12               ` Mikael Magnusson
2015-02-22 18:26                 ` Peter Stephenson
2015-02-23  9:54                   ` Peter Stephenson [this message]
2015-02-23 10:11                     ` Peter Stephenson
2015-02-23 11:35                       ` Mikael Magnusson
2015-02-23 12:36                         ` Peter Stephenson
2015-02-23 12:57                           ` Peter Stephenson
2015-02-23 13:38                             ` Mikael Magnusson
2015-02-23 13:46                               ` Mikael Magnusson
2015-02-23 13:51                                 ` PATCH: Remeta one frame earlier Mikael Magnusson
2015-02-23 13:58                                   ` Peter Stephenson
2015-02-23 14:05                                   ` Peter Stephenson
2015-02-23 14:32                                     ` Mikael Magnusson
2015-02-23 17:32                                       ` Peter Stephenson

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

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

  git send-email \
    --in-reply-to=20150223095443.028f0905@pwslap01u.europe.root.pri \
    --to=p.stephenson@samsung.com \
    --cc=zsh-workers@zsh.org \
    /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.vuxu.org/mirror/zsh/

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 NNTP newsgroup(s).