all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: 33541@debbugs.gnu.org
Subject: bug#33541: 26; Doc string of `align-regexp'
Date: Wed, 28 Nov 2018 09:26:25 -0800 (PST)	[thread overview]
Message-ID: <8aa04dea-d34b-4d58-9671-07e6e575c54d@default> (raw)

These two paragraphs seem to contradict each other:

 There is no predefined rule to handle this, but you could easily do it
 using a REGEXP like "(".  Interactively, all you would have to do is
 to mark the region, call 'align-regexp' and enter that regular expression.

 REGEXP must contain at least one parenthesized subexpression, typically
 whitespace of the form "\\(\\s-*\\)".  In normal interactive use,
 this is automatically added to the start of your regular expression after
 you enter it.  You only need to supply the characters to be lined up, and
 any preceding whitespace is replaced.

It cannot be the case that both (1) all you have to input as regexp is
"(" and (2) the input regexp must contain a group subexpression.

It's also unclear to say that REGEXP must contain... and also say that
something gets added automatically to it.

Yes, it's correct, provided a user interprets "REGEXP" only as the Lisp
argument and not directly as the regexp she enters.  Clearer wording
would be welcome, distinguishing (1) what you have to input (do you need
to include a group subexpression?  even if it is the whitespace prefix
"\\(\\s-*\\)"?) from what is required as the REGEXP argument to the
function.

In particular (minimum fix), it is incorrect to say 'you could easily do
it using a REGEXP like "("'.  There, REGEXP clearly must be the Lisp
argument, not what you type interactively.  REGEXP presumably always
requires a group subexpression.


In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor `Microsoft Corp.', version 10.0.16299
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''





             reply	other threads:[~2018-11-28 17:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-28 17:26 Drew Adams [this message]
2018-11-28 23:22 ` bug#33541: 26; Doc string of `align-regexp' Phil Sainty
2018-11-28 23:46   ` Drew Adams
2018-11-29  7:25     ` Eli Zaretskii
2021-09-22 22:19       ` Lars Ingebrigtsen
2018-11-29  7:23   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8aa04dea-d34b-4d58-9671-07e6e575c54d@default \
    --to=drew.adams@oracle.com \
    --cc=33541@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.