From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tak Kunihiro Newsgroups: gmane.emacs.devel Subject: Re: poplife-mode Date: Mon, 13 Nov 2017 17:11:20 +0900 Message-ID: <86shditx7b.fsf@misasa.okayama-u.ac.jp> References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1510560804 13947 195.159.176.226 (13 Nov 2017 08:13:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 13 Nov 2017 08:13:24 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (windows-nt) Cc: Stefan Monnier , emacs-devel@gnu.org To: charles@aurox.ch (Charles A. Roelli) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 13 09:13:18 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eE9rl-00038i-Qd for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2017 09:13:13 +0100 Original-Received: from localhost ([::1]:53080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eE9rt-0000cg-9X for ged-emacs-devel@m.gmane.org; Mon, 13 Nov 2017 03:13:21 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eE9q8-00081M-Lu for emacs-devel@gnu.org; Mon, 13 Nov 2017 03:11:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eE9q5-0007kP-Ei for emacs-devel@gnu.org; Mon, 13 Nov 2017 03:11:32 -0500 Original-Received: from mail-pf0-x234.google.com ([2607:f8b0:400e:c00::234]:55847) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eE9q5-0007jz-8W for emacs-devel@gnu.org; Mon, 13 Nov 2017 03:11:29 -0500 Original-Received: by mail-pf0-x234.google.com with SMTP id 17so11304918pfn.12 for ; Mon, 13 Nov 2017 00:11:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=wpCWEUC+j0BRWCelPOX1YWIq9v3hX00fwqKpxxHkU74=; b=NJfAGYkgnEVgU49Ct3RFm4nVrWuaR8vCPqgfb/SGDCqcXMWx8iNM0neXMeFO1owNJF LdMj83lSceWOlboBPHgIpQAdb84AXDeEwyX+mpyXEypjxHzGcKrbOGBSIuBraeHzwQSL U8rQZXaYrCMdUuVzM5THzU+Mb2tEP30HxB8NNrk8PK2fxAFQKqkI3o6Py5B+HAl6wUxk Wwp/SmJCRAqUt/vbtUAXq3CxSF0a2a3gOxmKYda2T70dxaZsHI7yF9q9i3Xz40t0Ds9Y FYKNEOTvzX9pd91dhf2pzLOXFSKt+9kYHeV4aaeKbDVIzsGYo6g8C2O/Qoktw2ZzGjiE hOrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=wpCWEUC+j0BRWCelPOX1YWIq9v3hX00fwqKpxxHkU74=; b=nEwuMf+OQ4nJC+O8isJd7RDydROQJL4OP5xiKGu2NSOw0W0qLSejQ6sumURTqMDvlN TDHvg39KmW2bARrnfRtomupNltQ7znqwEVPAbngqlprAbrXPvARI4wdu0FRkofPTGgFJ HRSnE16QFM58YZwtSshFNgRQIHgndodyyPPlEHhO221oTjIPcMXY2XfzpzHWckMFBM6i yKEDPR/2TrhJ4UV8Xn2uS0t4ljEPzGenOTyhP6fvc3oynbZbyvVEQAEBdqr8IwcKW6E6 8ZDaS/+7pmFjMjNDaw0iYaiv4j2SZX3NHL5+K6n5mNeHNMyn+5/FBqNApGWzlIcanToA 6YHA== X-Gm-Message-State: AJaThX563RS75mTXxQhAzrcZTGGNWdpwlNFIYWnz26iWCOYv0vymCabx 1mh/xPT09c6ocADcAKUSYAME4w== X-Google-Smtp-Source: AGs4zMa3FW5F1bAs/1SxsOuKvCxBoJSmIVSRllhiB5xnjeMGR7TfWDMkfqdv8oS7ItgZYeu/IsgWuA== X-Received: by 10.84.210.66 with SMTP id z60mr8306803plh.168.1510560688075; Mon, 13 Nov 2017 00:11:28 -0800 (PST) Original-Received: from thinkless2016 (vesta.misasa.okayama-u.ac.jp. [150.46.48.154]) by smtp.gmail.com with ESMTPSA id d15sm31373353pfj.163.2017.11.13.00.11.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Nov 2017 00:11:27 -0800 (PST) X-Google-Original-From: Tak Kunihiro In-Reply-To: (Charles A. Roelli's message of "Sun, 12 Nov 2017 21:24:51 +0100") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c00::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:220133 Archived-At: > I like it. We have a lot of existing code that sort of begs for > better mouse integration (find-file-at-point, thing-at-point, > completions buffers, isearch highlights, s-expression/balanced > expression manipulation, dired listings, ...). I wonder what others > think. I like the long-click too. I think that a context menu should be created from list of functions because each person wants to have his own context menu. I suppose that the list would look like below. Each function should return keymap or nil. They will be evaluated in the order of the list. A function should accept mouse EVENT, and return keymap or nil. The last candidate should return valid keymap. (defvar poplife-context-candidates '(poplife-mouse-file-menu ; FILE menu poplife-mouse-dir-menu ; DIR menu poplife-mouse-word-menu ; WORD menu poplife-mouse-url-menu ; URL menu poplife-mouse-edit-menu)) ; EDIT menu (default) (1) FILE menu -- Pop how-to-open-a-file menu. The file is detected by find-file-at-point. (2) DIR menu -- Pop files in a directory. The directory is detected by find-file-at-point. (3) WORD menu -- Pop words by #'flyspell-correct-word when face of a word under a mouse is flyspell-incorrect. (4) URL menu -- Pop how-to-open-an-url menu. The url is detected by thing-at-point-url-at-point. (5) EDIT menu -- Pop edit-menu with extra commands. This menu can be gigantic. Note that this is just an example.