From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12888 invoked from network); 27 Jul 2021 20:20:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Jul 2021 20:20:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1627417247; b=kzfZaOxY3hgEA2SkvtYoP0BqA220+SepurfMlu2Umll1aN//Byjq5N8rHcfCGZPhdT2kTBh6Uf YwS/xHeKqiAurpZcbOJFUDZx5PY1yFls0IJKzzkdjho+B3tvXdssf7dHPBlRdVokD15/+oGn9I Puqm9V9jQU8JIAw/Kwjeyyo9qxc2iWA1bQkXx2FvoLEezL3JGdQgocX7a11p5XkKbWgHvan6RS CNiGI0n95lIoTi4nd1aeOxONr8HAlsLxrfhHFgZbucZfS0kaEt2hcRZKT1JAXSPJEXAbR/AQn1 6uTp5/3z7+MZ7hIFcA1dN7ukil54HdEw+iLQPdSoQlM2vQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-yb1-f175.google.com) smtp.remote-ip=209.85.219.175; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1627417247; bh=yDkyuzIGFLyoyFplgEEm5yedJFv1/P7cbn5jIqLh+nE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=K5UXb61Vhz8Wle906ROTdSr/zKzy3fknBeWgMiK/C0hxaL/IYe84EKPmZT+92f52AZDIHDIvez BhCKTD10OPOrbuWg+CqOWula2INgiLye5tqzpzexLnQBpwf8Plj1obiStG8mhv5KXhTsGqDABh bVRZn/vEyccn3ZhPjso9ydOtsX6HIckmwpZvR7iy2Fv+loW2hKk5hcHkrNWUCjEVBA/EACNGyM p5uKG8iYz7HQsYBmcX6Hz5surY+iL68Gdl2fq3VafbMgRQohF1m9HvVThRDbtpAHpGILKVGNym c9w+/h2z68xAvjEteZ6+Pz914CfzImSfMN4LE7nya6ibkg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=1EWwLug4SSBYrXfoHQOMiC3+Wc2zkgb1BfOIkWWoTRQ=; b=LICcXzRnbZVxBN5nebhkm1l5To 2adCCcBvY4xBThtlgYMMcGQBMzMDak5QnQCB9dwhv8nfqVyIpB3Ik5NKX6hfFn+Xg8p1SRhr+mhb/ 45lT7IEXn9H/w3JOdwO7tP/RQG045BZzquNwKF0GprLb4BEBei0ck9HiKPntpO62Qh3/0jlRI6J/S kP1PSFcSAmb3R3ICr7KAFUL/5SoKJkN4BRwtZxDmCnaTgVRWysKLyPzZ99RLY1J+XQtYlvzVMhSvJ KKkad1dwy96r38e6sIEzds6MrueMqZoeWMMNi4sP4nlgYUEwSZt3sEuKqpqI56zHHdKNK8HpU1akt 4clVyJyA==; Received: from authenticated user by zero.zsh.org with local id 1m8TZD-000MqW-Kw; Tue, 27 Jul 2021 20:20:43 +0000 Authentication-Results: zsh.org; iprev=pass (mail-yb1-f175.google.com) smtp.remote-ip=209.85.219.175; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-yb1-f175.google.com ([209.85.219.175]:39719) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1m8TYg-000Ltb-5I; Tue, 27 Jul 2021 20:20:10 +0000 Received: by mail-yb1-f175.google.com with SMTP id s19so59198ybc.6 for ; Tue, 27 Jul 2021 13:20:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1EWwLug4SSBYrXfoHQOMiC3+Wc2zkgb1BfOIkWWoTRQ=; b=pUMzh7qajAsmgmVafE3aj4bSggzJjayczLUgQBwnz1R/VxrYIdMBsNlq6JzAHMNSZY 6a8xwdt9v6p1ucFrzw/anjlFLfnWeXoniyM828muRrZ5S7DagezgC+0vxINjW9vY4dB4 IM4WhsN7EE+q4RwTyN/K95lhi5cDz4duvZ2F1VbVZRosYmSdhpqHEBxAnbei7b3teDu3 dpg20jjhwMr/Dm+pnuwv+jnbMyTdYSW69aVSRlgFwgJyZqHbYmjYXPbbwgpLTy2dzBRZ OFaVz2mDG0d6H20+EfFNtCDjaFdGZVMtw+zv8LXa1gdGYsymNYz87VZWi+RhFCnVVkMK VgRA== 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:cc; bh=1EWwLug4SSBYrXfoHQOMiC3+Wc2zkgb1BfOIkWWoTRQ=; b=gkCWE+s3WBTeyQynbFfIPfhUysvqYM+pSruuVYqQK+qMAgsuulfexS3E8M2Ppt0aig cwGjIvwejn2sTLeJ6vziSmZSeUNOibcWOW6l7p+7uDwjFKwAv/PF287gVyu33drEYcqK h2monYTFGa5LwzimEQWTObjKS3h2xYsqB+0K/11rFN1vKExqtd7j0ic5/XmFP2BC+QAx Z8YZ8hF/E4qs8lPj9AnayLtjzQgVM3IWKqJzt5jMVwPbAux0IXWyxWAK7VmvPpdnT7rJ Dk6WpXKubowhcarUkz+9Y+ACU9rGM8GLEOFwgnlXta9Ty+ZWdxPHp8x9fMleLHEmyMnf mntw== X-Gm-Message-State: AOAM530tUdNEtAX1jfGafxAm+6irjNKru/xJC4z+5vHYXfIjL7Q4TBBh LHSsLRHadKHXg/qi9gyyTXvQ0IjTGKyuIkLoAX1fzg== X-Google-Smtp-Source: ABdhPJxW/0fOxqvBkvmyhpq35z3BtogaaEpTcqbNd6ZmC67iuwJEqRsXjjzx3FA7WMhe3jl4thT9WNOiekWWN6Wlx78= X-Received: by 2002:a25:8888:: with SMTP id d8mr28565665ybl.379.1627417208629; Tue, 27 Jul 2021 13:20:08 -0700 (PDT) MIME-Version: 1.0 References: <20210726070654.v33wzoiwpqibwlas@localhost> <20210727055227.4aobyf75yyckctve@localhost> In-Reply-To: <20210727055227.4aobyf75yyckctve@localhost> From: Bart Schaefer Date: Tue, 27 Jul 2021 13:19:57 -0700 Message-ID: Subject: Re: [BUG] insert-last-word gets stuck at comments To: Frederick Eaton Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 49201 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On Mon, Jul 26, 2021 at 10:52 PM Frederick Eaton wrote: > > I've read the documentation for insert-last-word and > smart-insert-last-word and I can't figure out how they are different. > > So they are the same when interactive_comments is not set? However, > according to my experiments it seems that insert-last-word also > ignores comments when interactive_comments is set, so I am not able to > understand the difference. I think what's happened is that a (now very old) change to the way the history mechanism stores/fetches words, had an unexpected side-effect on insert-last-word. Where we've ended up is that insert-last-word can never "see" comments, but smart-insert-last-word is able to see them if the setting of interactive_comments changes from on to off between the time the comment got entered into the history and the time smart-insert-last-word is run. Which of course almost never occurs. There's code in the insertlastword function that's (according to the comment) supposed to stop us getting stuck, but apparently in the case where the line is entirely empty that isn't working. It may be possible to fix it.