GNU bug report logs - #35119
Zero-length regexp matches at point when doing re-search-backward

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Sam Halliday <sam.halliday@HIDDEN>; dated Wed, 3 Apr 2019 11:20:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Changed bug title to 'Zero-length regexp matches at point when doing re-search-backward' from '26.1; narrow-to-region loses word-start/symbol-start information at end' Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 35119 <at> debbugs.gnu.org:


Received: (at 35119) by debbugs.gnu.org; 1 Sep 2021 09:09:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 01 05:09:02 2021
Received: from localhost ([127.0.0.1]:36268 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLMEr-0007u7-VR
	for submit <at> debbugs.gnu.org; Wed, 01 Sep 2021 05:09:02 -0400
Received: from quimby.gnus.org ([95.216.78.240]:58054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mLMEm-0007tq-Ub
 for 35119 <at> debbugs.gnu.org; Wed, 01 Sep 2021 05:08:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=NbU0ddcRC/vaxOPyvBGN9WdICN1bIuDP89PP4n9haXg=; b=F5vJWlFqItuxtaLANLbrIoKuPW
 +nHfYcgF+FkWh5mubBeFfG9WPKHsHkgaZTiHhA35cYUt8KwMMRaHZkdpds+9ql8/vsLze7i6Q2zVL
 2Zm8FDcln9BqtEUfIozQ4VssZRBxD4bwQS5BVmTGW+2xitH2AZl29VggeIQsmJTdGqfg=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mLMEc-0006Qi-8k; Wed, 01 Sep 2021 11:08:46 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Sam Halliday <sam.halliday@HIDDEN>
Subject: Re: bug#35119: 26.1; narrow-to-region loses word-start/symbol-start
 information at end
References: <87y34r1glv.fsf@HIDDEN> <83a7h7e3ex.fsf@HIDDEN>
 <CALR_T9CAsUvSkAeMKzTf694g+=-xMqmZEV0_JOFB8RkA1rhH2A@HIDDEN>
Date: Wed, 01 Sep 2021 11:08:41 +0200
In-Reply-To: <CALR_T9CAsUvSkAeMKzTf694g+=-xMqmZEV0_JOFB8RkA1rhH2A@HIDDEN>
 (Sam Halliday's message of "Wed, 3 Apr 2019 13:30:40 +0100")
Message-ID: <87o89cfysm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Sam Halliday <sam.halliday@HIDDEN> writes: > This impacts
 me in `looking-back'. Here's an interactive snippet to > demonstrate the
 problem (not minimised to`narrow-to-region'): > > (defun look-for-35119 ()
 > (interactive) > (if (looking-back > [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 35119
Cc: Eli Zaretskii <eliz@HIDDEN>, 35119 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Sam Halliday <sam.halliday@HIDDEN> writes:

> This impacts me in `looking-back'. Here's an interactive snippet to
> demonstrate the problem (not minimised to`narrow-to-region'):
>
> (defun look-for-35119 ()
>   (interactive)
>   (if (looking-back
>        (rx (: word-end ":" word-start))
>        ;;(rx (: word-end ":"))
>        (- (point) 1) 't)
>       (message "hit")
>     (message "miss")))
>
> in emacs-lisp-mode, which defines : as non-word, interactively
> evaluate look-for-35119 when the point is just after the colon in this
> example text
>
>   wibble:wobble

Here's a simpler test case:

(with-temp-buffer
  (emacs-lisp-mode)
  (insert "wibble:wobble")
  (goto-char (point-min))
  (search-forward ":")
  (if (looking-back "\\>:\\<" nil t)
      (message "hit")
    (message "miss")))

And, indeed, that fails because

(re-search-backward "\\(?:\\>:\\<\\)\\=" nil t)

fails.  There seems to be a general problem with re-search-backward and
these zero-length matches (as you said in a later message).

Here's the test case:

(with-temp-buffer
  (emacs-lisp-mode)
  (insert "wibble:wobble")
  (goto-char (point-min))
  (search-forward ":")
  (if (re-search-backward ":\\<" nil t)
      (message "hit")
    (message "miss")))

That is, if we're at the point where this zero-length match should
match, it doesn't.  This succeeds:

(with-temp-buffer
  (emacs-lisp-mode)
  (insert "wibble:wobble")
  (goto-char (point-min))
  (search-forward ":")
  (forward-char 1)
  (if (re-search-backward ":\\<" nil t)
      (message "hit")
    (message "miss")))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35119; Package emacs. Full text available.

Message received at 35119 <at> debbugs.gnu.org:


Received: (at 35119) by debbugs.gnu.org; 3 Apr 2019 13:05:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 03 09:05:47 2019
Received: from localhost ([127.0.0.1]:42187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hBfaK-0005kh-DD
	for submit <at> debbugs.gnu.org; Wed, 03 Apr 2019 09:05:44 -0400
Received: from mail-vs1-f50.google.com ([209.85.217.50]:35314)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam.halliday@HIDDEN>) id 1hBfaI-0005kT-E0
 for 35119 <at> debbugs.gnu.org; Wed, 03 Apr 2019 09:05:42 -0400
Received: by mail-vs1-f50.google.com with SMTP id d8so8871797vsp.2
 for <35119 <at> debbugs.gnu.org>; Wed, 03 Apr 2019 06:05:42 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=K/CjLRI8K9WjWR+iPGTX9TBXHGzG/uAVjq8EH9Aoruk=;
 b=ePDkr/Jo5rEPhZVS2AfrTvrMCH1kA9XT4WUP8ttBjBGNneUGLrlhhZ0tvloFbl2It/
 RTxPmlClgnqtGon52xggjXQjYrIFjQuFiM3qe5/sSfIPNBpM7hJaymVayVLlVBA5TWys
 H3oW/oQxg49GqAeagw8ZA7AtZ4zvkxR+iHh6++NcxsxWoKBK3l+PQXweYwM9UoxGBPYE
 DAdgQ/pkQJ6ZxVblt8+UXgmDN2NjV1WhLiWh31vZ/fvKnBkQW8Hue89kZSzN6n9hn9L+
 AYp4XeWV6yXtnXNFRbL1VguIoCdihQAPncF9dlUw8lTBqT2rh5MN5jY3jixbYJzGuO3v
 uFeg==
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=K/CjLRI8K9WjWR+iPGTX9TBXHGzG/uAVjq8EH9Aoruk=;
 b=cf/I9m4B2gCxvnNRzgTrHICOu67x8WtLNlUdxMPi5qEoDLnPuokMdpYVA14oIEi9BG
 QtdaMHH7gW8xOGiQmU9Cs3g7/qDi3VG2HRtxQkmJP0dy8rKO5pGH0IOuY+DPDRU6sh7f
 9L7VQfr/IfH0j00JrK+OAk4tGQY48Ik9JiN6vtb00/e+GbpHab9QqtFn9mHjR03IP5YZ
 ySJ4lsRZegNzJYu6FgJrSAeTcA5ngZBX8fUIKdSCCWVbQazDzl3qY6jBiav1l+7Bj+lw
 s86OgOSwX0i8WoMy7jvBhwpHksDKp9knKAac4KucqpTpdxRfjU5na1uyVz2NZxe5IJFh
 WZdA==
X-Gm-Message-State: APjAAAWFO3kyc3uFBZioSmp2ZPCgQybv0X5yq0hTN3Pru9tAt02KW4zJ
 b5+ako2Xk2+NusTVQi/h+d1tYQP0UZlne5MbddA=
X-Google-Smtp-Source: APXvYqzWXaff1/cOd3FR6bRrk+Gi2wkZX/XIG12Bx3qh+T1F6H6Sun3dmQ8ZBtkunwZEBzBm8AKlOD5BipAiXxzMS74=
X-Received: by 2002:a05:6102:3c2:: with SMTP id n2mr57807vsq.41.1554296736925; 
 Wed, 03 Apr 2019 06:05:36 -0700 (PDT)
MIME-Version: 1.0
References: <87y34r1glv.fsf@HIDDEN> <83a7h7e3ex.fsf@HIDDEN>
 <CALR_T9CAsUvSkAeMKzTf694g+=-xMqmZEV0_JOFB8RkA1rhH2A@HIDDEN>
 <CALR_T9BDM_Brq6wELpFUbQLF7Dq3eSpfo8Ktiii=AXMJZhnHcA@HIDDEN>
In-Reply-To: <CALR_T9BDM_Brq6wELpFUbQLF7Dq3eSpfo8Ktiii=AXMJZhnHcA@HIDDEN>
From: Sam Halliday <sam.halliday@HIDDEN>
Date: Wed, 3 Apr 2019 14:05:25 +0100
Message-ID: <CALR_T9CtkCpi5dX6-u8uAOb930ooSS10PjHOVmaXXkkK55p5xg@HIDDEN>
Subject: Re: bug#35119: 26.1; narrow-to-region loses word-start/symbol-start
 information at end
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 35119
Cc: 35119 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

To be clear, I still think this is a bug... but I'm now thinking that
the bug is in re-search-forward.

This alternative looking-back works for the example but is broken in other ways

(defun haskell-tng-lexer:greedy-looking-back (regexp lower)
  (let ((upper (+ (point) 1)) ;; must be +1 to include zero-lengths
        (start lower))
    (save-excursion
      (catch 'hit
        (while (< start upper)
          (goto-char start)
          (re-search-forward regexp upper 't)
          (when (= (point) (- upper 1))
            (throw 'hit 't))
          (setq start (+ 1 start)))
        nil))))

On Wed, 3 Apr 2019 at 14:01, Sam Halliday <sam.halliday@HIDDEN> wrote:
>
> Hmm, on further investigation I think this may just be regexp behaviour.
>
> I came up with this as an alternative to `looking-back'
>
> (defun my-looking-back (regexp lower)
>   (let ((upper (point))
>         (start lower))
>     (save-excursion
>       (catch 'hit
>         (while (< start upper)
>           (goto-char start)
>           (re-search-forward regexp upper 't)
>           (when (= (point) upper)
>             (throw 'hit 't))
>           (setq start (+ 1 start)))
>         nil))))
>
> and it also fails to match the : in the example. So perhaps limit is
> also excluding the zero-length implied by the subsequent character.
>
> On Wed, 3 Apr 2019 at 13:30, Sam Halliday <sam.halliday@HIDDEN> wrote:
> >
> > Hi Eli,
> >
> > Sorry that was a terrible bug report.
> >
> > This impacts me in `looking-back'. Here's an interactive snippet to
> > demonstrate the problem (not minimised to`narrow-to-region'):
> >
> > (defun look-for-35119 ()
> >   (interactive)
> >   (if (looking-back
> >        (rx (: word-end ":" word-start))
> >        ;;(rx (: word-end ":"))
> >        (- (point) 1) 't)
> >       (message "hit")
> >     (message "miss")))
> >
> > in emacs-lisp-mode, which defines : as non-word, interactively
> > evaluate look-for-35119 when the point is just after the colon in this
> > example text
> >
> >   wibble:wobble
> >
> > I would expect to see "hit", but we get "miss". To demonstrate that
> > the word-start is the cause of the problem, try the commented regexp
> > and try again, you'll get "hit" but of course this regexp is not what
> > is intended. For example, it would also match in between :: in the
> > following:
> >
> >   wibble::wobble
> >
> > The cause is that the `narrow-to-region' call inside `looking-back' is
> > dropping the word-start zero length match at the beginning of wobble.
> > This may or may not be a bug in narrow-to-region, but I'm quite sure
> > it's a bug in `looking-back'. There is most likely a similar example
> > demonstrating that the zero lengths are missing at the start as well
> > as the end.
> >
> > I've tried playing around with multiple alternative implementations of
> > `looking-back' but none are working for me. Probably the best
> > workaround I can think of is to extend the `narrow-to-region' call by
> > one more character at the start and the end. Dealing with the start is
> > easy, we just goto-char limit+1, but dealing with the end is difficult
> > as we need to put an anychar \\. matcher in the doctored regexp and
> > then the match-end is off-by-one from what the user expects, so then
> > we have to doctor that, and then all hell breaks loose.
> >
> > Does that make sense?
> >
> >
> > On Wed, 3 Apr 2019 at 12:25, Eli Zaretskii <eliz@HIDDEN> wrote:
> > >
> > > > From: Sam Halliday <sam.halliday@HIDDEN>
> > > > Date: Wed, 03 Apr 2019 12:19:08 +0100
> > > >
> > > > If the function `narrow-to-region' (as it is in `looking-back') is used
> > > > to restrict the region prior to an invocation of re-search-forward or
> > > > looking-at, then zero length regexp patterns are lost at the boundaries.
> > >
> > > Could you please provide a recipe to reproduce the issue?  I'm not
> > > sure I understand what is the problem you are describing.
> > >
> > > Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35119; Package emacs. Full text available.

Message received at 35119 <at> debbugs.gnu.org:


Received: (at 35119) by debbugs.gnu.org; 3 Apr 2019 13:02:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 03 09:02:19 2019
Received: from localhost ([127.0.0.1]:42183 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hBfX0-0005fb-Oi
	for submit <at> debbugs.gnu.org; Wed, 03 Apr 2019 09:02:19 -0400
Received: from mail-vs1-f48.google.com ([209.85.217.48]:46557)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam.halliday@HIDDEN>) id 1hBfWy-0005fN-LV
 for 35119 <at> debbugs.gnu.org; Wed, 03 Apr 2019 09:02:17 -0400
Received: by mail-vs1-f48.google.com with SMTP id e2so9184014vsc.13
 for <35119 <at> debbugs.gnu.org>; Wed, 03 Apr 2019 06:02:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=rpAuXqEkwcQPPg4cTdJT4YVGjtR6/MZLt16yO/2O0OY=;
 b=HHaqk2osa6d5tIbY0TbBkUEyO+1kWZp1jWlBbaeFkVt/vuoCDQz7CV7tGYvAy6oeyj
 iVo472pEcMmsyDS9ufjSi8DiFm9h1v23HcFclu7EhJxzfxp4SQtaWsBd/qIa6i8AeGSu
 4NxqUnDf5Irm8cGreRfo1tWcnT3SZp++BkQCgFglR7Kt3N8W92VCJ4hVf5wpZYpg+lRR
 pbcs2zLE/kD4u5+T0tcMqBfRHsxhSEvJj9QtdZJA42zA3Ji06DRMFtXmP3+kVkk/Ndmk
 xAGSBEBwXPQi4iqvQ1y8o73XSHebNIBkCWb0cnypHykNpv1db3gyH7lrXSWYnAl5qIgk
 IBAQ==
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=rpAuXqEkwcQPPg4cTdJT4YVGjtR6/MZLt16yO/2O0OY=;
 b=TvEno8ctJUiOkGC37Ai+Cg5xe/UQwEVTxzZQ4EjAbTHEocuI+0QgGvHNT6AJS4y5+m
 zGGzPdtem7GBQ1lS3EwYTHYloxAndowmmSFt1rx9S67+i+JC2PNGW6JAqW62WY4etpZL
 tdPdVlAXZV/0Rw6/+1/jfC6X02t02hGyz1kC9KMbYLcxdOcVFo3vLRy2OkHAb7/dhOnZ
 BlJtJVL7bCG3hJd3+XA4KVXKiS+m+YoyKV8ZK4jHupY0KQ8OIKw85xEDc/HYPkbPFQi/
 pqKwCjp5jeNRGlebSNqrB6YSfcZDlbnICGolFxOUcUCylWA6qUqKfKgCkFzeiVGXs7yY
 +V5w==
X-Gm-Message-State: APjAAAXqbekFUi43mcpDIsbhp7rHdXKIiX6njqQPSfON2JmUtxkgbzcP
 DC2sZ5Y5A5+ZZEnuOedYrWKg2xy76nzNZBL36ts=
X-Google-Smtp-Source: APXvYqwOHBBC67O91rOcID5lRrzdsYXZSJV99B3AEmHpYpfwUVbHXcV+7R07i0AcJh5Iw6CGwzSfEytV73mnva6I3Ws=
X-Received: by 2002:a67:6847:: with SMTP id d68mr53867vsc.90.1554296530070;
 Wed, 03 Apr 2019 06:02:10 -0700 (PDT)
MIME-Version: 1.0
References: <87y34r1glv.fsf@HIDDEN> <83a7h7e3ex.fsf@HIDDEN>
 <CALR_T9CAsUvSkAeMKzTf694g+=-xMqmZEV0_JOFB8RkA1rhH2A@HIDDEN>
In-Reply-To: <CALR_T9CAsUvSkAeMKzTf694g+=-xMqmZEV0_JOFB8RkA1rhH2A@HIDDEN>
From: Sam Halliday <sam.halliday@HIDDEN>
Date: Wed, 3 Apr 2019 14:01:58 +0100
Message-ID: <CALR_T9BDM_Brq6wELpFUbQLF7Dq3eSpfo8Ktiii=AXMJZhnHcA@HIDDEN>
Subject: Re: bug#35119: 26.1; narrow-to-region loses word-start/symbol-start
 information at end
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 35119
Cc: 35119 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hmm, on further investigation I think this may just be regexp behaviour.

I came up with this as an alternative to `looking-back'

(defun my-looking-back (regexp lower)
  (let ((upper (point))
        (start lower))
    (save-excursion
      (catch 'hit
        (while (< start upper)
          (goto-char start)
          (re-search-forward regexp upper 't)
          (when (= (point) upper)
            (throw 'hit 't))
          (setq start (+ 1 start)))
        nil))))

and it also fails to match the : in the example. So perhaps limit is
also excluding the zero-length implied by the subsequent character.

On Wed, 3 Apr 2019 at 13:30, Sam Halliday <sam.halliday@HIDDEN> wrote:
>
> Hi Eli,
>
> Sorry that was a terrible bug report.
>
> This impacts me in `looking-back'. Here's an interactive snippet to
> demonstrate the problem (not minimised to`narrow-to-region'):
>
> (defun look-for-35119 ()
>   (interactive)
>   (if (looking-back
>        (rx (: word-end ":" word-start))
>        ;;(rx (: word-end ":"))
>        (- (point) 1) 't)
>       (message "hit")
>     (message "miss")))
>
> in emacs-lisp-mode, which defines : as non-word, interactively
> evaluate look-for-35119 when the point is just after the colon in this
> example text
>
>   wibble:wobble
>
> I would expect to see "hit", but we get "miss". To demonstrate that
> the word-start is the cause of the problem, try the commented regexp
> and try again, you'll get "hit" but of course this regexp is not what
> is intended. For example, it would also match in between :: in the
> following:
>
>   wibble::wobble
>
> The cause is that the `narrow-to-region' call inside `looking-back' is
> dropping the word-start zero length match at the beginning of wobble.
> This may or may not be a bug in narrow-to-region, but I'm quite sure
> it's a bug in `looking-back'. There is most likely a similar example
> demonstrating that the zero lengths are missing at the start as well
> as the end.
>
> I've tried playing around with multiple alternative implementations of
> `looking-back' but none are working for me. Probably the best
> workaround I can think of is to extend the `narrow-to-region' call by
> one more character at the start and the end. Dealing with the start is
> easy, we just goto-char limit+1, but dealing with the end is difficult
> as we need to put an anychar \\. matcher in the doctored regexp and
> then the match-end is off-by-one from what the user expects, so then
> we have to doctor that, and then all hell breaks loose.
>
> Does that make sense?
>
>
> On Wed, 3 Apr 2019 at 12:25, Eli Zaretskii <eliz@HIDDEN> wrote:
> >
> > > From: Sam Halliday <sam.halliday@HIDDEN>
> > > Date: Wed, 03 Apr 2019 12:19:08 +0100
> > >
> > > If the function `narrow-to-region' (as it is in `looking-back') is used
> > > to restrict the region prior to an invocation of re-search-forward or
> > > looking-at, then zero length regexp patterns are lost at the boundaries.
> >
> > Could you please provide a recipe to reproduce the issue?  I'm not
> > sure I understand what is the problem you are describing.
> >
> > Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35119; Package emacs. Full text available.

Message received at 35119 <at> debbugs.gnu.org:


Received: (at 35119) by debbugs.gnu.org; 3 Apr 2019 12:30:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 03 08:30:59 2019
Received: from localhost ([127.0.0.1]:42154 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hBf2h-0004r4-3a
	for submit <at> debbugs.gnu.org; Wed, 03 Apr 2019 08:30:59 -0400
Received: from mail-vs1-f51.google.com ([209.85.217.51]:46115)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam.halliday@HIDDEN>) id 1hBf2f-0004qo-6D
 for 35119 <at> debbugs.gnu.org; Wed, 03 Apr 2019 08:30:57 -0400
Received: by mail-vs1-f51.google.com with SMTP id e2so9125465vsc.13
 for <35119 <at> debbugs.gnu.org>; Wed, 03 Apr 2019 05:30:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=IxGE2bTvttQOgQRJTrfLBKnLrqIJH/yzmTAbwTIRPzs=;
 b=VPrlomgr1t2mdrTr2q4Bd7NIKh4s6nTdTgf3GK8lOwGk8BQ308SuzBQXOI+B/V7/OU
 IXaBDJSPO2ssYg4/vTySo452qx34vN1KOC6cXQJPWer4pqeFD8PxVFF4Jv5pJ/aMBM0N
 dPi38dbbq9qXTDmXqqwI/WP1K657BSzhPqQbpCj6eZj3YntjJGjJ1TXYvgX7FJmcilBD
 FzOnjBXQr4cvFe97QGmr2ALvKiToN69jrgUBVRXMBY9sMstSMS336OmpJTw+uZZo+0oh
 py8YN0ojL20EF8y3IaGu7gWYeObsJ8EOIqbRZf68M3dI0GKJhYCrL7gWOvzMZ2Tfnj9t
 RNHg==
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=IxGE2bTvttQOgQRJTrfLBKnLrqIJH/yzmTAbwTIRPzs=;
 b=jLFg+J+4DT5Z6MvAFuyn1aB8scSArZ05gWbZpBU2LWGBzBmc21hRGVP1fpDGRV25KA
 jrHT/QkGhSEPcUIh1aZiddmbUKhIueAKVfLHB3k8IGYPLlc5nqyz3Nk3ygny9biRPicd
 AgrMN9xvNO30trpvyAjqW9TL+VDJTxFLM2C0eWZoGiHxaLL1UtkieUeh/nFVvnFrNx9O
 ntwPIT5GNLQVCcHleDlSpcwLoIM9YHHOJxk2uF+V7o1nUqgf6BhYpoEiL29ktxhy2ry7
 KNpiCW8/sG00lWn/HlUTPd6EqfYj/NZorMhY2CZQm3mIlROKeFJW+s7gAwhQjr40EVP6
 73nw==
X-Gm-Message-State: APjAAAXMpPfHwTNtDyRh18mXOJ08WNE557EFPYKSL+K47F23wVjPQkiH
 kT9ZBT/2KQKa412RoPR2WS0XCXXAf9Do+zUA5b8=
X-Google-Smtp-Source: APXvYqw/3QHRiw019w2aVkM5bq+FPMHP0GtbUmzDSFZAaAyI7NlarB+vn39/WA5ThPgl9odv83p/DF4gFxZAxycBSDg=
X-Received: by 2002:a05:6102:3c2:: with SMTP id
 n2mr45294562vsq.41.1554294651400; 
 Wed, 03 Apr 2019 05:30:51 -0700 (PDT)
MIME-Version: 1.0
References: <87y34r1glv.fsf@HIDDEN> <83a7h7e3ex.fsf@HIDDEN>
In-Reply-To: <83a7h7e3ex.fsf@HIDDEN>
From: Sam Halliday <sam.halliday@HIDDEN>
Date: Wed, 3 Apr 2019 13:30:40 +0100
Message-ID: <CALR_T9CAsUvSkAeMKzTf694g+=-xMqmZEV0_JOFB8RkA1rhH2A@HIDDEN>
Subject: Re: bug#35119: 26.1; narrow-to-region loses word-start/symbol-start
 information at end
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 35119
Cc: 35119 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Eli,

Sorry that was a terrible bug report.

This impacts me in `looking-back'. Here's an interactive snippet to
demonstrate the problem (not minimised to`narrow-to-region'):

(defun look-for-35119 ()
  (interactive)
  (if (looking-back
       (rx (: word-end ":" word-start))
       ;;(rx (: word-end ":"))
       (- (point) 1) 't)
      (message "hit")
    (message "miss")))

in emacs-lisp-mode, which defines : as non-word, interactively
evaluate look-for-35119 when the point is just after the colon in this
example text

  wibble:wobble

I would expect to see "hit", but we get "miss". To demonstrate that
the word-start is the cause of the problem, try the commented regexp
and try again, you'll get "hit" but of course this regexp is not what
is intended. For example, it would also match in between :: in the
following:

  wibble::wobble

The cause is that the `narrow-to-region' call inside `looking-back' is
dropping the word-start zero length match at the beginning of wobble.
This may or may not be a bug in narrow-to-region, but I'm quite sure
it's a bug in `looking-back'. There is most likely a similar example
demonstrating that the zero lengths are missing at the start as well
as the end.

I've tried playing around with multiple alternative implementations of
`looking-back' but none are working for me. Probably the best
workaround I can think of is to extend the `narrow-to-region' call by
one more character at the start and the end. Dealing with the start is
easy, we just goto-char limit+1, but dealing with the end is difficult
as we need to put an anychar \\. matcher in the doctored regexp and
then the match-end is off-by-one from what the user expects, so then
we have to doctor that, and then all hell breaks loose.

Does that make sense?


On Wed, 3 Apr 2019 at 12:25, Eli Zaretskii <eliz@HIDDEN> wrote:
>
> > From: Sam Halliday <sam.halliday@HIDDEN>
> > Date: Wed, 03 Apr 2019 12:19:08 +0100
> >
> > If the function `narrow-to-region' (as it is in `looking-back') is used
> > to restrict the region prior to an invocation of re-search-forward or
> > looking-at, then zero length regexp patterns are lost at the boundaries.
>
> Could you please provide a recipe to reproduce the issue?  I'm not
> sure I understand what is the problem you are describing.
>
> Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35119; Package emacs. Full text available.

Message received at 35119 <at> debbugs.gnu.org:


Received: (at 35119) by debbugs.gnu.org; 3 Apr 2019 11:25:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 03 07:25:36 2019
Received: from localhost ([127.0.0.1]:42127 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hBe1Q-0001Hr-BU
	for submit <at> debbugs.gnu.org; Wed, 03 Apr 2019 07:25:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37549)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1hBe1O-0001Hf-Oh
 for 35119 <at> debbugs.gnu.org; Wed, 03 Apr 2019 07:25:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:51895)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1hBe1J-00050r-Fh; Wed, 03 Apr 2019 07:25:29 -0400
Received: from [176.228.60.248] (port=2454 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1hBe1I-0003pQ-KM; Wed, 03 Apr 2019 07:25:29 -0400
Date: Wed, 03 Apr 2019 14:25:42 +0300
Message-Id: <83a7h7e3ex.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Sam Halliday <sam.halliday@HIDDEN>
In-reply-to: <87y34r1glv.fsf@HIDDEN> (message from Sam Halliday on Wed, 03
 Apr 2019 12:19:08 +0100)
Subject: Re: bug#35119: 26.1;
 narrow-to-region loses word-start/symbol-start information at end
References: <87y34r1glv.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 35119
Cc: 35119 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Sam Halliday <sam.halliday@HIDDEN>
> Date: Wed, 03 Apr 2019 12:19:08 +0100
> 
> If the function `narrow-to-region' (as it is in `looking-back') is used
> to restrict the region prior to an invocation of re-search-forward or
> looking-at, then zero length regexp patterns are lost at the boundaries.

Could you please provide a recipe to reproduce the issue?  I'm not
sure I understand what is the problem you are describing.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#35119; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 3 Apr 2019 11:19:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Apr 03 07:19:24 2019
Received: from localhost ([127.0.0.1]:42122 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hBdvQ-00018R-8P
	for submit <at> debbugs.gnu.org; Wed, 03 Apr 2019 07:19:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36545)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam.halliday@HIDDEN>) id 1hBdvN-00018D-PN
 for submit <at> debbugs.gnu.org; Wed, 03 Apr 2019 07:19:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:46789)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <sam.halliday@HIDDEN>)
 id 1hBdvI-0005D6-LI
 for submit <at> debbugs.gnu.org; Wed, 03 Apr 2019 07:19:16 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50921)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sam.halliday@HIDDEN>) id 1hBdvG-00079m-Mc
 for bug-gnu-emacs@HIDDEN; Wed, 03 Apr 2019 07:19:16 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sam.halliday@HIDDEN>) id 1hBdvE-00056l-Ts
 for bug-gnu-emacs@HIDDEN; Wed, 03 Apr 2019 07:19:14 -0400
Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:35372)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <sam.halliday@HIDDEN>)
 id 1hBdvE-00055K-IJ
 for bug-gnu-emacs@HIDDEN; Wed, 03 Apr 2019 07:19:12 -0400
Received: by mail-wr1-x429.google.com with SMTP id w1so20828820wrp.2
 for <bug-gnu-emacs@HIDDEN>; Wed, 03 Apr 2019 04:19:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:subject:date:message-id:mime-version;
 bh=fR0oZjb5zdqtdckyxsIyeRhQT0y8vqgK7Q3sOZKvdas=;
 b=tbEpgKqY4Zk+2ikkXrL8eHsGkCpfVI7a8HiVT715IK3OT4msemzvG27iVWqu9crBYB
 DGSz70nFLU6XMq97wt4+fRh6UnSfi/mTEvjbyKzX0UQiqk9g4V9i+Fxaap5FcNj7zPB9
 0R5xtj4eEdV9/q4yVdF7PXhHoA+T6xw10uMc4kud7EvcF+WXnppwEuGGF5BNOYu1hJdc
 hnNgJYHNTm1WFG9Adj7noI9lGHaqDbt8aGRBhvVNtyvX8GVu67MJ0YndJMj0HbuVHKpO
 VxgjsDdb8xLpBM6l6bvqehtT+/LcgERA5m8syAETUEb0c1pdcAXGi0A5VVMD8hHRSWBJ
 zOsQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:subject:date:message-id:mime-version;
 bh=fR0oZjb5zdqtdckyxsIyeRhQT0y8vqgK7Q3sOZKvdas=;
 b=pc8Tdb4Nd8fNb/kURwXARUFsOpOXbUDD9H9PT1GoqBOdNbl3jE8Mdp9w4IBB7/GPyF
 DNJg+voECpYPxeoyirgS+QHr09pFkRuunFBOcUKbLLhFPU8U8SD/MieAT/omRM7M2T7s
 ngqTlqNLoIL8OwwX2mTgi/T9cc2owjyf0ooq+u/VsOxH9QpINiM5wJhB6HTQHQAwLS9Z
 MuvZha/ld3frMfhfARv35jkSojPXF9CGd7X9yidhCuf9yRsqZDuLplabKHz5O7CHLKPL
 76LwJT3DNs9Y9jv+49PMSuG+rfIaaETc1TRaruV2mh6xd1h7q9uHD+zcWvPFbgiLDf0a
 o4eA==
X-Gm-Message-State: APjAAAVhQnEHG7Lqs0x7YxjGxnIB/VR9GWFqm1jk/RNUkUfc+dMgWKty
 QjjjuHgj7k3woVjQxskQSrHNclb6
X-Google-Smtp-Source: APXvYqy8vZJ0VDpCBUhsCNPh+daY4+pTPj2F856lESyLaos64ISEo0EWkbuy2hLsIAaFx76//olMDQ==
X-Received: by 2002:adf:afd7:: with SMTP id y23mr47604700wrd.254.1554290351005; 
 Wed, 03 Apr 2019 04:19:11 -0700 (PDT)
Received: from Samurai ([2a00:23c6:c305:7500:1e1b:dff:fe06:d7ff])
 by smtp.gmail.com with ESMTPSA id q19sm12024144wmq.23.2019.04.03.04.19.09
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Wed, 03 Apr 2019 04:19:09 -0700 (PDT)
From: Sam Halliday <sam.halliday@HIDDEN>
X-Google-Original-From: Sam Halliday <Sam.Halliday@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 26.1;
 narrow-to-region loses word-start/symbol-start information at end
Date: Wed, 03 Apr 2019 12:19:08 +0100
Message-ID: <87y34r1glv.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-Received-From: 2a00:1450:4864:20::429
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


If the function `narrow-to-region' (as it is in `looking-back') is used
to restrict the region prior to an invocation of re-search-forward or
looking-at, then zero length regexp patterns are lost at the boundaries.

It is unclear if this is a bug or an undocumented feature, but it has
consequences for lexers that must operate backwards (such as those used
by SMIE).


In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.7)
 of 2019-03-17 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description:	Arch Linux

Recent messages:

Mark set
You did not specify a variable
Type "q" to restore previous buffer. [2 times]
C-x <down> is undefined
funcall-interactively: Beginning of buffer [2 times]
Quit

Mark set
Quit

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LANG: en_GB.utf8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  auto-insert-mode: t
  global-magit-file-mode: t
  diff-auto-refine-mode: t
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  async-bytecomp-package-mode: t
  whitespace-mode: t
  rainbow-delimiters-mode: t
  smartparens-strict-mode: t
  smartparens-mode: t
  company-mode: t
  yas-minor-mode: t
  rainbow-mode: t
  show-paren-mode: t
  flycheck-mode: t
  global-hl-todo-mode: t
  hl-todo-mode: t
  shell-dirtrack-mode: t
  projectile-mode: t
  flx-ido-mode: t
  ido-everywhere: t
  persistent-scratch-autosave-mode: t
  global-subword-mode: t
  subword-mode: t
  save-place-mode: t
  global-auto-revert-mode: t
  override-global-mode: t
  eldoc-mode: t
  mouse-wheel-mode: t
  prettify-symbols-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-compression-mode: t
  buffer-read-only: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Load-path shadows:
/home/fommil/.emacs.d/elpa/hydra-0.14.0/lv hides /home/fommil/.emacs.d/elpa/lv-0.14.0/lv
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch hides /usr/share/emacs/site-lisp/notmuch
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-wash hides /usr/share/emacs/site-lisp/notmuch-wash
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-tree hides /usr/share/emacs/site-lisp/notmuch-tree
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-tag hides /usr/share/emacs/site-lisp/notmuch-tag
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-show hides /usr/share/emacs/site-lisp/notmuch-show
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-query hides /usr/share/emacs/site-lisp/notmuch-query
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-print hides /usr/share/emacs/site-lisp/notmuch-print
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-parser hides /usr/share/emacs/site-lisp/notmuch-parser
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-mua hides /usr/share/emacs/site-lisp/notmuch-mua
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-message hides /usr/share/emacs/site-lisp/notmuch-message
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-maildir-fcc hides /usr/share/emacs/site-lisp/notmuch-maildir-fcc
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-lib hides /usr/share/emacs/site-lisp/notmuch-lib
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-jump hides /usr/share/emacs/site-lisp/notmuch-jump
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-hello hides /usr/share/emacs/site-lisp/notmuch-hello
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-draft hides /usr/share/emacs/site-lisp/notmuch-draft
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-crypto hides /usr/share/emacs/site-lisp/notmuch-crypto
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-compat hides /usr/share/emacs/site-lisp/notmuch-compat
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-company hides /usr/share/emacs/site-lisp/notmuch-company
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/notmuch-address hides /usr/share/emacs/site-lisp/notmuch-address
/home/fommil/.emacs.d/elpa/notmuch-0.28.3/coolj hides /usr/share/emacs/site-lisp/coolj

Features:
(shadow sort mail-extr emacsbug sendmail completion cl-print debug
hippie-exp tabify help-at-pt finder lisp-mnt jka-compr eieio-opt
speedbar sb-image ezimage dframe help-fns radix-tree pulse git-gutter
haskell-doc inf-haskell haskell-decl-scan haskell haskell-completions
haskell-load haskell-commands highlight-uses-mode haskell-modules
haskell-sandbox haskell-navigate-imports haskell-repl haskell-svg
haskell-collapse hideshow haskell-debug haskell-interactive-mode
haskell-presentation-mode haskell-hoogle haskell-process haskell-session
sql view ag vc-svn find-dired vc-git smartparens-javascript js
smartparens-html sgml-mode dom goto-chg misearch multi-isearch
network-stream starttls url-cache github-review s bug-reference
highlight-symbol magit-extras yatemplate autoinsert magit-submodule
magit-obsolete magit-blame magit-stash magit-bisect magit-push
magit-pull magit-fetch magit-clone magit-remote magit-commit
magit-sequence magit-notes magit-worktree magit-tag magit-merge
magit-branch magit-reset magit-collab ghub-graphql treepy graphql ghub
url-http tls gnutls url-gw nsm url-auth url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
mailcap let-alist magit-files magit-refs magit-status magit magit-repos
magit-apply magit-wip magit-log which-func imenu magit-diff smerge-mode
diff-mode magit-core magit-autorevert magit-process magit-margin
magit-mode git-commit magit-git magit-section magit-utils magit-popup
crm log-edit message rmc puny rfc822 mml mml-sec epa derived epg
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 rfc2047 rfc2045 mm-util ietf-drums mail-prsvr mailabbrev
mail-utils gmm-utils mailheader pcvs-util add-log with-editor
async-bytecomp async server whitespace rainbow-delimiters
smartparens-config smartparens-text smartparens-haskell smartparens
company-oddmuse company-keywords company-etags company-gtags
company-dabbrev-code company-dabbrev company-files company-capf
company-cmake company-xcode company-clang company-semantic company-eclim
company-template company-bbdb company yasnippet rainbow-mode paren
elec-pair intellij-theme darcula-theme ox-gfm ox-md ox-odt rng-loc
rng-uri rng-parse rng-match rng-dt rng-util rng-pttrn nxml-parse nxml-ns
nxml-enc xmltok nxml-util ox-latex ox-icalendar ox-html table ox-ascii
ox-publish ox org-element avl-tree generator org org-macro org-footnote
org-pcomplete org-list org-faces org-entities org-version ob-emacs-lisp
ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-comint
org-loaddefs cal-menu calendar cal-loaddefs ob-exp ob-core org-compat
ob-eval org-macs graphviz-dot-mode package-utils pcase
fommil-manuscripts fommil-scala cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs fommil-haskell
hlint-refactor haskell-compile haskell-mode haskell-cabal haskell-utils
haskell-font-lock haskell-indentation haskell-string
haskell-sort-imports haskell-lexeme haskell-align-imports haskell-compat
haskell-complete-module haskell-ghc-support noutline outline
flymake-proc flymake warnings etags dabbrev haskell-customize
fommil-email erc-hl-nicks color erc-button erc-fill erc-stamp wid-edit
erc-goodies erc erc-backend erc-compat pp re-builder flycheck-cask
flycheck json map find-func rx subr-x dash cl hydra lv hl-todo
tramp-cache tramp-sh tramp tramp-compat tramp-loaddefs trampver
ucs-normalize shell pcomplete parse-time format-spec projectile grep
compile comint ansi-color ibuf-ext ibuffer ibuffer-loaddefs thingatpt
flx-ido advice flx ido persistent-scratch midnight xref project ring
dired dired-loaddefs diminish cap-words superword subword edmacro kmacro
cl-extra help-mode saveplace autorevert filenotify use-package
use-package-ensure use-package-delight use-package-diminish
use-package-bind-key bind-key easy-mmode use-package-core finder-inf
ess-generics info package easymenu epg-config url-handlers url-parse
auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache url-vars seq byte-opt gv bytecomp byte-compile cconv
cl-loaddefs cl-lib time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list replace newcomment text-mode elisp-mode lisp-mode
prog-mode register page menu-bar rfn-eshadow isearch timer select
scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 739335 331995)
 (symbols 48 55040 2)
 (miscs 40 697 5902)
 (strings 32 200805 34113)
 (string-bytes 1 5847037)
 (vectors 16 94852)
 (vector-slots 8 2205971 335526)
 (floats 8 388 2086)
 (intervals 56 9116 3117)
 (buffers 992 39))

-- 
Best regards,
Sam




Acknowledgement sent to Sam Halliday <sam.halliday@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#35119; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 1 Sep 2021 09:15:02 UTC

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