zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: <zsh-workers@sunsite.dk>
Subject: Re: accept-and-infer-next-history is broken?
Date: Sat, 26 May 2001 01:21:25 +0000	[thread overview]
Message-ID: <1010526012125.ZM18237@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.LNX.4.33L2.0105251245470.18391-200000@phong.blorf.net>

On May 25,  1:47pm, Wayne Davison wrote:
} 
}   if (we have a line in the history below us
}    && the current line is unchanged from the history version) {
}       use the next line;
}   else
}       search from the bottom of the history for a match and infer;

This sounds like exactly what I expected it to do, and this ...

} Another change I made was to have the code ignore the transient edits in
} the history list when it is searching for and storing the inferred line

... is also something I'd been wishing for.

} This means that a-a-i-n-h works just like accept-line-and-down-history
} after the first inferred line.  An alternate approach would be to just
} always start the search from the bottom of the history.  Thoughts?

Well, here's the thing ... I use `setopt hist_expire_dups_first'.  My
fear is that the next thing that I'd like inferred, might have expired.
I DON'T want inferences to skip over the expired history slots and use
what follows ... I'd rather have it feep at me.  On the other hand, I'd
like to have the best chance possible of inferring something useful.  So
whether the algorithm needs to always search from the bottom depends on
what "we have a line in the history below us" means.
 
} Finally, I changed the function to be like a-l-a-down-history in that it
} does not set "done = 1" if the infer fails.

What practical effect does that have, exactly?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2001-05-26  1:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-24  8:04 Bart Schaefer
2001-05-25 20:47 ` Wayne Davison
2001-05-26  1:21   ` Bart Schaefer [this message]
2001-05-26  6:45     ` PATCH: " Wayne Davison

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=1010526012125.ZM18237@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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).