From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jambunathan K Subject: Re: org-edit-file ? Date: Thu, 21 Jul 2011 16:24:42 +0530 Message-ID: <81ipqvucnh.fsf@gmail.com> References: <81y5zshnzx.fsf@gmail.com> <878vrst1wc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjquM-0006jJ-7u for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 06:55:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QjquI-0008OX-0g for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 06:55:10 -0400 Received: from mail-pz0-f49.google.com ([209.85.210.49]:51308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QjquH-0008N5-SK for emacs-orgmode@gnu.org; Thu, 21 Jul 2011 06:55:05 -0400 Received: by pzk33 with SMTP id 33so1504475pzk.8 for ; Thu, 21 Jul 2011 03:55:04 -0700 (PDT) In-Reply-To: (Dov Grobgeld's message of "Thu, 21 Jul 2011 12:42:44 +0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dov Grobgeld Cc: emacs-orgmode Dov I believe you would like to follow a link to svg file and have it open in one of the many external editors depending on whether the link is "visited" (read-only) or "opened" (edit). May be others could help you here.=20 What you need to begin with is a home-brewed elisp command to "view" or "edit" a file based on (say a prefix modifier).=20 Read on. Hints below. > I'm not sure that emacs is the best tool to e.g. generate a template > png file of a given size and given background, or a svg file.=20 I don't think there are any svg or png experts here in this list and I don't think any of us understand what you mean by template. Please provide an example. > I still don't feel that any of the proposed solutions solves the > file:foo.svg edit scenario, where foo.svg does not exist yet.=20 We never proposed solutions. We only gave you hints. Your questions are better suited to help-gnu-emacs list. See URL: https://lists.gnu.org/archive/html/help-gnu-emacs/ > Also I would rather differentiate between opening a few for viewing > and opening a file for editing, as e.g. eog and inkview are good for > viewing, whereas gimp and inkscape are better for editing. You are the expert here and you have right to feel the way you feel - "unsatisifed" and "disappointed". Not many of us use eog, inkview, gimp or inkscape. At the minimum you should list how these apps open a given file - ie, the exact command line string to open a given file and then you can use `call-process' to launch the app. Jambunathan K. > > Regards, > Dov > > On Thu, Jul 21, 2011 at 12:32, Bastien wrote: > > Hi Dov, >=20=20=20=20 > Jambunathan K writes: >=20=20=20=20 > >> have a a new command org-edit-file that would: > >> > >> =A0 =A0 If the file does not exist, copy a skeleton file to the > filename > >> =A0 =A0 or generate the skeleton file by an emacs-function or by > calling > >> =A0 =A0 an external application. >=20=20=20=20 > Such a functionality belongs to Emacs itself rather than > Org-mode. > Are you aware of existing templating facilities? >=20=20=20=20 > =A0http://emacs-template.sourceforge.net/ >=20=20=20=20 > >> =A0 =A0 Call the configured editor application on the new file. > >> =A0 =A0 If invoked with Ctrl-u , allow the user to specify what > editor to > >> =A0 =A0 run on the file, e.g. inkscape, or killustrator on svg > files. > >> > >> Does something like this already exists? > > > > Start from C-h f org-open-file. >=20=20=20=20 > Indeed! >=20=20=20=20 > Best, >=20=20=20=20 > -- > =A0Bastien