GNU bug report logs -
#24622
26.0.50; lisp-fill-paragraph broken
Previous Next
Reported by: martin rudalics <rudalics <at> gmx.at>
Date: Wed, 5 Oct 2016 17:23:02 UTC
Severity: normal
Found in version 26.0.50
Done: Alex <agrambot <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 24622 in the body.
You can then email your comments to 24622 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24622
; Package
emacs
.
(Wed, 05 Oct 2016 17:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
martin rudalics <rudalics <at> gmx.at>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 05 Oct 2016 17:23:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This commit
commit 866e3c050fe64fee81f29a335a50a11b2562422e
Author: Lars Ingebrigtsen <larsi <at> gnus.org>
Date: Thu Apr 28 12:05:15 2016 +0200
Don't consider colons to be paragraphs starting chars in strings
* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't
consider colons to start paragraphs in (doc) strings
(bug#7751).
breaks filling doc-strings of defcustoms. As an example consider the
defcustom of ‘window-min-height’ in window.el:
(defcustom window-min-height 4
"The minimum total height, in lines, of any window.
The value has to accommodate one text line, a mode and header
line, a horizontal scroll bar and a bottom divider, if present.
A value less than `window-safe-min-height' is ignored. The value
of this variable is honored when windows are resized or split.
Applications should never rebind this variable. To resize a
window to a height less than the one specified here, an
application should instead call `window-resize' with a non-nil
IGNORE argument. In order to have `split-window' make a window
shorter, explicitly specify the SIZE argument of that function."
:type 'integer
:version "24.1"
:group 'windows)
Put point at the beginning of the last line of the doc-string and do
M-: (fill-paragraph)
This gets me here
(defcustom window-min-height 4
"The minimum total height, in lines, of any window.
The value has to accommodate one text line, a mode and header
line, a horizontal scroll bar and a bottom divider, if present.
A value less than `window-safe-min-height' is ignored. The value
of this variable is honored when windows are resized or split.
Applications should never rebind this variable. To resize a
window to a height less than the one specified here, an
application should instead call `window-resize' with a non-nil
IGNORE argument. In order to have `split-window' make a window
shorter, explicitly specify the SIZE argument of that function."
:type 'integer :version "24.1" :group 'windows)
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24622
; Package
emacs
.
(Fri, 13 Oct 2017 02:24:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 24622 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
martin rudalics <rudalics <at> gmx.at> writes:
> This commit
>
> commit 866e3c050fe64fee81f29a335a50a11b2562422e
> Author: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Thu Apr 28 12:05:15 2016 +0200
>
> Don't consider colons to be paragraphs starting chars in strings
>
> * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't
> consider colons to start paragraphs in (doc) strings
> (bug#7751).
>
> breaks filling doc-strings of defcustoms. As an example consider the
> defcustom of ‘window-min-height’ in window.el:
I've included a diff below that appears to solve both bug#7751 and this
one, though I can't guarantee that it doesn't blow something else up.
Does anyone have any complaints?
In any case, I think this bug should be solved before 26.1 is released.
[paragraph.diff (text/x-diff, inline)]
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index fd12635d85..93435e1b4b 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -1267,7 +1267,8 @@ lisp-fill-paragraph
;; case). The `;' and `:' stop the paragraph being filled at following
;; comment lines and at keywords (e.g., in `defcustom'). Left parens are
;; escaped to keep font-locking, filling, & paren matching in the source
- ;; file happy.
+ ;; file happy. The `:' must be preceded by whitespace so that keywords
+ ;; inside of the docstring don't start new paragraphs (Bug#7751).
;;
;; `paragraph-separate': A clever regexp distinguishes the first line of
;; a docstring and identifies it as a paragraph separator, so that it
@@ -1280,13 +1281,7 @@ lisp-fill-paragraph
;; `emacs-lisp-docstring-fill-column' if that value is an integer.
(let ((paragraph-start
(concat paragraph-start
- (format "\\|\\s-*\\([(;%s\"]\\|`(\\|#'(\\)"
- ;; If we're inside a string (like the doc
- ;; string), don't consider a colon to be
- ;; a paragraph-start character.
- (if (nth 3 (syntax-ppss))
- ""
- ":"))))
+ "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
(paragraph-separate
(concat paragraph-separate "\\|\\s-*\".*[,\\.]$"))
(fill-column (if (and (integerp emacs-lisp-docstring-fill-column)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24622
; Package
emacs
.
(Sat, 14 Oct 2017 08:36:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 24622 <at> debbugs.gnu.org (full text, mbox):
>> Don't consider colons to be paragraphs starting chars in strings
>>
>> * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't
>> consider colons to start paragraphs in (doc) strings
>> (bug#7751).
>>
>> breaks filling doc-strings of defcustoms. As an example consider the
>> defcustom of ‘window-min-height’ in window.el:
>
> I've included a diff below that appears to solve both bug#7751 and this
> one, though I can't guarantee that it doesn't blow something else up.
> Does anyone have any complaints?
>
> In any case, I think this bug should be solved before 26.1 is released.
I obviously think so too. Lars, how do we proceed here? I'd vote
for checking in Alex's patch.
martin
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24622
; Package
emacs
.
(Sat, 21 Oct 2017 08:13:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 24622 <at> debbugs.gnu.org (full text, mbox):
> From: Alex <agrambot <at> gmail.com>
> Date: Thu, 12 Oct 2017 20:23:01 -0600
> Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 24622 <at> debbugs.gnu.org
>
> > This commit
> >
> > commit 866e3c050fe64fee81f29a335a50a11b2562422e
> > Author: Lars Ingebrigtsen <larsi <at> gnus.org>
> > Date: Thu Apr 28 12:05:15 2016 +0200
> >
> > Don't consider colons to be paragraphs starting chars in strings
> >
> > * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Don't
> > consider colons to start paragraphs in (doc) strings
> > (bug#7751).
> >
> > breaks filling doc-strings of defcustoms. As an example consider the
> > defcustom of ‘window-min-height’ in window.el:
>
> I've included a diff below that appears to solve both bug#7751 and this
> one, though I can't guarantee that it doesn't blow something else up.
> Does anyone have any complaints?
>
> In any case, I think this bug should be solved before 26.1 is released.
Since there were no more comments, please push to the release branch.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24622
; Package
emacs
.
(Sun, 22 Oct 2017 08:11:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 24622 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
> Since there were no more comments, please push to the release branch.
>
> Thanks.
I added some tests to the patch. Is the following acceptable?
[0001-Don-t-fill-keywords-after-Emacs-Lisp-docstring.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]
I added in a reference to bug#28937, which I just reported. Fixing that
would fix also fix this bug, but that solution might not be ready for
Emacs 26.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24622
; Package
emacs
.
(Sun, 22 Oct 2017 14:16:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 24622 <at> debbugs.gnu.org (full text, mbox):
> From: Alex <agrambot <at> gmail.com>
> Cc: larsi <at> gnus.org, 24622 <at> debbugs.gnu.org
> Date: Sun, 22 Oct 2017 02:10:47 -0600
>
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Since there were no more comments, please push to the release branch.
> >
> > Thanks.
>
> I added some tests to the patch. Is the following acceptable?
Yes, thanks.
> I added in a reference to bug#28937, which I just reported. Fixing that
> would fix also fix this bug, but that solution might not be ready for
> Emacs 26.
If you intend to solve this differently on master, and you think you
will do that soon, you can indicate that this patch should not be
merged to master.
Reply sent
to
Alex <agrambot <at> gmail.com>
:
You have taken responsibility.
(Sun, 22 Oct 2017 19:13:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
martin rudalics <rudalics <at> gmx.at>
:
bug acknowledged by developer.
(Sun, 22 Oct 2017 19:13:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 24622-done <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Alex <agrambot <at> gmail.com>
>> Cc: larsi <at> gnus.org, 24622 <at> debbugs.gnu.org
>> Date: Sun, 22 Oct 2017 02:10:47 -0600
>>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>> > Since there were no more comments, please push to the release branch.
>> >
>> > Thanks.
>>
>> I added some tests to the patch. Is the following acceptable?
>
> Yes, thanks.
Okay, pushed to emacs-26 as a012ec766c9d9bac0a56e814589a4b3b93311c28.
>> I added in a reference to bug#28937, which I just reported. Fixing that
>> would fix also fix this bug, but that solution might not be ready for
>> Emacs 26.
>
> If you intend to solve this differently on master, and you think you
> will do that soon, you can indicate that this patch should not be
> merged to master.
Thanks for the tip, but I likely won't get to it soon. I think this
should be merged to master in the meantime.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#24622
; Package
emacs
.
(Mon, 23 Oct 2017 08:06:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 24622 <at> debbugs.gnu.org (full text, mbox):
> Okay, pushed to emacs-26 as a012ec766c9d9bac0a56e814589a4b3b93311c28.
Thanks Alex for fixing this.
martin
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 20 Nov 2017 12:24:03 GMT)
Full text and
rfc822 format available.
This bug report was last modified 7 years and 211 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.