From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carlos Pita Subject: Setting html special blocks id=name is problematic Date: Fri, 29 Mar 2019 01:42:17 -0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000584f930585344cdf" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:33094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9jLg-0007bT-0V for emacs-orgmode@gnu.org; Fri, 29 Mar 2019 00:42:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h9jLe-0006G8-08 for emacs-orgmode@gnu.org; Fri, 29 Mar 2019 00:42:35 -0400 Received: from mail-yw1-xc2a.google.com ([2607:f8b0:4864:20::c2a]:34171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h9jLc-0006F7-AM for emacs-orgmode@gnu.org; Fri, 29 Mar 2019 00:42:33 -0400 Received: by mail-yw1-xc2a.google.com with SMTP id x129so259062ywc.1 for ; Thu, 28 Mar 2019 21:42:31 -0700 (PDT) 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" To: emacs-orgmode --000000000000584f930585344cdf Content-Type: text/plain; charset="UTF-8" Hi all, the html exporter produces a div with id = name when the #+name property is set for a special block. Since names are search targets they could be used in links of the form [[name]]. Now this link will fail in the browser because it will search for the internally generated id returned by org-export-get-reference and there is no html element with this id in the exported output. The problem I see here is that org searches for the link target using the name property but produces html that searches for this same target using a non-exported id instead. Given that there already is an #+attr_html keyword to set the id property if so desired, wouldn't it be a better idea to set the id property to the internally generated identifier so links are able to resolve both in emacs and in the browser the same way? I could write a simple patch but I would like to know your opinion on this first. Best regards -- Carlos --000000000000584f930585344cdf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi all,

the html exporter pr= oduces a div with id =3D name when the #+name property is set for a special= block. Since names are search targets they could be used in links of the f= orm [[name]]. Now this link will fail in the browser because it will search= for the internally generated id returned by org-export-get-reference and t= here is no html element with this id in the exported output. The problem I = see here is that org searches for the link target using the name property b= ut produces html that searches for this same target using a non-exported id= instead. Given that there already is an #+attr_html keyword to set the id = property if so desired, wouldn't it be a better idea to set the id prop= erty to the internally generated identifier so links are able to resolve bo= th in emacs and in the browser the same way? I could write a simple patch b= ut I would like to know your opinion on this first.

Best regards
--
Carlos
--000000000000584f930585344cdf--