From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kaushal Modi Subject: Re: Allow more export options to be controlled per-subtree Date: Thu, 28 Sep 2017 18:40:37 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114fd444366b24055a443fc3" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dxdju-0008Js-Gf for emacs-orgmode@gnu.org; Thu, 28 Sep 2017 14:40:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dxdjt-0006Zj-LH for emacs-orgmode@gnu.org; Thu, 28 Sep 2017 14:40:50 -0400 Received: from mail-yw0-x234.google.com ([2607:f8b0:4002:c05::234]:44856) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dxdjt-0006Za-Dl for emacs-orgmode@gnu.org; Thu, 28 Sep 2017 14:40:49 -0400 Received: by mail-yw0-x234.google.com with SMTP id r85so1661774ywg.1 for ; Thu, 28 Sep 2017 11:40:49 -0700 (PDT) In-Reply-To: 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-org list --001a114fd444366b24055a443fc3 Content-Type: text/plain; charset="UTF-8" On Thu, Sep 28, 2017 at 1:28 PM Kaushal Modi wrote: > .. and so on, and then one can have > > :EXPORT_WITH_EMPHASIZE: t > > or > > :EXPORT_WITH_EMPHASIZE: > > in the subtree property. > > Is there a reason why this support wasn't added in the first place? > (Or does a method already exist to allow me to do the above?) > > I can work on a patch if it's OK to enable this functionality. > >From a quick testing, this works: diff --git a/lisp/ox.el b/lisp/ox.el index 4d3d7afb9d6..473608e82b2 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -119,7 +119,7 @@ (:with-date nil "date" org-export-with-date) (:with-drawers nil "d" org-export-with-drawers) (:with-email nil "email" org-export-with-email) - (:with-emphasize nil "*" org-export-with-emphasize) + (:with-emphasize "EXPORT_WITH_EMPHASIZE" "*" org-export-with-emphasize) (:with-entities nil "e" org-export-with-entities) (:with-fixed-width nil ":" org-export-with-fixed-width) (:with-footnotes nil "f" org-export-with-footnotes) @@ -2924,7 +2924,7 @@ returned by the function." ?\s))))) ;; ... emphasis... ((bold italic strike-through underline) - (and (not (plist-get info :with-emphasize)) + (and (not (org-string-nw-p (plist-get info :with-emphasize))) (let ((marker (cl-case (org-element-type datum) (bold "*") (italic "/") I can have the same done for all options in a final patch. -- Kaushal Modi --001a114fd444366b24055a443fc3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Sep 28= , 2017 at 1:28 PM Kaushal Modi <kaushal.modi@gmail.com> wrote:
.. and so on, and then one can have
:EXPORT_WITH_EMPHASIZE: t

or

:EXPORT_WITH_EMPHASIZE:

in the su= btree property.

Is there a reason why this support= wasn't added in the first place?=C2=A0
(Or does a method alr= eady exist to allow me to do the above?)

I can wor= k on a patch if it's OK to enable this functionality.=C2=A0
=

From a quick testing, this works:

diff --git a/lisp/ox.el b/lisp/ox.el
index 4d3d7= afb9d6..473608e82b2 100644
--- a/lisp/ox.el
+++ b/lisp/= ox.el
@@ -119,7 +119,7 @@
=C2=A0 =C2=A0 =C2=A0(:with-da= te nil "date" org-export-with-date)
=C2=A0 =C2=A0 =C2= =A0(:with-drawers nil "d" org-export-with-drawers)
=C2= =A0 =C2=A0 =C2=A0(:with-email nil "email" org-export-with-email)<= /div>
-=C2=A0 =C2=A0 (:with-emphasize nil "*" org-export-with= -emphasize)
+=C2=A0 =C2=A0 (:with-emphasize "EXPORT_WITH_EMP= HASIZE" "*" org-export-with-emphasize)
=C2=A0 =C2= =A0 =C2=A0(:with-entities nil "e" org-export-with-entities)
=
=C2=A0 =C2=A0 =C2=A0(:with-fixed-width nil ":" org-export-wi= th-fixed-width)
=C2=A0 =C2=A0 =C2=A0(:with-footnotes nil "f&= quot; org-export-with-footnotes)
@@ -2924,7 +2924,7 @@ returned b= y the function."
=C2=A0 =C2=A0 =C2=A0 =C2=A0?\s)))))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0;; ... emphasis...
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0((bol= d italic strike-through underline)
- (and (not (plist-get info :with-emphasize))
+ (and (not (org-string-nw-p (plist-get info= :with-emphasize)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((marker (cl-case (org-element-type datum)
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0(= bold "*")
=C2=A0 =C2=A0 =C2=A0 =C2=A0(italic "/")

I c= an have the same done for all options in a final patch.=C2=A0
--

Kaushal Modi

--001a114fd444366b24055a443fc3--