unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Defacta <boxfly@free.fr>
To: help-gnu-emacs@gnu.org
Subject: Re: Indenting text bugs.
Date: Thu, 4 Mar 2010 02:27:08 -0800 (PST)	[thread overview]
Message-ID: <5f8290e3-c3c4-43ab-a341-92c42bf38619@z4g2000yqa.googlegroups.com> (raw)
In-Reply-To: jwvd3zlfk7j.fsf-monnier+gnu.emacs.help@gnu.org

On 3 mar, 17:32, Stefan Monnier <monn...@iro.umontreal.ca> wrote:
> >> Normally, `M-TAB' (hence `ESC TAB') will complete text
> >> (e.g. a function name) at point. It is bound by default to
> >> `complete-symbol', `lisp-complete-symbol', `completion-at-point', or
> >> something similar, depending on the current mode and your
> >> Emacs version.
> > Isn't that a very inconvenient default? Almost every window manager across
> > platforms intercept that to switch windows...
>
> Yes, that's a problem.  Here's the way I see the situation:
> - Emacs used M-TAB for completion long before window managers ;-)
> - TAB is used for completion in the Emacs minibuffer as well as in many
>   other applications, so it makes sense to bind in-buffer completion to
>   a key similar to TAB.
> - In a buffer, TAB normally does indentation rather than completion.
> - S-TAB would not be a good default because it usually cannot be
>   distinguished from TAB when run in a terminal(emulator) or in
>   a console.
> - so we're currently stuck with M-TAB which can be used either as ESC
>   TAB, or by distinguishing Meta from Alt, or by reconfiguring your
>   window-manager to use another key.
>
> In Emacs-23.2, the default TAB command has been changed so that by
> setting tab-always-indent to `complete', you can have it do both
> indentation and completion (it first tries to re-indent and if the line
> was already properly indented, then it tries completion), but it's not
> a perfect solution: it's a bit too DWIM in some cases, it fails when
> tab-indentation cycles among various indentations (as is the case in
> haskell-mode), and it only works for those modes that use the new
> completion-at-point-functions functionality (very few do as of now).
>
>         Stefan
Hello there,

Actually I have this problem really often and I have to find a
solution better than by closing a file and reopening it. I have
functions in my code with long names looking like this:
JS_dis_create_Account() so, I do need the completion to work, that's
so much useful...

I use ALT+tab to complete functions names, but after a while instead
of completing it writes "Indenting region...done", and if I go in
another buffer, and try ALT-tab it will complete my function name.

Maybe I should try to set another shortcut for completion. How do I
set for exemple CTRL-f for completion instead of having CTRL-f to go
to the next character.

Thanks,
Vincent.



  parent reply	other threads:[~2010-03-04 10:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-02 10:07 Indenting text bugs Defacta
2010-03-02 16:05 ` Andrea Crotti
     [not found] ` <mailman.2167.1267546021.14305.help-gnu-emacs@gnu.org>
2010-03-02 18:14   ` Defacta
2010-03-02 18:45     ` Drew Adams
2010-03-02 22:11       ` Suvayu Ali
2010-03-02 23:44         ` Lennart Borgman
2010-03-02 23:56           ` Suvayu Ali
2010-03-03  0:19           ` Drew Adams
2010-03-03  0:26             ` Lennart Borgman
2010-03-03  1:15               ` Drew Adams
     [not found]       ` <mailman.2189.1267567845.14305.help-gnu-emacs@gnu.org>
     [not found]         ` <jwvd3zlfk7j.fsf-monnier+gnu.emacs.help@gnu.org>
2010-03-04 10:27           ` Defacta [this message]
2010-03-02 22:45     ` Andrea Crotti

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=5f8290e3-c3c4-43ab-a341-92c42bf38619@z4g2000yqa.googlegroups.com \
    --to=boxfly@free.fr \
    --cc=help-gnu-emacs@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.
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).