GNU bug report logs - #53913
28.0.91; python.el: Fancy 'outline-heading-end-regexp' doesn't work well

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Thu, 10 Feb 2022 09:15:01 UTC

Severity: normal

Found in version 28.0.91

Fixed in version 29.1

Done: Augusto Stoffel <arstoffel <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53913 in the body.
You can then email your comments to 53913 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53913; Package emacs. (Thu, 10 Feb 2022 09:15:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Augusto Stoffel <arstoffel <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 10 Feb 2022 09:15:02 GMT) Full text and rfc822 format available.

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

From: Augusto Stoffel <arstoffel <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 28.0.91; python.el: Fancy 'outline-heading-end-regexp' doesn't work
 well
Date: Thu, 10 Feb 2022 10:14:49 +0100
In python-mode, 'outline-heading-end-regexp' is set to ":[^\n]*\n", so
that a folded function definition still displays the argument list, like
this:

```
def f(
    a,
    b
):...
```

This is marginally nicer than what one would normally get, namely

```
def f(...
```

However, with the introduction of type hints, this special outline end
regexp doesn't work well anymore.  For instance, the code

```
def f(
    a: int,
    b: str
) -> bool:
    pass
```

folds as

```
def f(
    a: int,...
```

which is much worse than not trying to be fancy.

In view of that, I would suggest to keep 'outline-heading-end-regexp' at
its default value of "\n" in pyhton-mode.




bug marked as fixed in version 29.1, send any further explanations to 53913 <at> debbugs.gnu.org and Augusto Stoffel <arstoffel <at> gmail.com> Request was from Augusto Stoffel <arstoffel <at> gmail.com> to control <at> debbugs.gnu.org. (Thu, 09 Mar 2023 13:08:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 07 Apr 2023 11:24:05 GMT) Full text and rfc822 format available.

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

Previous Next


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