From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.help Subject: Re: opening images in auctex Date: Mon, 23 Nov 2009 01:04:23 +0100 Message-ID: References: <312eac0d-7f76-4c83-8de7-3a7a450914a0@g27g2000yqn.googlegroups.com> <87pr7anmat.fsf@fh-trier.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1258934800 26616 80.91.229.12 (23 Nov 2009 00:06:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 23 Nov 2009 00:06:40 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Andreas Politz Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 23 01:06:33 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NCMRl-0007yq-Gp for geh-help-gnu-emacs@m.gmane.org; Mon, 23 Nov 2009 01:06:25 +0100 Original-Received: from localhost ([127.0.0.1]:58172 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCMRk-0001EQ-TT for geh-help-gnu-emacs@m.gmane.org; Sun, 22 Nov 2009 19:06:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCMQC-0008LM-Im for help-gnu-emacs@gnu.org; Sun, 22 Nov 2009 19:04:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCMQ8-0008Ha-Ur for help-gnu-emacs@gnu.org; Sun, 22 Nov 2009 19:04:48 -0500 Original-Received: from [199.232.76.173] (port=40672 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCMQ8-0008HP-M5 for help-gnu-emacs@gnu.org; Sun, 22 Nov 2009 19:04:44 -0500 Original-Received: from mail-gx0-f224.google.com ([209.85.217.224]:43896) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NCMQ8-0005ij-5Z for help-gnu-emacs@gnu.org; Sun, 22 Nov 2009 19:04:44 -0500 Original-Received: by gxk24 with SMTP id 24so652651gxk.6 for ; Sun, 22 Nov 2009 16:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=dnFKWov/WHo3tWwuEXzUFmLWX5UUU87GnKA6i3Uxcps=; b=OJjkh36AMg5Sn4pl65BkVX9d3DGIzQKqJGPPASiNG3vcdRBL8paR3NmpfPp0tIkr5h gCPmx//1cAP19Sn8SgJhOfrWo6qSWb8V/rXNoMc1fJr6UeRyb597E9Q876n2Mfqai7dj Jg4DZwIdK5GvLEOmHCmQp1hTa9WQP14YQsxG4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=EwTw3MZDo++QaiRjs9cl9yqI9g2/iP4q/NDx6XaZFxA0Yz8cVCVvfg6VX5R48F+hAs hBelZpUW1fJofRhAW+MgglHO4+peDt8Pbm3TSqKHp4qAaH+6Dicw+j0MhV9BhwXfw/s0 PTcLtsm33KnwL9jAZX408oMO5rjRQ2EK1vvf0= Original-Received: by 10.101.143.10 with SMTP id v10mr3253073ann.170.1258934683268; Sun, 22 Nov 2009 16:04:43 -0800 (PST) In-Reply-To: <87pr7anmat.fsf@fh-trier.de> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70037 Archived-At: On Mon, Nov 23, 2009 at 12:59 AM, Andreas Politz wrot= e: > andrea abelli writes: > >> Hi, >> >> =C2=A0 is there a way to open an image, in an external viewer/editor, th= at >> is being previewed by preview-latex? >> >> thx in advance, >> aa > > > The preview-images are displayed as overlays containing a link to > the image-files in there properties. > Here is a rough sketch : > > (defun tex-open-preview-at-point () > =C2=A0(interactive) > =C2=A0(let ((ov (car (overlays-at (point)))) > =C2=A0 =C2=A0 =C2=A0 =C2=A0(file (plist-get (cdr (overlay-get ov 'display= )) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 :file))) > =C2=A0 =C2=A0(unless file > =C2=A0 =C2=A0 =C2=A0(error "No preview here")) > =C2=A0 =C2=A0(start-process "display" nil "display" file))) > > > It is some more work, to display the actual image, provided there is one > (like in \includegraphics etc.). =C2=A0AFAICS preview-latex does not > determine this. > > But using the overlay region and ffap-file-at-point and expecting the > filename inside '{}' would be a good starting point. Something like that is used in the general library inlimg.el in nXhtml that I mentioned before. Please try to add to that if possible so we can get a general mechanism for this in Emacs.