unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Mike Mattie <codermattie@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: Usability suggestion : completion for M-:
Date: Sun, 16 Mar 2008 21:07:12 -0700	[thread overview]
Message-ID: <20080316210712.12aafb17@reforged> (raw)
In-Reply-To: <jwvlk4idq95.fsf-monnier+emacs@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2099 bytes --]

On Sun, 16 Mar 2008 22:52:51 -0400
Stefan Monnier <monnier@iro.umontreal.ca> wrote:

> >> But I think I stated that enough now, and you clearly stated your
> >> position as well, so it could help to have other people advice on 
> >> that concerning the *current implementation* of M-:
> 
> For what it's worth, I'm a bit annoyed by Emacs's inconsistent use of
> TAB: in minibuffers, TAB behaves like in terminals to mean "complete",
> where in normal buffers it usually means "indent".
> 
> But of course, "indent" can also make sense in minibuffers, and
> "complete" also makes a lot of sense in normal buffers.
> 
> I have used for many years commands that do both bound to TAB:
> typically my TAB first tries to indent, and if the indentation code
> didn't make any change then TAB tries to complete.
> 
> It works OK as far as DWIMish things are concerned, but it has some
> rough corners:
> - if the indentation code always makes changes (e.g. because it cycles
>   through several possible indentation points), then completion is
>   never used.

Can you post the code ? I have a similar setup, but I can't remember
running into that particular problem before.

The biggest issue I noticed with overloaded commands is that Emacs
commands will inspect this-command. An overloaded command
needs to adjust these sorts of variables so other code isn't adversely
affected. Some parts of Emacs definitely don't appreciate the current
command being a lambda either.

> - if the completion code only gets called when you repeat TAB, then
>   well... you have to repeat TAB to get to completion.
> - if not, then you get surprising results when you do TAB C-n TAB C-n
>   ... intending to reindent a chunk of code and once of the lines
>   happens to be properly indented already and you end up
>   completing instead.
> 
> So it's not a satisfactory solution.

I definitely have a different implementation that sounds more robust.
I hit tab repeatedly and the result is always the same in regards to
the behavior selected.
 
> 
>         Stefan
> 
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-03-17  4:07 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 17:30 Usability suggestion : completion for M-: paul r
2008-03-13 18:04 ` Lennart Borgman (gmail)
2008-03-13 21:16 ` Drew Adams
2008-03-13 21:32   ` paul r
2008-03-13 21:45     ` Lennart Borgman (gmail)
2008-03-13 23:32 ` Chong Yidong
2008-03-13 23:49   ` Drew Adams
2008-03-21  5:21     ` Drew Adams
2008-03-14  8:52   ` paul r
2008-03-15 21:36   ` Juri Linkov
2008-03-15 23:35     ` Drew Adams
2008-03-15 23:43       ` Lennart Borgman (gmail)
2008-03-16  8:12         ` Drew Adams
2008-03-16 11:00           ` paul r
2008-03-16 11:21             ` Ralf Angeli
2008-03-16 16:52             ` Drew Adams
2008-03-16 12:27           ` Lennart Borgman (gmail)
2008-03-16 16:50             ` Drew Adams
2008-03-16  0:17       ` Juri Linkov
2008-03-16  8:11         ` Drew Adams
2008-03-16 10:48           ` Andreas Schwab
2008-03-16 12:22             ` Lennart Borgman (gmail)
2008-03-16 13:36               ` Andreas Schwab
2008-03-16 10:56           ` paul r
2008-03-16 16:49             ` Drew Adams
2008-03-16 18:42               ` paul r
2008-03-16 19:56                 ` Bastien
2008-03-16 20:22                   ` David De La Harpe Golden
2008-03-17  2:52                   ` Stefan Monnier
2008-03-17  4:07                     ` Mike Mattie [this message]
2008-03-17 13:32                       ` Stefan Monnier
2008-03-17  9:32                     ` paul r
2008-03-17 19:16                     ` Richard Stallman
2008-03-18  9:19                       ` paul r
2008-03-19  2:53                         ` Richard Stallman
2008-03-19 16:28                           ` Stefan Monnier
2008-03-19 18:16                             ` paul r
2008-03-19 19:25                               ` Andreas Schwab
2008-03-16 18:49               ` paul r
2008-03-16 12:31           ` Lennart Borgman (gmail)
2008-03-16 16:50             ` Drew Adams
2008-03-16 20:06         ` Bastien Guerry
2008-03-22 21:14     ` Chong Yidong
2008-03-23  2:30       ` Juri Linkov
2008-03-23  5:54         ` Drew Adams
2008-04-09 20:42 ` Paul R
2008-04-09 21:20   ` Drew Adams
2008-04-10 23:12     ` Juri Linkov

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=20080316210712.12aafb17@reforged \
    --to=codermattie@gmail.com \
    --cc=emacs-devel@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 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).