unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: fill-paragraph-or-region
Date: Fri, 19 Oct 2007 03:34:07 +0300	[thread overview]
Message-ID: <877ilk0wtx.fsf@jurta.org> (raw)
In-Reply-To: <jwv8x60wgyx.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu\, 18 Oct 2007 12\:04\:08 -0400")

> I see that fill-paragraph-or-region was removed, and instead fill-paragraph
> was changed to fill a region if transient-mark-mode is active.
>
> What was the reason for this change?
>
> It seems like a bad idea to me: fill-paragraph is already complex enough:
> what's the benefit of conflating the two?

As I understood, Richard wants the same solution to be applied to all
commands that modify their behavior when the region is active.

First, a new condition for checking the active region was added to
indent-for-tab-command.  A similar change was made later in ispell-word.
ispell-word is more complex than fill-paragraph, but still a new condition
fits nicely to the logic of this command.

It would be good to decide now what is the preferable way of doing this
and to apply the same solution consistently everywhere.

As I see, there are two possible solutions:

1. modifying the existing command by adding a condition for the
active region;

2. creating a new command with the old key binding:
fill-paragraph-or-region with M-q, ispell-word-or-region with M-$,
indent-for-tab-command-or-region with TAB.  This command decides what
a pair of existing functions to call depending on the active region.

I personally don't have an opinion which one is better.

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2007-10-19  0:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-18 16:04 fill-paragraph-or-region Stefan Monnier
2007-10-19  0:34 ` Juri Linkov [this message]
2007-10-19 17:41   ` fill-paragraph-or-region Richard Stallman
2007-10-19  5:40 ` fill-paragraph-or-region Richard Stallman
2007-10-19 13:57   ` fill-paragraph-or-region Stefan Monnier
2007-10-19 15:23 ` fill-paragraph-or-region David Reitter

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=877ilk0wtx.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).