From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#59618: 29.0.50; global-whitespace-mode + org-capture: "Marker does not point anywhere" Date: Sat, 26 Nov 2022 22:54:25 -0800 Message-ID: References: <86pmd969ps.fsf@aarsen.me> <83tu2lqyi6.fsf@gnu.org> <874juljl6h.fsf@localhost> <87k03gj4uw.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="676"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59618@debbugs.gnu.org, Eli Zaretskii , Arsen =?UTF-8?Q?Arsenovi=C4=87?= , Richard Hansen To: Ihor Radchenko Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 27 07:55:47 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ozBZr-000AVo-6z for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 27 Nov 2022 07:55:47 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ozBZB-0000yQ-MG; Sun, 27 Nov 2022 01:55:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ozBZ9-0000xy-Qw for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2022 01:55:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ozBZ8-0005ud-7S for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2022 01:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ozBZ7-0007Ap-Mn for bug-gnu-emacs@gnu.org; Sun, 27 Nov 2022 01:55:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Nov 2022 06:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59618 X-GNU-PR-Package: emacs Original-Received: via spool by 59618-submit@debbugs.gnu.org id=B59618.166953207727545 (code B ref 59618); Sun, 27 Nov 2022 06:55:01 +0000 Original-Received: (at 59618) by debbugs.gnu.org; 27 Nov 2022 06:54:37 +0000 Original-Received: from localhost ([127.0.0.1]:41954 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozBYi-0007AD-Nq for submit@debbugs.gnu.org; Sun, 27 Nov 2022 01:54:37 -0500 Original-Received: from mail-oi1-f178.google.com ([209.85.167.178]:36481) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ozBYe-0007A6-6K for 59618@debbugs.gnu.org; Sun, 27 Nov 2022 01:54:35 -0500 Original-Received: by mail-oi1-f178.google.com with SMTP id s206so8572406oie.3 for <59618@debbugs.gnu.org>; Sat, 26 Nov 2022 22:54:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=Wg9PPFbmWP/NH/OXYTBYXLObbnIzM9SJWBwE/BEj6+8=; b=GK7mDZ3wqvah7Rt815ivQP8ZNcnyCe9iCXKMAhgtReFz3WLunt+8IcZQsIbNj5SqJS UsBc0FACKeuRW7+vpA1I5TJKjDxKjiLQAK4pdKQ4EYQaKhyL8Xt9KpgLNY1ThMugEBzP 3brYmU0b5AwEC/IUC/lKVnrdazAvPbMKYV+YjYYCfdG7REGJaiqZ74BaTqG4FNlDlQ7X yKm1rKiJBfBxSQn4uEu8kKa/6Z9l9ZMpuuqLWd6yfbALN2AnFVFDOtb3zkqOttV7aaD2 IC9IAICZvg8BxDvXuK/jogG1zvoiLCubp4gUVOdjN6D2f1FME4ggV+lquDj0GnJLstFe aD0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Wg9PPFbmWP/NH/OXYTBYXLObbnIzM9SJWBwE/BEj6+8=; b=KxovMFGyfPmbNMmKcJLQk8IWRLpSJs8kDddqrrfmb5DoVtedf5H188iKVEQ4iV9WK9 co3ztrK0/4kRNWTii005oTgx5Z42hINrdxKUIr+Qt20WQbGoznv+473Y/MpNlMR6wtRo MgISINVZSvzKJYDsmoysmvZ5l3XMx8mtC1Nov2SAdcx2LehM7m4Oj06luDBxGYynti+E tg/7EpXa+VB0+sUfMfzPt9wAWcJ0x0jbT/trThbqi/azRCFTFHzF1dTwh85vSCVlPyN3 Ey3HXnUZTjSBEpodfRoaNRlsrD66x/RmMJtYURe3xmi5sojWH1HS0PyCk39y5a4gJKUj Dc4w== X-Gm-Message-State: ANoB5pnPJDB2wB8hnDslTCrbjikiNaO21k41lzbJl0ILb22yjkjyP32E Ayckr/Pb9Dz5PPbipKJ2irCXCeXY3+dmRmFmlp0= X-Google-Smtp-Source: AA0mqf5/XXtyCJtIN+gzdj8ek5Upot67gh695ZTcc3j7v2kODBHV6dRV8MM0AvbFnQZxiZqlMN33IzXDpE18dhpo4pw= X-Received: by 2002:a05:6808:1287:b0:359:dc32:4f9e with SMTP id a7-20020a056808128700b00359dc324f9emr13450216oiw.92.1669532066450; Sat, 26 Nov 2022 22:54:26 -0800 (PST) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 26 Nov 2022 22:54:25 -0800 In-Reply-To: <87k03gj4uw.fsf@localhost> X-Hashcash: 1:20:221127:rhansen@rhansen.org::YylNdff8cD5B2t3e:so3 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:249177 Archived-At: Ihor Radchenko writes: > Stefan Kangas 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 t C-c C-c > 4. M-x org-capture t > 5. M-x toggle-debug-on-error > 6. C-x b .notes > 7. C-s %? > 8. C-a > 9. C- 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) #)(37 66 delete) apply(#f(compiled-function (beg end delete) #) (37 66 delete)) #f(compiled-function (funs global args) #)(nil nil (37 66 delete)) buffer-substring--filter(37 66 delete) filter-buffer-substring(37 66 delete) #f(compiled-function (method) #)(delete) kill-region(37 66 region) funcall-interactively(kill-region 37 66 region) command-execute(kill-region)