From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aankhen Subject: Re: [PATCH] * org-html.el (org-html-handle-links): add an alternate for inline images Date: Wed, 20 Apr 2011 02:38:57 +0530 Message-ID: References: <1303202089-27231-1-git-send-email-manuel.giraud@univ-nantes.fr> <87vcyah9y1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:49917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCIAp-00020p-Uj for emacs-orgmode@gnu.org; Tue, 19 Apr 2011 17:09:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCIAo-0008Cy-Ay for emacs-orgmode@gnu.org; Tue, 19 Apr 2011 17:09:27 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:57041) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCIAo-0008Cl-8d for emacs-orgmode@gnu.org; Tue, 19 Apr 2011 17:09:26 -0400 Received: by vxk20 with SMTP id 20so121219vxk.0 for ; Tue, 19 Apr 2011 14:09:25 -0700 (PDT) In-Reply-To: <87vcyah9y1.fsf@gnu.org> 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: Bastien , Manuel Giraud , Org-mode ml Hi, On Tue, Apr 19, 2011 at 14:52, Bastien wrote: > Applied, thanks. > > Manuel Giraud writes: > >> --- >> =C2=A0lisp/org-html.el | =C2=A0 =C2=A03 ++- >> =C2=A01 files changed, 2 insertions(+), 1 deletions(-) >> >> diff --git a/lisp/org-html.el b/lisp/org-html.el >> index 5d53478..7a4564d 100644 >> --- a/lisp/org-html.el >> +++ b/lisp/org-html.el >> @@ -888,7 +888,8 @@ OPT-PLIST is the export options list." >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 (if (string-match "^file:" desc) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (setq desc (substring desc (ma= tch-end 0))))) >> =C2=A0 =C2=A0 =C2=A0 (setq desc (org-add-props >> - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= concat "") >> + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= concat "3D\""> + =C2=A0 =C2=A0 =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-name-nondirectory desc) "\"/>") >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0'(org-protected t)))) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0(cond >> =C2=A0 =C2=A0 =C2=A0 =C2=A0 ((equal type "internal") This might not be the best solution. The purpose of the =E2=80=98alt=E2=80= =99 attribute is to provide a textual alternative, which the file name really isn=E2=80=99t. It would be better to provide an empty value: ,---- | 3D""/ `---- I took a look at =E2=80=98org-html.el=E2=80=99 and changed the relevant lin= e, but it doesn=E2=80=99t seem to have any effect. I think it=E2=80=99s being overri= den by =E2=80=98org-export-html-format-image=E2=80=99, so I changed that as well. = Here=E2=80=99s the resultant patch: --8<---------------cut here---------------start------------->8--- diff --git a/lisp/org-html.el b/lisp/org-html.el index 7a4564d..570d7d6 100644 --- a/lisp/org-html.el +++ b/lisp/org-html.el @@ -888,8 +888,7 @@ OPT-PLIST is the export options list." (if (string-match "^file:" desc) (setq desc (substring desc (match-end 0))))) (setq desc (org-add-props - (concat "3D\""") + (concat "3D\"\"/") '(org-protected t)))) (cond ((equal type "internal") @@ -1839,8 +1838,8 @@ lang=3D\"%s\" xml:lang=3D\"%s\"> "Create image tag with source and attributes." (save-match-data (if (string-match "^ltxpng/" src) - (format "3D\"%s\"/" - src (org-find-text-property-in-string 'org-latex-src src)) + (format "3D\"\"/" + src) (let* ((caption (org-find-text-property-in-string 'org-caption src)) (attr (org-find-text-property-in-string 'org-attributes src)) (label (org-find-text-property-in-string 'org-label src))) @@ -1855,7 +1854,7 @@ lang=3D\"%s\" xml:lang=3D\"%s\"> src (if (string-match "\\%s %s" --8<---------------cut here---------------end--------------->8--- Aankhen