GNU bug report logs - #51226
29.0.50; `align' doc string is unclear

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Fri, 15 Oct 2021 10:05:02 UTC

Severity: normal

Found in version 29.0.50

Fixed in version 29.1

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 51226 in the body.
You can then email your comments to 51226 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#51226; Package emacs. (Fri, 15 Oct 2021 10:05:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lars Ingebrigtsen <larsi <at> gnus.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Oct 2021 10:05:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; `align' doc string is unclear
Date: Fri, 15 Oct 2021 12:04:01 +0200
`align' doesn't mention the prefix arg in the doc string, but in certain
modes, different alignment rules are picked based on what prefix you
give to the command.  For instance, text mode:

    ;; With a numeric prefix argument, or C-u, space delimited text
    ;; tables will be aligned.
    (text-column
     (regexp   . "\\(^\\|\\S-\\)\\([ \t]+\\)\\(\\S-\\|$\\)")
     (group    . 2)
     (modes    . align-text-modes)
     (repeat   . t)
     (run-if   . ,(lambda ()
                    (and current-prefix-arg
                         (not (eq '- current-prefix-arg))))))

    ;; With a negative prefix argument, lists of dollar figures will
    ;; be aligned.
    (text-dollar-figure
     (regexp   . "\\$?\\(\\s-+[0-9]+\\)\\.")
     (modes    . align-text-modes)
     (justify  . t)
     (run-if   . ,(lambda ()
                    (eq '- current-prefix-arg))))

It's also not clear why `M-x align' in text modes do nothing -- you
have to give it a prefix to make it do anything.




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





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51226; Package emacs. (Fri, 15 Oct 2021 11:02:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, John Wiegley <johnw <at> gnu.org>
Cc: 51226 <at> debbugs.gnu.org
Subject: Re: bug#51226: 29.0.50; `align' doc string is unclear
Date: Fri, 15 Oct 2021 14:00:07 +0300
> From: Lars Ingebrigtsen <larsi <at> gnus.org>
> Date: Fri, 15 Oct 2021 12:04:01 +0200
> 
> 
> `align' doesn't mention the prefix arg in the doc string, but in certain
> modes, different alignment rules are picked based on what prefix you
> give to the command.  For instance, text mode:
> 
>     ;; With a numeric prefix argument, or C-u, space delimited text
>     ;; tables will be aligned.
>     (text-column
>      (regexp   . "\\(^\\|\\S-\\)\\([ \t]+\\)\\(\\S-\\|$\\)")
>      (group    . 2)
>      (modes    . align-text-modes)
>      (repeat   . t)
>      (run-if   . ,(lambda ()
>                     (and current-prefix-arg
>                          (not (eq '- current-prefix-arg))))))
> 
>     ;; With a negative prefix argument, lists of dollar figures will
>     ;; be aligned.
>     (text-dollar-figure
>      (regexp   . "\\$?\\(\\s-+[0-9]+\\)\\.")
>      (modes    . align-text-modes)
>      (justify  . t)
>      (run-if   . ,(lambda ()
>                     (eq '- current-prefix-arg))))
> 
> It's also not clear why `M-x align' in text modes do nothing -- you
> have to give it a prefix to make it do anything.

John, could you help us out here by explaining this stuff?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#51226; Package emacs. (Tue, 19 Oct 2021 20:41:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: John Wiegley <johnw <at> gnu.org>, 51226 <at> debbugs.gnu.org
Subject: Re: bug#51226: 29.0.50; `align' doc string is unclear
Date: Tue, 19 Oct 2021 22:39:50 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

>> It's also not clear why `M-x align' in text modes do nothing -- you
>> have to give it a prefix to make it do anything.
>
> John, could you help us out here by explaining this stuff?

I've now clarified this in the doc string (i.e., that `C-u' has an
effect), and I've also made `M-x align' (without a prefix) actually do
something in text-mode.

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




bug marked as fixed in version 29.1, send any further explanations to 51226 <at> debbugs.gnu.org and Lars Ingebrigtsen <larsi <at> gnus.org> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 19 Oct 2021 20:41: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, 17 Nov 2021 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 173 days ago.

Previous Next


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