From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Borkowski Subject: Custom export backend based on HTML: how to implement own blocks? Date: Sun, 23 Nov 2014 16:44:52 +0100 Message-ID: <87sih9q5u3.fsf@wmi.amu.edu.pl> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsZLb-0007xw-EH for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 10:45:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XsZLV-0005XC-OX for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 10:45:11 -0500 Received: from msg.wmi.amu.edu.pl ([2001:808:114:2::50]:60062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XsZLV-0005O7-H1 for emacs-orgmode@gnu.org; Sun, 23 Nov 2014 10:45:05 -0500 Received: from localhost (localhost [127.0.0.1]) by msg.wmi.amu.edu.pl (Postfix) with ESMTP id C6CB64206C for ; Sun, 23 Nov 2014 16:45:02 +0100 (CET) Received: from msg.wmi.amu.edu.pl ([127.0.0.1]) by localhost (msg.wmi.amu.edu.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UUZs+tWab0YQ for ; Sun, 23 Nov 2014 16:45:02 +0100 (CET) Received: from localhost (117-116.echostar.pl [213.156.117.116]) by msg.wmi.amu.edu.pl (Postfix) with ESMTPSA id 7CC314206B for ; Sun, 23 Nov 2014 16:45:02 +0100 (CET) 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: Org-Mode mailing list Hello, I'd like to (ab)use the "underline" syntax for something else. Basically, I'd like to translate _underlined_ to underlined and _underlined|with variant_ to underlinedwith variant but only if the underlining is between #+BEGIN_MYBLOCK ... #+END_MYBLOCK How to achieve this? In particular, I'd like to know: 1. How can I know (in org-html-underline, for instance) whether I am in a MYBLOCK or not? 2. How do I best translate the "|" syntax into "variants"? More specifically: is it a good idea to do it in org-my-html-underline, by analysing the "underlined" text (as a string) or maybe it's better to write a filter? (I guess the former idea is better.) Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University