GNU bug report logs - #68881
30.0.50; [PATCH] Field properties confuse 'outline-minor-mode'

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Thu, 1 Feb 2024 23:53:02 UTC

Severity: normal

Tags: patch

Found in version 30.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


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

From: Jim Porter <jporterbugs <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 68881 <at> debbugs.gnu.org
Subject: Re: bug#68881: 30.0.50; [PATCH] Field properties confuse
 'outline-minor-mode'
Date: Sat, 10 Feb 2024 10:22:16 -0800
[Message part 1 (text/plain, inline)]
On 2/7/2024 9:37 AM, Juri Linkov wrote:
>> The main issue was that outline.el uses 'line-beginning-position' and
>> friends, which respects field boundaries, but I think we want to avoid that
>> for 'outline-minor-mode'. Maybe we could use 'pos-bol' and friends instead,
>> but my understanding is that 'line-beginning-position' respects display
>> directionality (which we probably want), but 'pos-bol' doesn't.
> 
> I'm not aware of any cases that would require restricting
> outlines to field boundaries.

Thanks. After reading the source (generally a good idea), I now see that 
'line-beginning-position' doesn't respect display directionality, so 
there's no reason to use it over 'pos-bol' and friends. I've therefore 
updated the patch to use those, which makes things a bit simpler.

(In any case, I think for RTL, we'd want to use the logical ordering of 
the text anyway, but possibly add the outline buttons on the right side 
of the window instead. That's out of scope for this bug though.)

> There is also one occurrence of 'line-end-position' in outline.el.
> Should it have 'inhibit-field-text-motion' as well?

Thanks for the catch. Updated this as well.

(I also split out the Eshell demonstration patch so that I can drop the 
commit more easily before merging. It's still attached here though in 
case you or anyone else want to try it out.)
[0001-Make-outline.el-ignore-field-properties-in-text.patch (text/plain, attachment)]
[0002-DO-NOT-MERGE-Test-commit-for-previous-patch.patch (text/plain, attachment)]

This bug report was last modified 1 year and 99 days ago.

Previous Next


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