From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Harkins Subject: Re: Buffer-specific export filter? Date: Wed, 21 Aug 2013 01:27:43 +0000 (UTC) Message-ID: References: <8738q4si0o.wl%jamshark70@dewdrop-world.net> <20130820130202.GC19436@kuru.dyndns-at-home.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBxDX-0003Gu-T8 for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 21:28:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VBxDQ-0002wy-DK for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 21:28:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:49851) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VBxDQ-0002wY-64 for emacs-orgmode@gnu.org; Tue, 20 Aug 2013 21:28:04 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1VBxDN-0002d9-AF for emacs-orgmode@gnu.org; Wed, 21 Aug 2013 03:28:01 +0200 Received: from 113.109.198.43 ([113.109.198.43]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Aug 2013 03:28:01 +0200 Received: from jamshark70 by 113.109.198.43 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 21 Aug 2013 03:28:01 +0200 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: emacs-orgmode@gnu.org Suvayu Ali gmail.com> writes: > 1. Is it possible to set filters as buffer local? Okay the help string > says: "This variable may be risky if used as a file-local variable.", > so I guess the answer is no. > > 2. Otherwise you could have used a lisp source block in the buffer. You > could still do that, just add a conditional that checks for the > buffer name. This way modifying a global filter would still affect > current buffer export. I see... that seems awkward. Maybe a valid feature request. But maybe there's a better solution for my specific case. The problem is that I'm using the colloquial <<'em>> for "them." The preceding space causes org to export this as `em. Normally a single quote after a space would correctly be an opening single quote, but here it's for a contraction and should be an apostrophe. Possible solutions: - Use a LaTeX \specialCharName, if it exists. I couldn't find anything like this. All the LaTeX documentation says to use '. - Hacky approach which I tried last night: Define a filter to turn "<>" into a non-breaking space "~"; then org doesn't treat it as an opening single quote. - Better approach which I just thought of: Define a filter recognizing <<'em>> as a special case, which I could also extend for other special cases later. Related question: If I wanted to force a non-breaking space in LaTeX export, how would I do that without a filter? ~ exports, reasonably, as \textasciitilde. hjh