all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Drew Adams" <drew.adams@oracle.com>
To: <rms@gnu.org>
Cc: monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: RE: propose adding Icicles to Emacs
Date: Tue, 3 Jul 2007 00:56:26 -0700	[thread overview]
Message-ID: <BNELLINCGFJLDJIKDGACIECHCAAA.drew.adams@oracle.com> (raw)
In-Reply-To: <E1I5Zvk-0007bE-Lm@fencepost.gnu.org>

>     Your approach makes each command definition that uses "!" in
>     the interactive spec deal with the list (collective) and
>     non-list (individual) cases together, in a conditional in its
>     body.
>
> That's the purpose of `!': so you can distinguish those two cases.
> If you don't want to distinguish them, then you don't write `!'.

I understand that. And if you want to distinguish them, then you need the
conditional, as you indicated.

> Then the command gets called once for each argument.

Are you saying that if you use `!' in the interactive spec then a user can
have only the whole-set-at-once behavior and not also the
act-on-each-candidate behavior? I thought we were talking about _adding_ the
former, not substituting it for the latter. Now it sounds as if you want to
take the latter away.

Acting on a set as a whole is different from acting on each of its elements.
There is no reason to try to substitute one for the other, instead of
providing for both.

> I think it is a simple feature that makes it possible to implement,
> in a clean way, all the multi-command features that we have discussed.

I don't know about that. I haven't heard you confirm or explain how it
provides for the actions #1-#4 that I listed (1: help action, 2: main
action, 3: alt action, 4: delete action). You've only mentioned the main
action (#2) and applying a different action to the list as a whole (#5). And
it seems you are saying now that acting on the list (#5) would mean
foregoing acting on all matching candidates individually (`C-!'). It's not
clear to me what you are saying about the various actions.

Another reason I gave for using variables bound to action functions is so
that other code can override or test such a binding. For example, one
multicommand calls another to implement some of its behavior, but it
overrides a default action function or tests whether an action function is
defined. I gave an example illustrating the override.

>     This still assumes your automatic treatment of multicommands via
>     `call-interactively'.
>
> Exactly.  That's a better method.

The "this" was an example that used my approach of binding the
set-as-a-whole action function. It was a hybrid example that adopted
(assumed) your C-language enhancement to support the use of an argument for
a multicommand.

> > I think it is a simple feature that makes it possible to implement,
> in a clean way, all the multi-command features that we have discussed.

Repeating that doesn't show how it is so. You still haven't mentioned how
you will you implement/support the various actions (#1-#6).

> 	The way I do it now separates each of the action functions
>     (the action "implementations", in your terms) from the command
>     definition itself:
>
>     (defun command ()
>       (interactive)
>       (let ((candidate-action-fn 'action-one)
> 	        (all-candidates-action-fn 'action-all))
> 	    (action-one (read-file-name "File: "))))
>
> That's why my method is better.

What's why? What's the reason? If a programmer defines a command with each
of the actions #1-#6, then, IIUC, you end up with a big conditional in the
command body with your approach. Why is that better?

> (Note that this example reads a minibuffer argument inside the body of
> the command, contrary to Emacs convention, which says you should read
> them inside `interactive'.)

Do you mean this convention from the Elisp manual (sans rationale BTW)?

  "In most cases, you should not call minibuffer input functions in the
   middle of a Lisp function.  Instead, do all minibuffer input as part of
   reading the arguments for a command, in the `interactive' specification."

In most cases, OK, but it depends on the context. When input is read inside
`interactive' it is done before other processing by the command (unless some
such processing is also shoved inside `interactive', before the read, which
can result in contrived/unnatural code). That's not always the most
appropriate behavior.

You can also say that one should, in most cases, read command arguments
inside `interactive' (which is not quite the same thing). What is read here
is not an argument (or a "minibuffer argument").

You can argue that it should be, that it's better, in most cases, to read
user input as arguments. But, as you know, without redefining some of the
basic C infrastructure (as you now intend to do), it was not possible to put
the multicommand read inside `interactive'. Thus the departure from
convention. I gave the hybrid example to show that I agree that it would be
good to be able to treat the completion candidate as an argument.

Anyway, as I already said:

> 	I'm not against such an approach. I'm just saying that I'm
>     not yet convinced it is an improvement. Of course, you don't
>     need to convince me.

You don't need to convince me, but I do wonder if/how you intend to support
each of the possible actions we've discussed so far: #1-#6, plus letting
users apply #2 (main action) and #3 (alt action) to all matching candidates
individually.

  reply	other threads:[~2007-07-03  7:56 UTC|newest]

Thread overview: 212+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-26  0:19 [drew.adams@oracle.com: RE: cannot find :enable in Elisp manual index] Richard Stallman
2007-05-26  6:05 ` Eli Zaretskii
2007-05-29  4:01   ` [drew.adams@oracle.com: RE: cannot find :enable in Elisp manualindex] Drew Adams
2007-05-29 19:12     ` Eli Zaretskii
2007-05-29 20:05       ` Stephen Berman
2007-05-29 20:58         ` Eli Zaretskii
2007-05-29 21:20           ` Stephen Berman
2007-05-29 21:25         ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Drew Adams
2007-05-29 21:03       ` [drew.adams@oracle.com: RE: cannot find :enable in Elisp manualindex] Drew Adams
2007-05-30  3:20         ` Eli Zaretskii
2007-05-30  4:43           ` Drew Adams
2007-05-30  5:26             ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Drew Adams
2007-05-30 15:17             ` [drew.adams@oracle.com: RE: cannot find :enable in Elisp manualindex] Johan Bockgård
2007-05-30 23:09               ` Eli Zaretskii
2007-05-30  5:23           ` David Kastrup
2007-05-30 23:01             ` Eli Zaretskii
2007-05-30 23:14               ` Eli Zaretskii
2007-06-02  2:54     ` Richard Stallman
2007-06-02  9:18       ` Jason Rumney
2007-06-02 17:29         ` Richard Stallman
2007-06-02 10:12       ` Robert J. Chassell
2007-06-02 17:29         ` Richard Stallman
2007-06-02 23:47           ` Robert J. Chassell
2007-06-03 21:27             ` Richard Stallman
2007-06-02 10:18       ` Alan Mackenzie
2007-06-02 14:36         ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Drew Adams
2007-06-02 17:26         ` [drew.adams@oracle.com: RE: cannot find :enable in Elisp manualindex] Eli Zaretskii
2007-06-02 23:47           ` Alan Mackenzie
2007-06-02 23:48             ` Jason Rumney
2007-06-02 17:29         ` Richard Stallman
2007-06-02 18:10           ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Drew Adams
2007-06-03 21:27             ` Richard Stallman
2007-06-04  5:30               ` [drew.adams@oracle.com: RE: cannot find :enable inElispmanualindex] Drew Adams
2007-06-02 23:01           ` [drew.adams@oracle.com: RE: cannot find :enable in Elisp manualindex] Miles Bader
2007-06-03  0:00           ` Karl Berry
2007-06-03 21:27             ` Richard Stallman
2007-06-03 22:52               ` Juri Linkov
2007-06-03 23:55                 ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Drew Adams
2007-06-04  5:01                   ` Richard Stallman
2007-06-04  5:42                     ` [drew.adams@oracle.com: RE: cannot find :enable inElispmanualindex] Drew Adams
2007-06-04 23:20                       ` Richard Stallman
2007-06-05  0:10                         ` [drew.adams@oracle.com: RE: cannot find :enableinElispmanualindex] Drew Adams
2007-06-06  0:50                   ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Stefan Monnier
2007-06-06  2:12                     ` Drew Adams
2007-06-06 12:26                       ` Stefan Monnier
2007-06-06 13:54                         ` Drew Adams
2007-06-06 15:06                           ` [drew.adams@oracle.com: RE: cannot find :enable inElispmanualindex] Drew Adams
2007-06-06 18:44                             ` Juri Linkov
2007-06-06 20:01                               ` Stefan Monnier
2007-06-06 20:51                                 ` Juri Linkov
2007-06-06 21:18                                   ` Stefan Monnier
2007-06-06 22:01                                     ` Juri Linkov
2007-06-06 22:24                                       ` Stefan Monnier
2007-06-06 22:40                                         ` Karl Berry
2007-06-07 12:37                                           ` Stefan Monnier
2007-06-07 22:22                                             ` Karl Berry
2007-06-08  1:00                                               ` Stefan Monnier
2007-06-08  2:28                                                 ` Karl Berry
2007-06-08  6:58                                                   ` csant
2007-06-08 15:42                                                     ` Stefan Monnier
2007-06-08  7:12                                                   ` Stefan Monnier
2007-06-08  8:34                                                   ` Juri Linkov
2007-06-06 22:04                                     ` Karl Berry
2007-06-08  7:11                               ` Richard Stallman
2007-06-08  8:32                                 ` Juri Linkov
2007-06-08 15:46                                   ` Stefan Monnier
2007-06-08 15:52                                   ` propose adding Icicles to Emacs Drew Adams
2007-06-10 13:19                                     ` Richard Stallman
2007-06-10 17:16                                       ` Drew Adams
2007-06-10 18:22                                         ` Sean O'Rourke
2007-06-11  0:09                                           ` Drew Adams
2007-06-11  9:44                                         ` Richard Stallman
2007-06-11 18:33                                           ` Drew Adams
2007-06-11 19:17                                             ` Stefan Monnier
2007-06-11 20:53                                               ` Drew Adams
2007-06-11 21:46                                                 ` Stefan Monnier
2007-06-11 23:21                                                   ` Drew Adams
2007-06-13  8:06                                                   ` Richard Stallman
2007-06-14  7:48                                                 ` Richard Stallman
2007-06-14 15:51                                                   ` Drew Adams
2007-06-14 16:07                                                     ` Stefan Monnier
2007-06-15  0:39                                                       ` Drew Adams
2007-06-15 19:22                                                         ` Richard Stallman
2007-06-15 21:04                                                           ` Drew Adams
2007-06-16 18:51                                                             ` Richard Stallman
2007-06-16 18:51                                                             ` Richard Stallman
2007-06-16 18:51                                                         ` Richard Stallman
2007-06-16 20:53                                                           ` Drew Adams
2007-06-17  8:54                                                             ` Richard Stallman
2007-06-17 18:48                                                           ` Juri Linkov
2007-06-17 20:39                                                             ` Drew Adams
2007-06-17 21:18                                                               ` Juri Linkov
2007-06-17 23:07                                                                 ` Drew Adams
2007-06-18 21:17                                                                   ` Juri Linkov
2007-06-18 23:31                                                                     ` Drew Adams
2007-06-19  8:16                                                                       ` Juri Linkov
2007-06-19 14:47                                                                         ` Drew Adams
2007-06-18 14:56                                                               ` Stefan Monnier
2007-06-19 22:26                                                                 ` Richard Stallman
2007-06-20  6:46                                                                   ` Stefan Monnier
2007-06-28  2:41                                                                   ` Stefan Monnier
2007-06-28 15:47                                                                     ` Drew Adams
2007-06-28 19:25                                                                     ` Richard Stallman
2007-06-28 20:03                                                                       ` Stefan Monnier
2007-06-29  5:10                                                                         ` Richard Stallman
2007-06-18 21:31                                                               ` Richard Stallman
2007-06-19  3:52                                                                 ` Stefan Monnier
2007-06-19 22:26                                                                   ` Richard Stallman
2007-06-19 23:11                                                                     ` Drew Adams
2007-06-20  1:19                                                                     ` Stefan Monnier
2007-06-19 22:47                                                                   ` Drew Adams
2007-06-19 23:15                                                                     ` Drew Adams
2007-06-20 14:19                                                                     ` Juri Linkov
2007-06-20 15:13                                                                       ` Drew Adams
2007-06-20 15:13                                                                       ` Stefan Monnier
2007-06-20 15:34                                                                         ` Drew Adams
2007-06-20 15:50                                                                           ` Juri Linkov
2007-06-20 16:02                                                                             ` Juanma Barranquero
2007-06-20 16:38                                                                             ` Drew Adams
2007-06-20 17:28                                                                               ` Drew Adams
2007-06-20 17:51                                                                               ` Juri Linkov
2007-06-21  1:07                                                                         ` Richard Stallman
2007-06-19 22:48                                                                 ` Drew Adams
2007-06-20 17:36                                                                   ` Richard Stallman
2007-06-16 18:51                                                         ` Richard Stallman
2007-06-16 19:58                                                           ` Drew Adams
2007-06-16 18:51                                                         ` Richard Stallman
2007-06-16 22:36                                                           ` Drew Adams
2007-06-17 21:49                                                             ` Richard Stallman
2007-06-16 18:51                                                         ` Richard Stallman
2007-06-16 22:29                                                           ` Drew Adams
2007-06-17 21:48                                                             ` Richard Stallman
2007-06-17 22:18                                                               ` Drew Adams
2007-06-18 16:15                                                                 ` Drew Adams
2007-06-25 13:19                                                                   ` Richard Stallman
2007-06-25 14:57                                                                     ` Drew Adams
2007-06-25 19:52                                                                       ` Richard Stallman
2007-06-25 21:40                                                                         ` Drew Adams
2007-06-26 16:57                                                                           ` Richard Stallman
2007-06-26 17:36                                                                             ` Drew Adams
2007-07-01 20:40                                                                               ` Richard Stallman
2007-07-01 21:54                                                                                 ` Drew Adams
2007-07-02 19:47                                                                                   ` Richard Stallman
2007-07-02 22:19                                                                                     ` Drew Adams
2007-07-03  4:24                                                                                       ` Richard Stallman
2007-07-03  7:56                                                                                         ` Drew Adams [this message]
2007-07-04  3:43                                                                                           ` Richard Stallman
2007-07-04  6:13                                                                                             ` Drew Adams
2007-06-25 20:47                                                                     ` Juri Linkov
2007-06-21 18:35                                                                 ` Davis Herring
2007-06-21 18:39                                                                   ` Lennart Borgman (gmail)
2007-06-21 20:42                                                                   ` Drew Adams
2007-06-21 22:27                                                                     ` Davis Herring
2007-06-22  0:20                                                                       ` Drew Adams
2007-06-24 14:40                                                                         ` Richard Stallman
2007-06-15  8:48                                                     ` Richard Stallman
2007-06-15 13:23                                                       ` Drew Adams
2007-06-15 22:45                                                         ` Richard Stallman
2007-06-13 16:21                                               ` Richard Stallman
2007-06-13 16:22                                             ` Richard Stallman
2007-06-13 19:00                                               ` Drew Adams
2007-06-14 16:19                                                 ` Richard Stallman
2007-06-15  1:01                                                   ` Drew Adams
2007-06-15 19:22                                                     ` Richard Stallman
2007-06-15 21:04                                                       ` Drew Adams
2007-06-16 18:50                                                         ` Richard Stallman
2007-06-17 18:46                                                     ` Juri Linkov
2007-06-17 19:35                                                       ` Drew Adams
2007-06-18 21:31                                                         ` Richard Stallman
2007-06-11  9:44                                         ` Richard Stallman
2007-06-11 17:29                                           ` Drew Adams
2007-06-11 18:10                                             ` Stefan Monnier
2007-06-13  8:07                                               ` Richard Stallman
2007-06-13 15:23                                                 ` Drew Adams
2007-06-14  7:49                                                   ` Richard Stallman
2007-06-15  0:41                                                     ` Drew Adams
2007-06-15 19:22                                                       ` Richard Stallman
2007-06-15 21:04                                                         ` Drew Adams
2007-06-16 18:51                                                           ` Richard Stallman
2007-06-16 22:30                                                             ` Drew Adams
2007-06-13  8:07                                             ` Richard Stallman
2007-06-11  3:49                                     ` Miles Bader
2007-06-11  7:24                                       ` Drew Adams
2007-06-11 16:25                                         ` Richard Stallman
2007-06-11  9:44                                       ` Richard Stallman
2007-06-11 18:41                                         ` Drew Adams
2007-06-12  0:43                                           ` Miles Bader
2007-06-12  8:08                                             ` Kim F. Storm
2007-06-12  9:18                                               ` joakim
2007-06-12 11:04                                                 ` Kim F. Storm
2007-06-12 11:16                                                   ` joakim
2007-06-12 13:30                                                     ` Drew Adams
2007-06-12 14:06                                                     ` keys that work on terminals (was: Re: propose adding Icicles to Emacs) Dan Nicolaescu
2007-06-12 14:45                                                       ` keys that work on terminals joakim
2007-06-12 13:22                                               ` propose adding Icicles to Emacs Drew Adams
2007-06-06 15:43                           ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Stefan Monnier
2007-06-04  5:01                 ` [drew.adams@oracle.com: RE: cannot find :enable in Elisp manualindex] Richard Stallman
2007-06-04 23:51                   ` Juri Linkov
2007-06-05  3:55                     ` Miles Bader
2007-06-05 16:29                       ` Juri Linkov
2007-06-05 17:12                         ` [drew.adams@oracle.com: RE: cannot find :enable in Elispmanualindex] Drew Adams
2007-06-05 19:17                       ` [drew.adams@oracle.com: RE: cannot find :enable in Elisp manualindex] Richard Stallman
2007-06-05 22:32                     ` Richard Stallman
2007-06-06  0:32                       ` Karl Berry
2007-06-06 22:10                         ` Richard Stallman
2007-06-06 22:21                           ` Karl Berry
2007-06-02 22:34       ` Juri Linkov
2007-06-02 22:42     ` Juri Linkov
2007-06-03  3:07       ` Eli Zaretskii
2007-06-03  9:34         ` Juri Linkov
2007-06-03 21:23           ` Karl Berry
2007-06-03 21:27           ` Richard Stallman

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=BNELLINCGFJLDJIKDGACIECHCAAA.drew.adams@oracle.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@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.