GNU bug report logs - #59618
29.0.50; global-whitespace-mode + org-capture: "Marker does not point anywhere"

Previous Next

Package: emacs;

Reported by: Arsen Arsenović <arsen <at> aarsen.me>

Date: Sat, 26 Nov 2022 19:54:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 59618 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Ihor Radchenko <yantar92 <at> posteo.net>
Cc: 59618 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Arsen Arsenović <arsen <at> aarsen.me>,
 Richard Hansen <rhansen <at> rhansen.org>
Subject: Re: bug#59618: 29.0.50; global-whitespace-mode + org-capture: "Marker
 does not point anywhere"
Date: Sat, 26 Nov 2022 22:54:25 -0800
Ihor Radchenko <yantar92 <at> posteo.net> writes:

> Stefan Kangas <stefankangas <at> gmail.com> writes:
>
>> I fail to reproduce this bug using this recipe.
>>
>> Could you please clarify what exactly you did in step 5 and 6?
>
> Let me provide the detailed recipe I used:
>
> 1. rm ~/.notes (this is the default capture target)
> 2. emacs-29-vcs -Q --execute '(global-whitespace-mode)'
> 3. M-x org-capture <RET> t C-c C-c
> 4. M-x org-capture <RET> t
> 5. M-x toggle-debug-on-error
> 6. C-x b .notes
> 7. C-s %? <RET>
> 8. C-a
> 9. C-<SPC> M-> C-w

Thanks, I can reproduce the backtrace now.

Stepping through `whitespace--update-bob-eob' with edebug shows that the
`goto-char' in this fragment fails, because `whitespace-bob-marker' is
nil:

    (save-excursion
      (goto-char whitespace-bob-marker)
      ;; Any change in the first non-`empty'
      ;; line, even if it's not the first
      ;; character in the line, can potentially
      ;; cause subsequent lines to become
      ;; classified as `empty' (e.g., delete the
      ;; "x" from " x").
      (forward-line 1)
      (point))

The `whitespace--update-bob-eob' function is new in Emacs 29 and was
added in commit f47a5324f44e by Richard Hansen (in Cc).

Here is the backtrace again, for reference:

Debugger entered--Lisp error: (error "Marker does not point anywhere")
  whitespace--update-bob-eob(37 37 29)
  delete-and-extract-region(37 66)
  #f(compiled-function (beg end delete) #<bytecode
0x15337359c91d96f1>)(37 66 delete)
  apply(#f(compiled-function (beg end delete) #<bytecode
0x15337359c91d96f1>) (37 66 delete))
  #f(compiled-function (funs global args) #<bytecode
-0xf6c557b8176d62>)(nil nil (37 66 delete))
  buffer-substring--filter(37 66 delete)
  filter-buffer-substring(37 66 delete)
  #f(compiled-function (method) #<bytecode -0x2fb4b4ebabaf02c>)(delete)
  kill-region(37 66 region)
  funcall-interactively(kill-region 37 66 region)
  command-execute(kill-region)




This bug report was last modified 2 years and 189 days ago.

Previous Next


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