From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.help Subject: Re: Any infrastructure to select one of a few options in Emacs core? Date: Sat, 21 May 2016 22:49:46 +0200 Message-ID: <87wpmnrv9x.fsf@mbork.pl> References: <87shxrczlt.fsf@mbork.pl> <12f1c4cf-ee4a-444e-bfc3-1e703d3ad50d@default> <87h9e7ck96.fsf@mbork.pl> <878tzjcg3x.fsf@mbork.pl> <86f9c662-a9ec-4bf5-ab0d-8f66d4e0fcf5@default> <877ff3cdec.fsf@mbork.pl> <87wpn3axix.fsf@kuiper.lan.informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1463863841 21606 80.91.229.3 (21 May 2016 20:50:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 May 2016 20:50:41 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Pascal J. Bourguignon" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 21 22:50:33 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 1b4Dqz-0007z3-Lv for geh-help-gnu-emacs@m.gmane.org; Sat, 21 May 2016 22:50:33 +0200 Original-Received: from localhost ([::1]:41212 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4Dqy-0006jc-US for geh-help-gnu-emacs@m.gmane.org; Sat, 21 May 2016 16:50:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4DqN-0006hY-O7 for help-gnu-emacs@gnu.org; Sat, 21 May 2016 16:49:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b4DqL-0002as-PI for help-gnu-emacs@gnu.org; Sat, 21 May 2016 16:49:55 -0400 Original-Received: from mail.mojserwer.eu ([2a01:5e00:2:52::8]:48992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b4DqL-0002ao-HU for help-gnu-emacs@gnu.org; Sat, 21 May 2016 16:49:53 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id E1879B956B3; Sat, 21 May 2016 22:49:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dHQQrbY6VUHX; Sat, 21 May 2016 22:49:47 +0200 (CEST) Original-Received: from localhost (98-171.echostar.pl [213.156.98.171]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 75D47B956B1; Sat, 21 May 2016 22:49:47 +0200 (CEST) User-agent: mu4e 0.9.16; emacs 25.1.50.1 In-reply-to: <87wpn3axix.fsf@kuiper.lan.informatimago.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2a01:5e00:2:52::8 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:110088 Archived-At: On 2016-05-09, at 20:36, Pascal J. Bourguignon wrote: > You can use a popup menu for that. > > (let ((options '("spam" "ham" "eggs"))) > (x-popup-menu (let ((mp (mouse-position))) > (list (list (cadr mp) > (cddr mp)) > (selected-window))) > (list "menu" > (cons "What would yuo like to eat?" > (mapcar (lambda (option) (cons option option)) > options))))) Thanks a lot, I'll remember about `x-popup-menu', it might be useful one day. It's not what I like, though; I prefer to have everything (including menus) in buffers. (Well, almost everything.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University