From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Eilert Newsgroups: gmane.emacs.devel Subject: Re: Emacs and Gnome Canvas Date: Thu, 15 Jul 2010 19:10:35 -0300 Message-ID: References: <4C3CD120.4040905@swipnet.se> <5A91499A-0470-43FD-9F48-560CEAD3424C@mit.edu> <83wrsyr068.fsf@gnu.org> <83iq4hhjww.fsf@gnu.org> <87sk3lbvv0.fsf@telefonica.net> <83hbk1grnq.fsf@gnu.org> <4C3EBCDC.8050709@swipnet.se> <83d3upgmwj.fsf@gnu.org> <4C3ECB4C.6050208@swipnet.se> <83aaptgly1.fsf@gnu.org> <4C3ED4F9.4080603@swipnet.se> <83630hgi0r.fsf@gnu.org> <4C3EE8D6.3020607@swipnet.se> <8339vlgcax.fsf@gnu.org> <87fwzkbzg8.fsf@telefonica.net> <877hkwag6y.fsf@stupidchicken.com> <877hkwbth6.fsf@telefonica.net> <87y6dcacdy.fsf@stupidchicken.com> <87y6dcaajj.fsf@telefonica.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1279231847 5016 80.91.229.12 (15 Jul 2010 22:10:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2010 22:10:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: =?UTF-8?Q?=C3=93scar_Fuentes?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 16 00:10:46 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OZWdh-0002Dl-RC for ged-emacs-devel@m.gmane.org; Fri, 16 Jul 2010 00:10:46 +0200 Original-Received: from localhost ([127.0.0.1]:55599 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZWdh-0006Ig-3J for ged-emacs-devel@m.gmane.org; Thu, 15 Jul 2010 18:10:45 -0400 Original-Received: from [140.186.70.92] (port=57702 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OZWdb-0006Ib-MV for emacs-devel@gnu.org; Thu, 15 Jul 2010 18:10:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OZWda-0004on-Ea for emacs-devel@gnu.org; Thu, 15 Jul 2010 18:10:39 -0400 Original-Received: from mail-iw0-f169.google.com ([209.85.214.169]:35642) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OZWda-0004og-9L for emacs-devel@gnu.org; Thu, 15 Jul 2010 18:10:38 -0400 Original-Received: by iwn2 with SMTP id 2so1842952iwn.0 for ; Thu, 15 Jul 2010 15:10:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=wM6byYXWyf1hEqtAZAHpyE40BNCnCltP1lMCrOOOBUI=; b=L1ee9h4k02nLMCJXdPlWHjJKTLT3qwgV4QuaOhAsw1/FKVurOnbFTHLt3WjHOydRZG emj/P3U13GbzIX+9cquSSG/WQhYCVelHRyK8uVjfaw84H9xWb51WUXh4CZGBWA5jPoHi Rhd92r+U5nCPi529KJ9wdOn1N3qo4cuilaU4U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=Co6K9JaaN/fJL2Zmxd35Jssec5400aqlRrJ90vdDR3Z+Mslu9HurO8a8ilhV/TZFhy Uni7WFGV5scwVGAc4LI1lzLLwXr3cu6I8S3VP/Mlfe2CGSDMBDxxj84AqVxB99KQxrPX O7x02ohA+COPu+YtfmFMLNGv3uOGiSJK0yzhA= Original-Received: by 10.231.190.132 with SMTP id di4mr17686900ibb.78.1279231836038; Thu, 15 Jul 2010 15:10:36 -0700 (PDT) Original-Received: by 10.231.149.73 with HTTP; Thu, 15 Jul 2010 15:10:35 -0700 (PDT) In-Reply-To: <87y6dcaajj.fsf@telefonica.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:127397 Archived-At: Geez.I've gone away for a day and come back to a mail fest :) When I first proposed the Cairo idea, it wasn't designed to replace the current redisplay engine. Rather, to draw everything *except* the buffer text, precisely because of the redisplay engine. Customize windows could be "prettified" by drawing buttons and other elements with Cairo, programatically and apart from the text, as images are nowadays. The speedbar could benefit from better and dynamic icons and draw real lines. Not to mention org-mode's spreadsheet (plotting a pie graph inside Emacs would be huge :) ) I do not know if the current engine is able to draw into an offscreen buffer, which would then receive Cairo enhancements. But that would be less of a surgery and allow us to validate the Cairo bindings and common use cases. UML diagrams, for instance, could also be done in a whole buffer, or inside defined boundaries. For comparison, i was thinking along the lines of a 'canvas element', as implemented by recent browsers. --Stephen Sent from my Emacs On Thu, Jul 15, 2010 at 3:02 PM, =C3=93scar Fuentes wrote: > Chong Yidong writes: > >> =C3=93scar Fuentes writes: >> >>> Would that system allow to draw UML diagrams with real graphics, instea= d >>> of ASCII? Would it allow to implement a real graphical view for the DAG >>> of a dVCS history? In short, would it a real drawing surface where you >>> can draw arbitrary stuff and react to user actions such as the user >>> clicking and dragging a line, preferably from Elisp code? >> >> If this is the reason you want to work with Canvas, I don't think it's >> necessary to overhaul the Emacs redisplay engine at all. =C2=A0A better >> approach would be to create a system that allows Canvas objects to be >> embedded in an Emacs display, in the same way that images can be >> embedded. >> >> Thinking of this problem as "replacing" redisplay, or creating an >> alternative to redisplay, is unnecessary. >> >> Joakim's patch for embedding gtk widgets is an interesting existing >> experiment, somewhat along these lines. > > I don't think this is poweful enough. There should be no separation > among text areas and drawing areas. Text should be just another kind of > item on the canvas. How do you represent an UML diagram with editable > areas inside the boxes, or editable rotated text along the lines that > connects them? Or even simpler: how about implementing something like a > tree widget on pure Elisp? It seems to me that doing that with the > approach you propose will be very difficult, at best. > > My impression (and this is something that remains to be checked) is that > implementing a new general display engine will be faster than enhancing > the current one for adding a subset of the features the new one would > bring on, not mentioning long term benefits like hackability and easy of > maintenance. > > > >