From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <871u2iznog.fsf@alphaville.bos.redhat.com> (raw)
In-Reply-To: d628849.61096c669907671f959cb315b4dee411@afterlogic.edis.at
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---------
> ...
next prev parent reply other threads:[~2013-11-14 21:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-14 19:38 Bug: org-use-sub-superscripts not working [8.2.3b (8.2.3b-elpa @ c:/Users/xxx/.emacs.d/elpa/org-20131112/)] dieter
2013-11-14 21:19 ` Nick Dokos [this message]
2013-11-15 9:10 ` Bastien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871u2iznog.fsf@alphaville.bos.redhat.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).