From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Bug: org-use-sub-superscripts not working [8.2.3b (8.2.3b-elpa @ c:/Users/xxx/.emacs.d/elpa/org-20131112/)] Date: Thu, 14 Nov 2013 16:19:27 -0500 Message-ID: <871u2iznog.fsf@alphaville.bos.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37322) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh4KL-0000GJ-He for emacs-orgmode@gnu.org; Thu, 14 Nov 2013 16:19:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vh4KG-0002iL-6o for emacs-orgmode@gnu.org; Thu, 14 Nov 2013 16:19:49 -0500 Received: from plane.gmane.org ([80.91.229.3]:53880) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vh4KG-0002iD-00 for emacs-orgmode@gnu.org; Thu, 14 Nov 2013 16:19:44 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Vh4KD-0004vy-V8 for emacs-orgmode@gnu.org; Thu, 14 Nov 2013 22:19:41 +0100 Received: from nat-pool-bos-t.redhat.com ([66.187.233.206]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Nov 2013 22:19:41 +0100 Received: from ndokos by nat-pool-bos-t.redhat.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 14 Nov 2013 22:19:41 +0100 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 dieter@schoen.or.at writes: > hi list, > i am not sure whether i have discovered a bug or just using this not in > the right way. > i have an org document where i have lots of underscores in words (they > are function names, e.g. BC_send) and do not want them to be interpreted > as subscripts. > > the documentation says that the variable org-use-sub-superscript can be > used to customize this behaviour: > - t..convert every underscore > - {}..only convert when text is preprended by an underscore and within braces > - nil..no conversion at all > > in my environment, this does not work. output is always the same. > i exported to html. > i have set the variable in my > .emacs. i have also tried without my defs with emacs -q --no-desktop. The name of the variable is org-export-with-sub-superscripts. If you make this change to your code below, it DTRT I think. If you say #+OPTIONS: ^:nil that's the variable that is set. Maybe org-use-sub-superscripts is a remnant that should be deleted: not sure why it is still around. I note that it is defined and used in org.el, whereas org-export-with-sub-superscripts is defined and used in ox.el. > > i found a similar report on the list, where they tried #+OPTIONS, this > does also not fix my problem. This *should* have fixed the problem though. Nick > finally i have wrote a little elisp file to programmatically reproduce > my situation, here it is: > ------------cut----------------------- > (defun insert-version () > "insert org and emacs version information" > (interactive) > (insert (concat "emacs-version: " emacs-version "\n")) > (insert (concat "org-version: " org-version "\n"))) > > (defun insert-org-text () > "insert some org text with sub and superscripts > and select the org text" > (interactive) > (insert (concat "\n\norg-use-sub-superscripts: ") > (if > (eq org-use-sub-superscripts t) "t\n" > (if (eq org-use-sub-superscripts '{}) "{}\n" > (if (eq org-use-sub-superscripts nil) "nil\n" "not nil\n")))) > (insert "plain underscore: X_sub 3^super\n") > (insert "braces : X_{sub} 3^{super}\n") > (push-mark) > (insert "plain underscore: X_sub 3^super\n") > (insert "braces : X_{sub} 3^{super}\n") > (exchange-point-and-mark)) > > (progn > (let ((orgfile "blaa.org")) > (get-buffer-create orgfile) > (set-buffer orgfile) > (split-window-horizontally) > (switch-to-buffer-other-window orgfile) > (kill-region (point-min) (point-max)) > (org-mode) > (insert-version) > (setq values '(t {} nil)) > (while values > (setq org-use-sub-superscripts (car values)) > (insert-org-text) > (org-html-convert-region-to-html) > (setq values (cdr values))))) > -------------cut--------- > and here is my output: > -------------cut--------- > ...