From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Layered display API Date: Thu, 14 Aug 2014 06:35:11 +0400 Message-ID: <53EC205F.7030801@yandex.ru> References: <86tx5r7l1j.fsf@yandex.ru> <53E097F7.5050407@gmx.at> <53E0ABF9.7070506@yandex.ru> <8338dbqcai.fsf@gnu.org> <53E14AF4.6050804@yandex.ru> <83k36mpbxg.fsf@gnu.org> <53E22245.4070307@yandex.ru> <8361i5pmch.fsf@gnu.org> <53E294BD.1000500@yandex.ru> <837g2knwb2.fsf@gnu.org> <53E818F0.2080104@yandex.ru> <8361hzjciv.fsf@gnu.org> <53EAD0B1.1010405@yandex.ru> <83iolwif2l.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1407983745 32407 80.91.229.3 (14 Aug 2014 02:35:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2014 02:35:45 +0000 (UTC) Cc: rudalics@gmx.at, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 14 04:35:38 2014 Return-path: Envelope-to: ged-emacs-devel@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 1XHkt8-0007Uh-9R for ged-emacs-devel@m.gmane.org; Thu, 14 Aug 2014 04:35:38 +0200 Original-Received: from localhost ([::1]:51608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHkt7-0005Ip-RJ for ged-emacs-devel@m.gmane.org; Wed, 13 Aug 2014 22:35:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHksv-0005If-0i for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:35:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XHksl-0002pD-7f for emacs-devel@gnu.org; Wed, 13 Aug 2014 22:35:24 -0400 Original-Received: from mail-lb0-x22a.google.com ([2a00:1450:4010:c04::22a]:43164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XHksk-0002p2-Vg; Wed, 13 Aug 2014 22:35:15 -0400 Original-Received: by mail-lb0-f170.google.com with SMTP id l4so473802lbv.1 for ; Wed, 13 Aug 2014 19:35:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=AOoWobnsdYoV8RarXnX99F7sWQ1UATbdjfrGfSg+A7A=; b=WoR2Dp4+ptTMn/J8MFL0Uf3yOQYV6WJ3ANgXwTBtzojuHrz1g91eT79MJAACw3JQFN WzMpu4q2OmUpvZ61lk/JapnbIgWYnI+skSvkj6UGhjfMyFcvQuZFhYpjJz9gwom+vO5B uQURC5kecmdFM5JLhsBxR8x59uAl6sosnNqIS49xB0dBZeqq2PJ9mqBoTz/hVsIqn5YX Bhw5xvh/VbffUXVeP14uzmfk8IBIaN4iSfDayMaAk29lHgRwsYNgIpjQmCqruZBmhttx WWvHnHw3ixwy4CcXgwKSH/+eueWgXsBpG2k1tf3H5XLW/SFD0vWdA9rQmfm93qir9LzB ErIA== X-Received: by 10.112.51.135 with SMTP id k7mr1561528lbo.39.1407983713807; Wed, 13 Aug 2014 19:35:13 -0700 (PDT) Original-Received: from [192.168.1.3] ([178.252.98.87]) by mx.google.com with ESMTPSA id go8sm5733207lbc.8.2014.08.13.19.35.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Aug 2014 19:35:13 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 In-Reply-To: <83iolwif2l.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::22a X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:173647 Archived-At: On 08/13/2014 07:28 PM, Eli Zaretskii wrote: > The menu code can be extended. More accurately, we could refactor the > menu code to provide the capabilities of overlaying text on window > display for other Lisp features. Cool. Like Stefan suggested, I'll try playing with a toolkit-less popup first, and then you could see if you can provide a similar API with tty menus. I've been under impression that "tty menus" could work in graphical mode, too, but now I understand that they're non-portable, like the name suggests. That's too bad. >> Not even menus? My understanding was they might be able to satisfy most >> of the requirements, aside from working with proportional fonts. > > At least with some toolkits, GUI menus have decorations, which will > look strange if we use them in this capacity. Yep, I meant "tty menus" there. Not an option. >>>>> No, I meant conceal the text produced by other display properties, and >>>>> display your overlay string instead. >>>> >>>> It doesn't seem to be solving much: if I want to display something in >>>> the middle of, say, large `display' text, there's no specific span of >>>> text to set that new property on. >>> >>> You'd put it on the overlay string. >> >> Let me rephrase the previous message: "...there's no specific span of >> text to put the overlay on". > > The buffer text that is covered by the "large display property" is > still there, right? It just isn't displayed. Why use the special new property, then? Just put a new overlay over it. If it also has `display' and higher priority, it would take over. >> Will the menu allow me to customize the keymap it's using? > > Of course! This is Emacs. See the end of menu-bar.el: the menu > navigation keys are defined as a keymap. So, you would suggest I dynamically rebind `tty-menu-navigation-map'? > I don't see how buttons can resolve conflicts. Maybe I'm missing > something. If one piece of code creates one button, and another piece of code creates another button, they can put different handlers into the button properties, so the results of clicking of these buttons will be different, even if they are in the same buffer, on the same line. Same could be done the fringe, at least in theory.