GNU bug report logs - #9758
24.0.90; Elisp doc strings and fill-paragraph on region

Previous Next

Package: emacs;

Reported by: Stephen Berman <stephen.berman <at> gmx.net>

Date: Fri, 14 Oct 2011 21:30:02 UTC

Severity: normal

Tags: wontfix

Found in version 24.0.90

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

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 9758 in the body.
You can then email your comments to 9758 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#9758; Package emacs. (Fri, 14 Oct 2011 21:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Berman <stephen.berman <at> gmx.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 14 Oct 2011 21:30:02 GMT) Full text and rfc822 format available.

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

From: Stephen Berman <stephen.berman <at> gmx.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.90; Elisp doc strings and fill-paragraph on region
Date: Fri, 14 Oct 2011 23:28:17 +0200
The doc string of fill-paragraph-function notes that it affects
fill-paragraph but not fill-region.  But fill-paragraph itself calls
fill-region, and one case where this asymmetry is problematic is Elisp
doc strings.  Typing `M-q' with point within a doc string in Emacs Lisp
mode calls lisp-fill-paragraph (via fill-paragraph-function) with
fill-column set to emacs-lisp-docstring-fill-column.  But selecting (and
highlighting) a region within a doc string calls fill-region, which uses
either the local, global or customized value of fill-column, which is
most likely different from emacs-lisp-docstring-fill-column.  In this
case, using `M-q' on a highlighted region of a doc string (say, several
paragraphs of a long doc string) produces an ill-formatted result.  (The
doc string of fill-paragraph-function says "it is often better to use
some other hook, such as `fill-forward-paragraph-function'," but I don't
see how that would help in this case.)

In GNU Emacs 24.0.90.6 (i686-suse-linux-gnu, GTK+ Version 2.22.1)
 of 2011-10-13 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10903000
configured using `configure  '--without-toolkit-scroll-bars' 'CFLAGS=-g''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#9758; Package emacs. (Tue, 08 Dec 2020 14:33:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: 9758 <at> debbugs.gnu.org
Subject: Re: bug#9758: 24.0.90; Elisp doc strings and fill-paragraph on region
Date: Tue, 08 Dec 2020 15:32:11 +0100
Stephen Berman <stephen.berman <at> gmx.net> writes:

> But selecting (and highlighting) a region within a doc string calls
> fill-region, which uses either the local, global or customized value
> of fill-column, which is most likely different from
> emacs-lisp-docstring-fill-column.

(This bug report unfortunately got no response at the time.)

The bug report is, in essence, that `fill-paragraph' uses
`fill-paragraph-function', while `fill-region' doesn't.

In practice that means that you get different filling in Emacs Lisp doc
strings are filled differently if you select a region and uses the `M-q'
command, or if you just use `M-q' without selecting a region.

I'm not quite sure whether this is a bug or not -- it's slightly odd
behaviour, but it is consistent, if you squint at it a bit.  That is,
`fill-region' is a non-DWIM, very predictable function, while
`fill-paragraph' is more intuitive.

I'm leaning towards this being intended behaviour, so I'm closing this
bug report.  If anybody feels strongly that this is something that
should somehow be changed, feel free to reopen it.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 08 Dec 2020 14:33:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 9758 <at> debbugs.gnu.org and Stephen Berman <stephen.berman <at> gmx.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 08 Dec 2020 14:33:02 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. (Wed, 06 Jan 2021 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 168 days ago.

Previous Next


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