Received: (at 79850) by debbugs.gnu.org; 20 Nov 2025 17:59:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 20 12:59:31 2025
Received: from localhost ([127.0.0.1]:49680 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vM8wN-0001hs-FY
for submit <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:59:31 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:54750)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
id 1vM8wM-0001hd-AF
for 79850 <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:59:30 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CC04C4416C4;
Thu, 20 Nov 2025 12:59:24 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1763661563;
bh=wTNnDrRibLehrPMoNH66folr+tKkLHWGmjPRKtgUdoQ=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=L6ekwdIgw1SzjJAj15txVx8v4/czDRYWg65NZw2b3DilNzGFdtER2/mCb2Zp8NkP8
U/Wciq/a8N9eh2lHCmrvpK/AzlY6JUMhJyj9VtbAjPtUwhCyz+3oRhw6Y9CZSYJa+8
uVx2zcjN9LO6I5hcOZp3MdElSqKRlqB+8u0JKqFE1Ol1G1kxgvc020VE4CDvpW6LWH
m24+hzH7hVHRnh4VbmJpl+sRdsuvsRZ3LAR1A4XcTi/Xuqth5IgN/9lTfIC98zK3cy
CJxgzKfIT3vBhRMIqfQrlB5Hrk3Pmdf+rTHzyEo2A7+ZaDHqj903FBCfnJGSGihSJg
MlBEFbIzwInMA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C37524416C1;
Thu, 20 Nov 2025 12:59:23 -0500 (EST)
Received: from asado (unknown [181.28.45.30])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4D25912058A;
Thu, 20 Nov 2025 12:59:22 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#79850: Wrong column with overlays
In-Reply-To: <86cy5eji8p.fsf@HIDDEN>
Message-ID: <jwvldk0k2m4.fsf-monnier+emacs@HIDDEN>
References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN>
<87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN>
<jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> <86ms4jjpnv.fsf@HIDDEN>
<jwvo6oznh4m.fsf-monnier+emacs@HIDDEN> <86cy5eji8p.fsf@HIDDEN>
Date: Thu, 20 Nov 2025 12:59:19 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.120 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain
DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
domain
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79850
Cc: 79850 <at> debbugs.gnu.org, juri@HIDDEN
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 (---)
>> But if so, we need to figure out how to recognize "indentation code".
> ...this is the hard nut to crack, indeed. One possible way is to have
> the "indentation code" identify itself. The relevant commands could
> bind some variable to do that, for example. Would that work?
I don't think we'd want a variable that says "we're indenting".
I'd rather have a variable that says "ignore display/invisible thingies
when computing columns".
Stefan
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.
Received: (at 79850) by debbugs.gnu.org; 20 Nov 2025 17:58:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 20 12:58:18 2025
Received: from localhost ([127.0.0.1]:49666 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vM8vB-0001dr-VN
for submit <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:58:18 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31507)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
id 1vM8v9-0001dP-Cd
for 79850 <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:58:15 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0EBEB81ADE;
Thu, 20 Nov 2025 12:58:10 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1763661489;
bh=m7ufLMAR/wFQXlK/SOtgsZSC5BwD9t0uLXZpnWf/Pg8=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=V/WevomFoE/0c7s5MeCacXNrNZQ5VZU9E/NOzlnLXX01KjE28BfTLwpYNL3osuajH
xm/sr7g6GoHL9DuD4Qa+kkyjNCes+h54rbWXkfxs0ghB5kfPglEAgdrGmgoCNVO0sB
VRgYw7lhxF2buK2qSbeHAj/ZiNI+MVvBx7oqN18EZEVxfwnyOm1oO1f6zYLVt8likS
k6RAjKoTYo/FDM4WuN9GTA1NLJht9hM2pTOeKVXSBwQJSnphOJPO0Nw/iZMoQvb+fd
7mNx6ws575674w0TERXfPZpxOXdO8eYORer2LRug5U0vBS/WgGYbcEBLDBCOAgOehW
ZTNsddJDsCmZQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 528E280523;
Thu, 20 Nov 2025 12:58:09 -0500 (EST)
Received: from asado (unknown [181.28.45.30])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id BD6C01201BF;
Thu, 20 Nov 2025 12:58:07 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#79850: Wrong column with overlays
In-Reply-To: <jwv7bvklhxc.fsf-monnier+emacs@HIDDEN>
Message-ID: <jwvqztsk2o0.fsf-monnier+emacs@HIDDEN>
References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN>
<87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN>
<jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> <86ms4jjpnv.fsf@HIDDEN>
<jwvo6oznh4m.fsf-monnier+emacs@HIDDEN>
<87h5uoirtx.fsf@HIDDEN>
<jwv7bvklhxc.fsf-monnier+emacs@HIDDEN>
Date: Thu, 20 Nov 2025 12:58:04 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.250 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain
DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
domain
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79850
Cc: Eli Zaretskii <eliz@HIDDEN>, 79850 <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 (---)
>>> Maybe changing the indentation code so it temporarily sets a flag that
>>> causes current-column and friends to ignore `invisible` and `display`
>>> properties is the better option?
> Worth a try.
Ahem <blush>!
I didn't remember writing that, sorry.
Stefan
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.
Received: (at 79850) by debbugs.gnu.org; 20 Nov 2025 17:43:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 20 12:43:21 2025
Received: from localhost ([127.0.0.1]:49565 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vM8gi-00069i-PB
for submit <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:43:21 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13204)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
id 1vM8ge-00068n-Q0
for 79850 <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:43:17 -0500
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B8EA84416C0;
Thu, 20 Nov 2025 12:43:10 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1763660589;
bh=INOnh6RKvpY9cKF2OXoN/apYOEH2LILS5DNjMdN7Sp8=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=Y6iLPgx2jDDj+5KtEgLhzk34w1sffWFy0CIobygDmwGI6bgi8RmYG1MWvEB+yGtvc
V/atZVvsKfBnjrTLynLyzj6yv+TJFq62qtZZQyaxRub3MkJKQVCSB+lU6NZdSz6uAm
6FYHnPUOX0WEY0eUVrmp1eYgo98PKk/5QFcyUVff3wgNX8ZOT9Fw4RLdjRON6m+1+O
xRU02hFsmKSqP6kpTcDKJw3MoEAuxLsz+reWjMVL+RRWRTr6PtSsmSbsocF9MPrREA
8Gi6eRKsa8IfGQ+ujUjmCVyPKvoKFiNXRWyFrkzb2lBSeZou9TKqwYdWUBACTLCN0C
6DshW1NbETCmw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id CABDD4416BB;
Thu, 20 Nov 2025 12:43:09 -0500 (EST)
Received: from asado (unknown [181.28.45.30])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 764B812009D;
Thu, 20 Nov 2025 12:43:08 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#79850: Wrong column with overlays
In-Reply-To: <87h5uoirtx.fsf@HIDDEN>
Message-ID: <jwv7bvklhxc.fsf-monnier+emacs@HIDDEN>
References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN>
<87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN>
<jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> <86ms4jjpnv.fsf@HIDDEN>
<jwvo6oznh4m.fsf-monnier+emacs@HIDDEN>
<87h5uoirtx.fsf@HIDDEN>
Date: Thu, 20 Nov 2025 12:43:04 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.121 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain
DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
domain
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79850
Cc: Eli Zaretskii <eliz@HIDDEN>, 79850 <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 (---)
>> Maybe changing the indentation code so it temporarily sets a flag that
>> causes current-column and friends to ignore `invisible` and `display`
>> properties is the better option?
Worth a try.
Stefan
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.Received: (at 79850) by debbugs.gnu.org; 20 Nov 2025 17:37:56 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 20 12:37:56 2025 Received: from localhost ([127.0.0.1]:49530 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vM8bU-0005oa-EG for submit <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:37:56 -0500 Received: from mout-p-103.mailbox.org ([2001:67c:2050:0:465::103]:50312) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vM8bS-0005oD-8c for 79850 <at> debbugs.gnu.org; Thu, 20 Nov 2025 12:37:54 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4dC5CZ3R5dz9stP; Thu, 20 Nov 2025 18:37:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1763660266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KRmzB23C0yswYyKVMWBllYZGoC59Na2CnmEDEtWpc4U=; b=skzIyp7Xkw75wIg5f472n0UPHGgwlyhEMzMe+lTLwKN379qOHJ6Xo4aeBWlDygKj+3vTg0 vrxghb3HEtMeATxc2xm+OcifQmH/D+CEujTVeJ1rSzr31jh1lLiXM+eItFcOawCAlC6eQt IsYsw/eanhiEoDM7y+jL+4r6EKoEprM65nFDBbJsJyLY2p0Y/VZ8C6RlE9NYNiHeeKhzys HbdtYJca2CZe4wdaVDKTuPoAnX22dlnobNAolN2PHFhLPUHqUPrICCZpTJfvDZB5yw7GDw JCRIB0NG1CKeFYgbUxzZFVUuwukGFlPaO5ZfK+ufoFkWmIRSRBwgmoGmpKwTiw== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates 2001:67c:2050:b231:465::102 as permitted sender) smtp.mailfrom=juri@HIDDEN From: Juri Linkov <juri@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> Subject: Re: bug#79850: Wrong column with overlays In-Reply-To: <jwvo6oznh4m.fsf-monnier+emacs@HIDDEN> Organization: LINKOV.NET References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN> <87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN> <jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> <86ms4jjpnv.fsf@HIDDEN> <jwvo6oznh4m.fsf-monnier+emacs@HIDDEN> Date: Thu, 20 Nov 2025 19:33:42 +0200 Message-ID: <87h5uoirtx.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4dC5CZ3R5dz9stP X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79850 Cc: Eli Zaretskii <eliz@HIDDEN>, 79850 <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.7 (-) > Maybe changing the indentation code so it temporarily sets a flag that > causes current-column and friends to ignore `invisible` and `display` > properties is the better option? I've tested that indentation commands don't delete hidden text anymore when `check_display_width` returns -1. So indentation commands could bind a new variable to be checked in `check_display_width`.
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.Received: (at 79850) by debbugs.gnu.org; 19 Nov 2025 12:54:09 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 19 07:54:09 2025 Received: from localhost ([127.0.0.1]:36803 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vLhhJ-0001HZ-0S for submit <at> debbugs.gnu.org; Wed, 19 Nov 2025 07:54:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:59306) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vLhhG-0001Gq-Dh for 79850 <at> debbugs.gnu.org; Wed, 19 Nov 2025 07:54:07 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vLhhA-0000ZQ-Uv; Wed, 19 Nov 2025 07:54:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=gG3IMlilWG40myX5VcUBQwntRpucRnycI7JrVtLI970=; b=YtzANvOzHyBw KebouBnJ7DxFhTEu7FZ4MhKSTJPdDfjuzZUbYor4Mtc5ut1+AqQGHtcOZEYAoCkf6v0hEteR3XrFq 8aT+vS7xqpLRHyMhZpS0ccoXQFIL3EcbLonJNxUIodWTMavk6NQIMNJ686G09KjCxJ73fmbCody0D XB+z0vGD3SPi76tf6cGoEEsnHyx9uNNO7VkvL7PWSa0cBTRQUgTGrTAXyea3Y++lbqXrAEOouoN2I YwhvIFoniJ6P0H80776OUlWXw/dlW7oFE0T/ZukvzzsDzKToihW8jFKry4TcNJ8mMAhYIprF1kAYs JCUwM7IuthUTkoKcJP6M7w==; Date: Wed, 19 Nov 2025 14:53:58 +0200 Message-Id: <86cy5eji8p.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <jwvo6oznh4m.fsf-monnier+emacs@HIDDEN> (message from Stefan Monnier on Tue, 18 Nov 2025 17:01:39 -0500) Subject: Re: bug#79850: Wrong column with overlays References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN> <87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN> <jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> <86ms4jjpnv.fsf@HIDDEN> <jwvo6oznh4m.fsf-monnier+emacs@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79850 Cc: 79850 <at> debbugs.gnu.org, juri@HIDDEN 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 (---) > From: Stefan Monnier <monnier@HIDDEN> > Cc: juri@HIDDEN, 79850 <at> debbugs.gnu.org > Date: Tue, 18 Nov 2025 17:01:39 -0500 > > Maybe changing the indentation code so it temporarily sets a flag that > causes current-column and friends to ignore `invisible` and `display` > properties is the better option? That's doable. But... > But if so, we need to figure out how to recognize "indentation code". ...this is the hard nut to crack, indeed. One possible way is to have the "indentation code" identify itself. The relevant commands could bind some variable to do that, for example. Would that work?
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.
Received: (at 79850) by debbugs.gnu.org; 18 Nov 2025 22:02:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 18 17:02:07 2025
Received: from localhost ([127.0.0.1]:59989 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vLTm3-00069V-6K
for submit <at> debbugs.gnu.org; Tue, 18 Nov 2025 17:02:07 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:17466)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
id 1vLTm0-00068q-UB
for 79850 <at> debbugs.gnu.org; Tue, 18 Nov 2025 17:02:05 -0500
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id CA96D10068D;
Tue, 18 Nov 2025 17:01:58 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1763503318;
bh=PX6SCMrNztUOFulM934ikQ00+YKXz0UPHbAB+hf5OeA=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=YouXQMn2Z36glJ0IDQK4oM3G+WtVzVQC6sGpmzdEIR1HNsIvMkJPA24BVOrmcrK0l
BtNz39u8HVZ6y5ErA8z+F3qhyUb6nPKK/1OcM7WHpnY+JLBCvAsveipnERPUxGHEVx
bTdwUEBCS4Wd6kQuGOdbvTxe3eZolY+Zq9ONA5wp8vnwfmesCZAalzL2qpYDR50xJS
FKrHAJBBS0HVW6OCHUBXFG94VPnZmONCLO2eYmnXKmRwyasHnrwnXVhk80XnoIsS0Q
VZtEwzcUPgf3e0uvpX4TtOOR3zk16OoQXIopiR2QlbLxq/5lJ4c2qMF/scGiSrSI/1
4aXq8O1WZ5b9w==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id F05C710025E;
Tue, 18 Nov 2025 17:01:57 -0500 (EST)
Received: from asado (unknown [181.28.45.30])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7F818120052;
Tue, 18 Nov 2025 17:01:56 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#79850: Wrong column with overlays
In-Reply-To: <86ms4jjpnv.fsf@HIDDEN>
Message-ID: <jwvo6oznh4m.fsf-monnier+emacs@HIDDEN>
References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN>
<87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN>
<jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> <86ms4jjpnv.fsf@HIDDEN>
Date: Tue, 18 Nov 2025 17:01:39 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.196 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain
DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
domain
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79850
Cc: 79850 <at> debbugs.gnu.org, juri@HIDDEN
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 (---)
> But the question we should IMO start from is whether people expect to
> indent such text as if the invisible and display properties were not
> there at all. It's definitely so for buffers which use those
> properties to "beautify" source code or play some visual games with
> it, but what about other buffers, whose text is not a program source?
My previous reply includes some partial answers:
- For text hidden by outline-minor-mode (or similar packages like
hs-minor-mode), we want to pretend during indentation that
the hidden text is not hidden.
- For text hidden by outline-minor-mode (or similar packages like
hs-minor-mode), during cursor movement OTOH we do want to pretend the
the hidden text is absent.
- When trying to align columns of text where some columns are truncated
by hiding part of the content, we want to pretend the the hidden text
is absent.
- Of course a buffer may have some text hidden by hs-minor-mode and some
text hidden by prettifiers. Not sure if we want to handle
both equally.
Maybe changing the indentation code so it temporarily sets a flag that
causes current-column and friends to ignore `invisible` and `display`
properties is the better option?
But if so, we need to figure out how to recognize "indentation code".
Stefan
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.Received: (at 79850) by debbugs.gnu.org; 18 Nov 2025 16:01:35 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 18 11:01:35 2025 Received: from localhost ([127.0.0.1]:58615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vLO99-0007oY-22 for submit <at> debbugs.gnu.org; Tue, 18 Nov 2025 11:01:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:47762) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vLO96-0007oK-If for 79850 <at> debbugs.gnu.org; Tue, 18 Nov 2025 11:01:33 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vLO90-0003TI-Tu; Tue, 18 Nov 2025 11:01:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/DWKC64fgSvDZyR+xerQS4MUF9kD33grn95Yh5iRZ4A=; b=sPRt4sBefB94 WKPMC3+uLChYYIH6Ce01fVfTEDV8S3yu8uSQ/HPRq8Xvs83dugxNWZir/gKmW6q0xzm1Tclp7Itp4 I50Zkihx3C6IIznUNTaa3MdYHAvZpauJwzF5pUvGqL/koyJWIkpXZH2tILdB8uZZqEQ+Dm7sOp2uh m7RnqyJ0I7h5lSY3ECKiF7PXU4/S9mB46SJmJa3iAXAR9KbeE98mJgu0mybo98d3j9k5JUK6LwX8s nDpmOEJMcq8hyt6B4X2MSGJn0JauWuASnf3CRt45iM4KoZd8pg9TX8A+3M38ZgOECGuT3eJ4WQtjM 8n4pE4BgBsIFrMBG6avDTg==; Date: Tue, 18 Nov 2025 18:01:24 +0200 Message-Id: <86ms4jjpnv.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> (message from Stefan Monnier on Tue, 18 Nov 2025 10:50:03 -0500) Subject: Re: bug#79850: Wrong column with overlays References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN> <87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN> <jwvzf8jny8r.fsf-monnier+emacs@HIDDEN> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79850 Cc: 79850 <at> debbugs.gnu.org, juri@HIDDEN 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 (---) > From: Stefan Monnier <monnier@HIDDEN> > Cc: Juri Linkov <juri@HIDDEN>, 79850 <at> debbugs.gnu.org > Date: Tue, 18 Nov 2025 10:50:03 -0500 > > > We don't have that currently. We could provide such APIs, or maybe > > add optional flag arguments to current-column and friends, but we > > first need to see if all the users/callers of indentation commands and > > of current-column in indentation context will necessarily want to > > ignore invisibility and display properties. It isn't clear to me. > > IIRC the current situation is mixed: > > `current-column` treats "fully invisible" text as 0-width (so if > a function's body is temporarily hidden this way, indent-region > will tend to mess up the indentation of the hidden text), whereas if > it's "replaced by an ellipsis" (according to > `buffer-invisibility-spec`), then `current-column` pretends the text is > actually visible. > > This distinction was introduced so that you can reindent a buffer even > when parts of it are folded with outline-minor-mode. > > It sadly doesn't always do the right thing. E.g. when trying to align > columns of a table where overflowing column elements are truncated with > an ellipsis. > > So this is not quite flexible enough. And the situation is worse for > `display` properties where we don't even have anything like > `buffer-invisibility-spec` to control how to count each element. For display properties, we currently simply count the width of the display string or image on the screen, in columns. This, of course, breaks when the display string includes embedded newlines or the covered text includes newlines (as in this case). But the question we should IMO start from is whether people expect to indent such text as if the invisible and display properties were not there at all. It's definitely so for buffers which use those properties to "beautify" source code or play some visual games with it, but what about other buffers, whose text is not a program source?
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.
Received: (at 79850) by debbugs.gnu.org; 18 Nov 2025 15:50:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 18 10:50:17 2025
Received: from localhost ([127.0.0.1]:58563 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vLNyC-0007DV-Lx
for submit <at> debbugs.gnu.org; Tue, 18 Nov 2025 10:50:17 -0500
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21268)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
id 1vLNyA-00078H-Ib
for 79850 <at> debbugs.gnu.org; Tue, 18 Nov 2025 10:50:15 -0500
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 417A581C86;
Tue, 18 Nov 2025 10:50:09 -0500 (EST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
s=mail; t=1763481008;
bh=asLWikHJebOjWLPigfiNrcHYcFMr8t6uOETeFUw+QAY=;
h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
b=LF3pwleh7Bg1nnDnDFfEWPi/k+ZdSOBw6Otps85kgNL/xpnqdIfgWBwUZacp5Vrmy
QLlvmTIGjVvJpDgLsGKlr2MVJ15S7uvg+BXKUrguV/TWMRBv42zjkdpZw7WsrhUcXQ
cqVp5zm0VS4nhvnMTU1JSm67o2VlZFWIvlCX7Lk4XGvj36Ag80hEiQmOdEUGyBDJdb
AVkSIiYNWyXkAULkie3wAX0w7A9tfRl5ianrqQhfk+NsE+r3ZWjQ8MMT1piuJtOy9l
gc9zfjAkbhtlyIR22EHygBKyIXJuN6plOt7DPFJRj/fJVnjRpp26nzG68T1Hq8nmGb
ECXq5lItgVbww==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7496180B13;
Tue, 18 Nov 2025 10:50:08 -0500 (EST)
Received: from asado (unknown [181.28.45.30])
by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C61781203B5;
Tue, 18 Nov 2025 10:50:06 -0500 (EST)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#79850: Wrong column with overlays
In-Reply-To: <86v7j7jrxq.fsf@HIDDEN>
Message-ID: <jwvzf8jny8r.fsf-monnier+emacs@HIDDEN>
References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN>
<87seec4mt4.fsf@HIDDEN> <86v7j7jrxq.fsf@HIDDEN>
Date: Tue, 18 Nov 2025 10:50:03 -0500
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results: 0
ALL_TRUSTED -1 Passed through trusted hosts only via SMTP
AWL -0.234 Adjusted score from AWL reputation of From: address
BAYES_00 -1.9 Bayes spam probability is 0 to 1%
DKIM_SIGNED 0.1 Message has a DKIM or DK signature,
not necessarily valid
DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
domain
DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
domain
X-SPAM-LEVEL:
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 79850
Cc: 79850 <at> debbugs.gnu.org, Juri Linkov <juri@HIDDEN>
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 (---)
> We don't have that currently. We could provide such APIs, or maybe
> add optional flag arguments to current-column and friends, but we
> first need to see if all the users/callers of indentation commands and
> of current-column in indentation context will necessarily want to
> ignore invisibility and display properties. It isn't clear to me.
IIRC the current situation is mixed:
`current-column` treats "fully invisible" text as 0-width (so if
a function's body is temporarily hidden this way, indent-region
will tend to mess up the indentation of the hidden text), whereas if
it's "replaced by an ellipsis" (according to
`buffer-invisibility-spec`), then `current-column` pretends the text is
actually visible.
This distinction was introduced so that you can reindent a buffer even
when parts of it are folded with outline-minor-mode.
It sadly doesn't always do the right thing. E.g. when trying to align
columns of a table where overflowing column elements are truncated with
an ellipsis.
So this is not quite flexible enough. And the situation is worse for
`display` properties where we don't even have anything like
`buffer-invisibility-spec` to control how to count each element.
Stefan
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.Received: (at 79850) by debbugs.gnu.org; 18 Nov 2025 15:12:30 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Nov 18 10:12:30 2025 Received: from localhost ([127.0.0.1]:58395 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vLNNe-0004vI-3P for submit <at> debbugs.gnu.org; Tue, 18 Nov 2025 10:12:30 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60222) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vLNNb-0004v1-Md for 79850 <at> debbugs.gnu.org; Tue, 18 Nov 2025 10:12:28 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vLNNV-0005J2-VR; Tue, 18 Nov 2025 10:12:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=FuQlsN5kN+fvgzzNsPSlh2hw5zBCKd261sCDlAt9Ke4=; b=Oe8tudEHMmhTVW6GnJBw D7Xat8L7yzEZddknjJMavGdzsbDBkr6dpE0J9NzZ8MZritW88YJZLqYzkbfr7Kah0EjFB6++78/nH Qj1fPc/bu97iBFeu5WxyPQoYooXrxIExX2qbSlsgOteJMRYao9/kB3afKmlZhJedZgjavpWfe6aZu LTrZx3SvOLihO5iwahReEIdVg3yhsC0UvlRnk1u1V4nfMPZkKlpEik4Var2HVKjPnsyi/e9qe3D2R WkurUwhaqGZiUkIyfe2LikZah5Xhwf3wLvnDuWSYcqLC7yjOQPCuWJjqAwWdrXzb446xcP9248zqA poiBrAUkBRTbtQ==; Date: Tue, 18 Nov 2025 17:12:17 +0200 Message-Id: <86v7j7jrxq.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Juri Linkov <juri@HIDDEN> In-Reply-To: <87seec4mt4.fsf@HIDDEN> (message from Juri Linkov on Mon, 17 Nov 2025 19:12:11 +0200) Subject: Re: bug#79850: Wrong column with overlays References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN> <87seec4mt4.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79850 Cc: 79850 <at> debbugs.gnu.org, monnier@HIDDEN 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 (---) > From: Juri Linkov <juri@HIDDEN> > Cc: Stefan Monnier <monnier@HIDDEN>, 79850 <at> debbugs.gnu.org > Date: Mon, 17 Nov 2025 19:12:11 +0200 > > > Sorry, I don't understand: what glyph on display was expected to have > > column = 2? After step 5 above, I see this on display: > > > > (defun test (&optional arg) > > (unless arg[1 line…])) > > > > where the text inside [..] is a display string, and the brackets are > > just for legibility, they are not really displayed. With the above on > > display, if I go to the opening paren of "(unless" and type "C-x =", I > > see column = 2, which is correct. If I go to the first closing parent > > after the display property and type "C-x =", I see column = 7, which > > is again correct (or as correct as Emacs can do -- I can explain if > > needed). The next closing parent has column = 8, which is again > > correct. What did I miss? > > The problem is that when the block is not hidden, then 'current-column' > returns 2 instead of 8 at the same position. Well, invisible text and display properties are expected to change the column returned by current-column. > It seems the current implementation of 'indent-line-to' > wrongly assumes that 'current-column' operates on the text > in the buffer whereas it operates on its visual representation. I think no one expected people to reindent text whose portions are not shown. What do people expect from that? The columns of the visible text could be completely off, even if display properties are not involved. > > P.S. Indentation commands are generally unreliable when display > > features are used that affect the return value of current-column, > > move-to-column, and other functions that compute the column, because > > those count _visual_ columns (or at least attempt to do so), whereas > > indentation of code must use physical character columns in the buffer, > > not what's on display. > > Agreed. Is there a function like 'current-column' that would use > only non-visual character columns in the buffer? We don't have that currently. We could provide such APIs, or maybe add optional flag arguments to current-column and friends, but we first need to see if all the users/callers of indentation commands and of current-column in indentation context will necessarily want to ignore invisibility and display properties. It isn't clear to me. Alternatively, indentation commands could momentarily toggle off the hiding features, then toggle them back after indentation is done. This is worth a serious discussion on emacs-devel, what with outline and hideshow being more and more popular in programming-language buffers. We need a better understanding of what is expected from indentation commands in those cases.
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.Received: (at 79850) by debbugs.gnu.org; 17 Nov 2025 17:12:38 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 17 12:12:38 2025 Received: from localhost ([127.0.0.1]:53557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vL2mL-0004rj-Rl for submit <at> debbugs.gnu.org; Mon, 17 Nov 2025 12:12:38 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:52390) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vL2mI-0004r5-QJ for 79850 <at> debbugs.gnu.org; Mon, 17 Nov 2025 12:12:35 -0500 Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4d9Dnl04Xsz9tPN; Mon, 17 Nov 2025 18:12:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001; t=1763399547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PnMMx1EWlEl8/YdwVXa+Wz2jfGrXrvdd0/5XbIiBx3c=; b=tC0PsBA8EZnJZNqAJJS6xaCjvzE5vwWPYGBqhWv9K/FmQBL6lVQQ4ATJwi7xEKhudqYg2v oZLy/PrES0UtRXko/V2bDdAZyohm4o/MbVQeryIfG5jsRPoSl43z0G7z8Iz1IDHuH7sAzv dVfyIASoezV3adjOozaGuipsfB/+osUGpT+4toaqbEf20zzC5ANgYfe+pU5VeNHoP0FVzi 2GDxUAglHT+QjKNQ3TA6++EAfbQZ8NnzKbm5JPPRkSroymUR2dd1vgN3PWbWlgnseR1se9 jcP1KK+dU50cOwyjzt1m4UuqiYw4RrW+mqlWRi7RVQo/s0Lk3WVg9HDE6bKddw== From: Juri Linkov <juri@HIDDEN> To: Eli Zaretskii <eliz@HIDDEN> Subject: Re: bug#79850: Wrong column with overlays In-Reply-To: <86h5uslrq9.fsf@HIDDEN> Organization: LINKOV.NET References: <87zf8lazz1.fsf@HIDDEN> <86h5uslrq9.fsf@HIDDEN> Date: Mon, 17 Nov 2025 19:12:11 +0200 Message-ID: <87seec4mt4.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 79850 Cc: 79850 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN> 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.7 (-) > Sorry, I don't understand: what glyph on display was expected to have > column = 2? After step 5 above, I see this on display: > > (defun test (&optional arg) > (unless arg[1 line…])) > > where the text inside [..] is a display string, and the brackets are > just for legibility, they are not really displayed. With the above on > display, if I go to the opening paren of "(unless" and type "C-x =", I > see column = 2, which is correct. If I go to the first closing parent > after the display property and type "C-x =", I see column = 7, which > is again correct (or as correct as Emacs can do -- I can explain if > needed). The next closing parent has column = 8, which is again > correct. What did I miss? The problem is that when the block is not hidden, then 'current-column' returns 2 instead of 8 at the same position. > The closing paren after the display property reports column = 8, which > is again "as correct as it gets" in Emacs. The text for which this > snippet searches: > > (search-forward "unless") > (goto-char (pos-bol)) > (skip-chars-forward " \t") > > is entirely invisible, and covered by a display property, so it is > unclear to me why you expected current-column to ignore both the > invisible property and the display string, and return results as if > neither of these properties existed. That's not what current-column > does, and that is documented: > > This is calculated by adding together the widths of all the displayed > representations of the character between the start of the previous line > and point (e.g., control characters will have a width of 2 or 4, tabs > will have a variable width). > [...] > Text that has an invisible property is considered as having width 0, unless > ‘buffer-invisibility-spec’ specifies that it is replaced by an ellipsis. > > Or what am I missing? It seems the current implementation of 'indent-line-to' wrongly assumes that 'current-column' operates on the text in the buffer whereas it operates on its visual representation. > P.S. Indentation commands are generally unreliable when display > features are used that affect the return value of current-column, > move-to-column, and other functions that compute the column, because > those count _visual_ columns (or at least attempt to do so), whereas > indentation of code must use physical character columns in the buffer, > not what's on display. Agreed. Is there a function like 'current-column' that would use only non-visual character columns in the buffer?
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.Received: (at 79850) by debbugs.gnu.org; 17 Nov 2025 13:21:49 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 17 08:21:48 2025 Received: from localhost ([127.0.0.1]:51266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1vKzAy-0008WG-Ad for submit <at> debbugs.gnu.org; Mon, 17 Nov 2025 08:21:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:37364) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1vKzAv-0008Vi-7e for 79850 <at> debbugs.gnu.org; Mon, 17 Nov 2025 08:21:46 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1vKzAp-0008F3-BQ; Mon, 17 Nov 2025 08:21:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=ICRQVPAIiKcNxju3724URodXP6Q3IWRvYJ0X+9VTMrw=; b=ADVmo6NYp+JB+BqE8prO R6LD0/clAjly3dHxim0FQDJpK2YfVmdIasQi9YCWfZjQoFElMTR7+top534aRSW+4VhBULT/c/40X gWq6ciD/8nxgRbjWzhV5FxftLYbAfhUspKaWKc89ovKKpXHcSkmC/aRv1FFdW5XzgWuWQBRr7E3CK SFbiU7OPotuEGcAUOJzIOT4fM5pCAzAL6lPunR6IbHw4gzieZL6p/j2zlYUYYFXoEiwFJJZqy8VTO t1oV3VoSd833pKk0nKFKZYcYoLk/GjVEjhlCJn/Y7wYsXpC0j7EUp6KyFx0Z8ytHqqqC7V3bEIFWu VupP+njIEbp0ig==; Date: Mon, 17 Nov 2025 15:21:34 +0200 Message-Id: <86h5uslrq9.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> To: Juri Linkov <juri@HIDDEN>, Stefan Monnier <monnier@HIDDEN> In-Reply-To: <87zf8lazz1.fsf@HIDDEN> (message from Juri Linkov on Mon, 17 Nov 2025 09:20:58 +0200) Subject: Re: bug#79850: Wrong column with overlays References: <87zf8lazz1.fsf@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 79850 Cc: 79850 <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 (---) > From: Juri Linkov <juri@HIDDEN> > Date: Mon, 17 Nov 2025 09:20:58 +0200 > > This destructive behavior was revealed in hs-minor-mode. > Indenting a hidden block deletes text inside it. > Example: > > 0. emacs -Q > 1. Eval: (setq hs-display-lines-hidden t) > 2. 'M-x hs-minor-mode RET' > 3. Copy this text to the scratch buffer: > > (defun test (&optional arg) > (unless arg > (setq arg 1))) > > 4. Move point to the beginning of the line with 'unless' > 5. 'M-x hs-toggle-hiding RET' > 6. 'C-M-a' (beginning-of-defun) > 7. 'C-M-q' (indent-pp-sexp) > 8. 'M-x hs-minor-mode RET' > > After disabling hs-minor-mode it's revealed > that the text inside is deleted. > > This is because 'indent-pp-sexp' calls 'indent-sexp' > that calls 'indent-line-to' that uses 'current-column'. > > 'current-column' returns a wrong column number 8 > instead of the correct 2. This causes (> cur-col column) > to delete the region. Sorry, I don't understand: what glyph on display was expected to have column = 2? After step 5 above, I see this on display: (defun test (&optional arg) (unless arg[1 line…])) where the text inside [..] is a display string, and the brackets are just for legibility, they are not really displayed. With the above on display, if I go to the opening paren of "(unless" and type "C-x =", I see column = 2, which is correct. If I go to the first closing parent after the display property and type "C-x =", I see column = 7, which is again correct (or as correct as Emacs can do -- I can explain if needed). The next closing parent has column = 8, which is again correct. What did I miss? > Here is a short test that demonstrates that it return the wrong 8 > on the buffer with 'defun test' example above: > > (progn > (setq hs-display-lines-hidden t) > (hs-minor-mode 1) > (goto-char (point-min)) > (search-forward "defun") > (hs-toggle-hiding) > (search-forward "unless") > (goto-char (pos-bol)) > (skip-chars-forward " \t") > (current-column)) This test produces a different display: (defun test (&optional arg)[2 lines…]) The closing paren after the display property reports column = 8, which is again "as correct as it gets" in Emacs. The text for which this snippet searches: (search-forward "unless") (goto-char (pos-bol)) (skip-chars-forward " \t") is entirely invisible, and covered by a display property, so it is unclear to me why you expected current-column to ignore both the invisible property and the display string, and return results as if neither of these properties existed. That's not what current-column does, and that is documented: This is calculated by adding together the widths of all the displayed representations of the character between the start of the previous line and point (e.g., control characters will have a width of 2 or 4, tabs will have a variable width). [...] Text that has an invisible property is considered as having width 0, unless ‘buffer-invisibility-spec’ specifies that it is replaced by an ellipsis. Or what am I missing? P.S. Indentation commands are generally unreliable when display features are used that affect the return value of current-column, move-to-column, and other functions that compute the column, because those count _visual_ columns (or at least attempt to do so), whereas indentation of code must use physical character columns in the buffer, not what's on display.
bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.
Received: (at submit) by debbugs.gnu.org; 17 Nov 2025 07:23:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 17 02:23:22 2025
Received: from localhost ([127.0.0.1]:49233 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1vKta6-0008HR-E7
for submit <at> debbugs.gnu.org; Mon, 17 Nov 2025 02:23:22 -0500
Received: from lists.gnu.org ([2001:470:142::17]:42192)
by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
(Exim 4.84_2) (envelope-from <juri@HIDDEN>) id 1vKta4-0008H9-Eg
for submit <at> debbugs.gnu.org; Mon, 17 Nov 2025 02:23:21 -0500
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 <juri@HIDDEN>) id 1vKtZx-0005N9-Vk
for bug-gnu-emacs@HIDDEN; Mon, 17 Nov 2025 02:23:14 -0500
Received: from mout-p-201.mailbox.org ([80.241.56.171])
by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
(Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1vKtZw-0003S5-56
for bug-gnu-emacs@HIDDEN; Mon, 17 Nov 2025 02:23:13 -0500
Received: from smtp202.mailbox.org (smtp202.mailbox.org
[IPv6:2001:67c:2050:b231:465::202])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4d8zjZ4tbrz9t5Y
for <bug-gnu-emacs@HIDDEN>; Mon, 17 Nov 2025 08:22:58 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linkov.net; s=MBO0001;
t=1763364178;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type;
bh=/h2LWAAb2Bs+zquhkW35kNIbYPxN3/QvCmhsVBMizZc=;
b=DtfJcWPubhJ+hszARTJJ4XmK2yhADxlTjsEhPBHKQFJKZHwcxqDvvsZqH0u3mK187rjoHJ
JUN5QEtr5AW1JuXj87DNaFYnn6+1vtYRpX5evigvzqJB+a9P0B1qB8HnAicPf9itJpsj98
kQ7pqscJV7phtBKexET5/vdcfQloQC71FsdFUcehAdSrEHXcYLtwgvo81ZZuR+mUIYP9a7
un7PRkWN92iop6JGtmnFQhAxp6maUPbJNOiT7yMU8Vj7aWWxg4paeQdfzXlNB1o0veS6sq
MFEiVmdKhwGcHxIppiCS1g2KO30KrrmSAYV3ysikZ+G77zmVNSfYdmHXTgkMBQ==
Authentication-Results: outgoing_mbo_mout; dkim=none;
spf=pass (outgoing_mbo_mout: domain of juri@HIDDEN designates
2001:67c:2050:b231:465::202 as permitted sender)
smtp.mailfrom=juri@HIDDEN
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Wrong column with overlays
Organization: LINKOV.NET
Date: Mon, 17 Nov 2025 09:20:58 +0200
Message-ID: <87zf8lazz1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Rspamd-Queue-Id: 4d8zjZ4tbrz9t5Y
Received-SPF: pass client-ip=80.241.56.171; envelope-from=juri@HIDDEN;
helo=mout-p-201.mailbox.org
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,
RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
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 (/)
This destructive behavior was revealed in hs-minor-mode.
Indenting a hidden block deletes text inside it.
Example:
0. emacs -Q
1. Eval: (setq hs-display-lines-hidden t)
2. 'M-x hs-minor-mode RET'
3. Copy this text to the scratch buffer:
(defun test (&optional arg)
(unless arg
(setq arg 1)))
4. Move point to the beginning of the line with 'unless'
5. 'M-x hs-toggle-hiding RET'
6. 'C-M-a' (beginning-of-defun)
7. 'C-M-q' (indent-pp-sexp)
8. 'M-x hs-minor-mode RET'
After disabling hs-minor-mode it's revealed
that the text inside is deleted.
This is because 'indent-pp-sexp' calls 'indent-sexp'
that calls 'indent-line-to' that uses 'current-column'.
'current-column' returns a wrong column number 8
instead of the correct 2. This causes (> cur-col column)
to delete the region.
Here is a short test that demonstrates that it return the wrong 8
on the buffer with 'defun test' example above:
(progn
(setq hs-display-lines-hidden t)
(hs-minor-mode 1)
(goto-char (point-min))
(search-forward "defun")
(hs-toggle-hiding)
(search-forward "unless")
(goto-char (pos-bol))
(skip-chars-forward " \t")
(current-column))
Juri Linkov <juri@HIDDEN>:bug-gnu-emacs@HIDDEN.
Full text available.bug-gnu-emacs@HIDDEN:bug#79850; Package emacs.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.