From: Daniel Colascione <dancol@dancol.org>
To: Emacs developers <emacs-devel@gnu.org>
Subject: Making it easier to get rid of *Completions*
Date: Sat, 29 Mar 2014 20:42:23 -0700 [thread overview]
Message-ID: <5337929F.60704@dancol.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1255 bytes --]
When I'm using completion-at-point (and completion-in-region-mode more
generally), I find that I always have a *Completions* buffer that stick
around when I don't want it. *Completions* is supposed to go away during
the course of normal editing as the completions it contains become
obsolete, but sometimes it doesn't --- imagine moving back to the prompt
after completing a command in comint.
The following patch makes C-g in the regular command loop exit
completion-in-region-mode, getting rid of the *Completions* buffer. It
seems like it's doing a decent job so far. This patch also makes it
easier to work with a two-window Emacs: otherwise, C-x o
Comments? Better ways to make *Completions* less annoying in stock Emacs?
=== modified file 'lisp/minibuffer.el'
--- lisp/minibuffer.el 2014-03-05 07:04:01 +0000
+++ lisp/minibuffer.el 2014-03-30 03:39:32 +0000
@@ -1928,6 +1928,7 @@
(and completion-in-region--data
(and (eq (marker-buffer (nth 0 completion-in-region--data))
(current-buffer))
+ (not (eq this-command 'keyboard-quit))
(>= (point) (nth 0 completion-in-region--data))
(<= (point)
(save-excursion
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]
next reply other threads:[~2014-03-30 3:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-30 3:42 Daniel Colascione [this message]
2014-03-30 18:25 ` Making it easier to get rid of *Completions* 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5337929F.60704@dancol.org \
--to=dancol@dancol.org \
--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 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.