unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: "'Stefan Monnier'" <monnier@iro.umontreal.ca>
Cc: 6256@debbugs.gnu.org
Subject: bug#6256: 24.0.50; read-event in `repeat' command
Date: Tue, 19 Oct 2010 12:21:04 -0700	[thread overview]
Message-ID: <8E5430CB43B84B91BB47DB3C0C710C44@us.oracle.com> (raw)
In-Reply-To: <jwvpqv7rp50.fsf-monnier+emacs@gnu.org>

(Putting this back into the bug-list thread, since some of my reply (#3 below)
still pertains to #6256.)

1. > Yes, tho the only change it requires is to change the lets into setqs.

Including the let-binding of `repeat-message-function'?  I assume not.  Doing
that would change the value globally from then on.  I've left that one as a let
binding.


2. However, you say that your implementation will anyway render a let binding of
`repeat-message-function' ineffective.  Do you mean your current fix using
read-key or your future reimplementation that you have locally?

I assume you mean the latter.  I can't test that, so I can't say how annoying
the changed message behavior would be.

Not being able to effectively let bind `repeat-message-function' (anywhere)
would significantly reduce the utility of that variable.  That's kind of the
point of such a variable - code that uses it is unlikely to just treat it as a
global setting (e.g. setq).

There needs to be some simple way to prevent `repeat' from issuing its own
message for the duration (including during all repetitions).  And preferably we
would also provide a way to apply an alternative function - i.e. to do exactly
what `repeat-message' was intended to do and does currently.

It seems like your future replacement would change the notion of a repetition so
that it no longer does everything that is currently done in `repeat' (since
`repeat' is not called repetitively).  Dunno.  I realize you are still working
on it, but please try not to sacrifice too much in your quest for simplicity.


3. Your current read-key fix for `repeat' does not work in Emacs 23, whereas my
fix using read-event does work.

Yours works only for Emacs 24 - I'm not sure why (can you tell me perhaps?).
Mine works also in Emacs 22 and 23.  (Emacs 22 has no `read-key'.)  So I cannot
say I'm overjoyed with that solution.

But maybe I will be if I understand its advantages.  What was your objection to
the solution I provided using `read-event'?  You never stated it, IIRC.

I realize that you do not care much about Emacs 22 or 23, but it seems like a
fair amount of loss for little gain.  I'd like to understand the advantage of
your current fix using read-key.

(Granted, an Emacs 22/23 user would need to eval the fixed version of `repeat',
but that's not a big deal.)


4.

> If you look at the corresponding patch included below, you'll see that
> it makes it unnecessary to deal with pre/post-command-hook or with
> undo-boundary.  Actually it also handles various other details of the
> top-level loop which the current version of repeat just 
> hasn't bothered to try and reproduce (e.g. moving the cursor outside
> of images/compositions/invisible text).

Yes, it looks simpler.  (But you didn't show the definition of
`set-temporary-overlay-map'.)

> > I'm not objecting but asking to understand, especially 
> > since it breaks the way `repeat' has functioned (its
> > interface), requiring code changes for at least some
> > `repeat' callers such as mine.
> 
> Yes, that's a concern.

Consider providing some info in NEWS about how to make code compatible etc.

> I've sent my current implementation to emacs-devel in some
> other thread, but in any case it suffers from a few problems.
> 
> > BTW, what's the `t' argument for?
> 
> It means "keep this overlay map active as long as the user hits keys
> within that keymap".  A nil value means to keep it active only for the
> very next command.  You can also provide a predicate function 
> to decide when to deactivate the map.

Do you actually use such optional functionality?  How/where?






  parent reply	other threads:[~2010-10-19 19:21 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-24 15:11 bug#6256: 24.0.50; read-event in `repeat' command Drew Adams
2010-05-24 16:28 ` Drew Adams
2010-05-24 23:05   ` Drew Adams
2010-05-25  0:06     ` Lennart Borgman
2010-05-25  2:41     ` Stefan Monnier
2010-07-03 21:24       ` Drew Adams
2010-07-04 22:45         ` Stefan Monnier
2010-07-07 14:43           ` Drew Adams
2010-07-21 15:54           ` Drew Adams
2010-08-28 15:19             ` Drew Adams
2010-09-11 18:25         ` Stefan Monnier
2010-09-11 22:34           ` Drew Adams
2010-09-12 16:06             ` Drew Adams
2010-09-17  3:34               ` Drew Adams
2010-09-22 14:01                 ` bug#6256: [PATCH] " Drew Adams
2010-09-25 14:30                   ` Drew Adams
2010-10-18 18:40               ` Stefan Monnier
2010-10-18 21:12                 ` Drew Adams
2010-10-19  1:13                   ` Stefan Monnier
2010-10-19  6:50                     ` Jan Djärv
2010-10-19 14:03                       ` Drew Adams
     [not found]                 ` <jwv4ocjuvm1.fsf-monnier+emacs@gnu.org>
     [not found]                   ` <0658C0CCC79D466BA9DE233F5980CAE5@us.oracle.com>
     [not found]                     ` <jwvpqv7rp50.fsf-monnier+emacs@gnu.org>
2010-10-19 19:21                       ` Drew Adams [this message]
2010-10-19 20:54                         ` Stefan Monnier
2010-10-19 22:17                           ` Drew Adams
2010-10-20 15:47                             ` Stefan Monnier
2010-10-20 20:55                               ` Drew Adams
2010-10-21  1:08                                 ` Stefan Monnier
2010-10-22 18:43                                   ` Drew Adams
2010-10-22 19:47                                     ` Stefan Monnier

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=8E5430CB43B84B91BB47DB3C0C710C44@us.oracle.com \
    --to=drew.adams@oracle.com \
    --cc=6256@debbugs.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).