From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.help Subject: Re: `completing-read` without RET Date: Mon, 11 Apr 2016 11:01:55 +0200 Message-ID: <87lh4k1pto.fsf@oremacs.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1460382439 26187 80.91.229.3 (11 Apr 2016 13:47:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2016 13:47:19 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: egarrulo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Apr 11 15:47:18 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1apcBS-0006W8-Gw for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Apr 2016 15:47:18 +0200 Original-Received: from localhost ([::1]:55347 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apcBH-0004mN-Rj for geh-help-gnu-emacs@m.gmane.org; Mon, 11 Apr 2016 09:47:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48833) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apXjM-0000KL-Dt for help-gnu-emacs@gnu.org; Mon, 11 Apr 2016 05:02:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1apXjI-0003Wr-9b for help-gnu-emacs@gnu.org; Mon, 11 Apr 2016 05:02:00 -0400 Original-Received: from mail-wm0-f52.google.com ([74.125.82.52]:38554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1apXjI-0003Vu-1x for help-gnu-emacs@gnu.org; Mon, 11 Apr 2016 05:01:56 -0400 Original-Received: by mail-wm0-f52.google.com with SMTP id u206so94825404wme.1 for ; Mon, 11 Apr 2016 02:01:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Xvfkuf9cHnkh56GYtbjcPivOqyJLNBc9fNeHvaDZLsc=; b=JcLlLBaM0hwULnLh8eZ6up3fcyp3km+sFzhHJWDqqsoRtCPFRY0UFT7oKV5oWr+yVa qd4qeXdiilqS753s6Wq2xMYvCFa2WT4po7P4dWTzdv2ELKl2Wa3dffy9pxxpvcqrLmad s8hedkG7+PCn4x4jL4pOc7dW66cCY4lcaNY7FPaxE8XdZkQM0x/QS1rXhi+HkLq/lkcK zHgUhBO6NmnUrsffgJA93ijSKI52wTQliJLTLXkbDX3Ta9D/sjpoYtMYP4pNH9R2Qh6t MCcE/nRgstJhMXQ8/9/3StkeeVUMMU4JZXmmfWw5HES/3qwB5tp8Dojnmam9sCkFUL9p G5Ig== X-Gm-Message-State: AD7BkJI4PHRiCmZt9eBgXC9sLJ+EpG3LDcrycgTTug/bzya517hjAniQOx/5utSUJ2KQFg== X-Received: by 10.194.115.35 with SMTP id jl3mr21984561wjb.76.1460365315189; Mon, 11 Apr 2016 02:01:55 -0700 (PDT) Original-Received: from firefly ([91.219.111.102]) by smtp.gmail.com with ESMTPSA id s10sm23856197wjp.3.2016.04.11.02.01.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Mon, 11 Apr 2016 02:01:54 -0700 (PDT) In-Reply-To: (egarrulo@gmail.com's message of "Fri, 11 Mar 2016 12:36:33 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.92 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.52 X-Mailman-Approved-At: Mon, 11 Apr 2016 09:46:56 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:109742 Archived-At: egarrulo writes: > Is there a function with the same behaviour of `completing-read`, > except that it doesn't need RET when only one completion exists? I've made an implementation for my bookmarks a long time ago: https://github.com/abo-abo/headlong I still use it and it works fine. As soon as there is only one match, the completion will exit. Example: (headlong-with (completing-read "Test: " '("a" "b" "c") nil t)) Hopefully it's still useful, I was going through this mailing list just now. Oleh