From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sebastian Rose Subject: Re: BUG ??? Cannot export custom link type to ASCII :-( Date: Thu, 30 Sep 2010 00:35:04 +0200 Message-ID: <87zkv0b2lj.fsf@gmx.de> References: <877hj1nf7j.fsf@gmx.de> <87mxrwxxig.fsf@gmx.de> <87fwxo12xl.fsf@gnu.org> <87k4mzx0ac.fsf@gmx.de> <87aanvwckb.fsf@gmx.de> <87fwxnm8ax.fsf@gnu.org> <8762yjvwv1.fsf@gmx.de> <3227634B-2C33-47F9-A61B-A48F8254ED77@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=46569 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P15F5-00032V-J8 for emacs-orgmode@gnu.org; Wed, 29 Sep 2010 18:35:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P15F3-0004cA-J1 for emacs-orgmode@gnu.org; Wed, 29 Sep 2010 18:35:15 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]:43663 helo=mail.gmx.net) by eggs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1P15F3-0004YY-6U for emacs-orgmode@gnu.org; Wed, 29 Sep 2010 18:35:13 -0400 In-Reply-To: <3227634B-2C33-47F9-A61B-A48F8254ED77@gmail.com> (Carsten Dominik's message of "Wed, 29 Sep 2010 07:55:05 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Carsten Dominik Cc: Emacs-orgmode mailing list , Bastien --=-=-= Content-Type: text/plain Carsten Dominik writes: > Hi Sebastian, > > is this still an open issue? If you, can you please summarize > again and show the code you are using for your link definition? > I am not sure if I have up to date information. > > - Carsten Hi Carsten, it's still an issue when exporting to ASCII. The reason is, that my "track" links have looooong paths (all the coordinates of the track plus the desired filename, see the comments in the code for an example link). That causes the "footnote" for a track to span pages (worsed case). See the example ASCII export on the bottom of this mail. Anyway, I'll rarely export the files to ASCII, so it's not urgent at all. The code is here: http://github.com/SebastianRose/org-osm/blob/master/org-osm-link.el The function to export those links is: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline Content-Transfer-Encoding: quoted-printable (defun osm-org-link-export (path description format) "Export a track from Org files." (let* ((coords (osm-check-track path)) (file (match-string 2 path)) (target (file-relative-name file)) (desc (or description target))) (unless (file-exists-p target) ;; if no file exists, the name will be made ;; in osm-draw-track for us: (setq target (file-relative-name (osm-draw-track coords file))) (setq desc (or description target))) (cond ((eq format 'html) (format osm-org-export-html-format (file-relative-name target) desc)) ((eq format 'latex) (org-replace-escapes osm-org-export-LaTeX-format (list (cons "%f" target) (cons "%F" (expand-file-name target)) (cons "%d" desc)))) (t ;; ASCII (file-relative-name taget))))) ;;; Finally install the link type (org-add-link-type "track" 'osm-org-link-follow 'osm-org-link-export) --=-=-= Content-Type: text/plain > On Sep 6, 2010, at 3:13 PM, Sebastian Rose wrote: >> Org file: >> * Test links >> >> [[track:((9.707032442092896 52.37033874553582))test.svg][test-track]] >> >> >> ASCII-export: >> 1 Test links >> ~~~~~~~~~~~~~ >> >> [test-track] >> >> >> [test-track]: track:((9.707032442092896 52.37033874553582))test.svg Sebastian --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--