From mboxrd@z Thu Jan 1 00:00:00 1970
From: Manuel Giraud
Subject: Re: [PATCH] * org-html.el (org-html-handle-links): add an alternate
for inline images
Date: Wed, 20 Apr 2011 10:09:23 +0200
Message-ID: <87y635739o.fsf@univ-nantes.fr>
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]:59157)
by lists.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1QCSTX-00025q-R8
for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 04:09:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
(envelope-from ) id 1QCSTW-0002Os-RO
for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 04:09:27 -0400
Received: from smtp-tls1.univ-nantes.fr ([193.52.101.145]:44469
helo=smtp-tls.univ-nantes.fr) by eggs.gnu.org with esmtp (Exim 4.71)
(envelope-from ) id 1QCSTW-0002Om-Hq
for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 04:09:26 -0400
In-Reply-To:
(aankhen@gmail.com's message of "Wed, 20 Apr 2011 02:38:57 +0530")
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: Aankhen
Cc: Bastien , Org-mode ml
Aankhen writes:
> 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:
>
> ,----
> |
> `----
I knew it was not the best solution: all i wanted was to validate. But
an empty alt or maybe just "image" is fine by me too.
> I took a look at =E2=80=98org-html.el=E2=80=99 and changed the relevant l=
ine, but it
> doesn=E2=80=99t seem to have any effect.
I've tested my patch only on [[big_image.png][small_image.png]] kind of
link (maybe that's why).
> @@ -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 ""
> - src (org-find-text-property-in-string 'org-latex-src src=
))
> + (format ""
> + 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 "\\ (concat " " attr )
> - (concat " " attr " alt=3D\"" src "\"")))
> + (concat " " attr " alt=3D\"\"")))
> (if caption
> (format "
%s
> %s"
Ok, those 2 last hunk should complete my patch I guess. But what I'd
really like is a way to set a alt as a user. Maybe something like this:
[[big_image.png][small_image.png|my picture is cool]]
What you guys think? I'll look what i can do and try to make it work for
anykind of tag that can be generated.
--=20
Manuel Giraud