Re: [O] 'listings' package used but not required in LaTeX export

2013-06-09 Thread Nicolas Goaziou
Hello,

Thorsten Jolitz  writes:

> Rasmus  writes:
>
>> Thorsten Jolitz  writes:
>>
>>> but there is no 
>>>
>>> ,--
>>> | \usepackage{listings}
>>> `--
>>
>> This is a feature to my understanding.
>
> mmhh ... I would rather say that the defaults can be as simple as
> possible (or desired), but should result in reasonable output without
> any user interaction. But without adding a \usepackage{listings} or
> modifying the variables you mention the LaTeX output is unusable in this
> case.
>
>> Several packagess can format, and I for instance prefer pygments if I
>> need code formatting.
>
> Then the default should be loading one of them rather than using package
> macros in the exported LaTeX sources without loading a package that
> contains those macros. 
>
>> You could add listings to your packages list, either
>> org-latex-packages-alist or even org-latex-default-packages-alist, if
>> you really want to.
>>
>> You could probably also write a clever filter to load a package if it
>> is missing.
>
> I could, and thanks for the tips, but I still think this can be
> considered a bug (if I'm not the only one having the problem).

By default, `org-latex-listings' is nil, which means no "listings" code
is inserted in the output. Therefore, the problem comes from your
configuration (i.e. you changed variable's value without reading its
docstring).


Regards,

-- 
Nicolas Goaziou



Re: [O] Avoid escaping braces in LaTeX export?

2013-06-09 Thread Nicolas Goaziou
Hello,

Richard Lawrence  writes:

> Eric S Fraga  writes:
>
>> Richard Lawrence  writes:
>> Org is not latex, for better or for worse.  However, it does allow you
>> to mix the two in various ways.  The inline approach is limited to
>> {text} that is on the same line.  You could try using visual-line-mode
>> and have all paragraphs be single lines.
>>
>> Alternative, you could try (untested):
>>
>> blah blah blah
>> #+LATEX: \ic{
>> some text for the inline comment
>> #+LATEX: }
>> more blah
>
> Thanks, Eric; that works, too.
>
> I think for now the best thing is for me to put longer comments in a
> custom environment.  Then I can use Org's block syntax, and have other
> export backends do the right thing, if I ever use them instead of LaTeX.
>
> I did dig into the exporter code a bit, so in case anyone is bitten by a
> similar issue that doesn't have a ready workaround, the places to look
> seem to be:
>   - org-element.el:org-element-latex-or-entity-successor.  This is where
> LaTeX fragments are identified.  (As Eric notes, multi-line commands
> will not have their arguments parsed as part of a latex-fragment;
> instead, the argument and surrounding braces are parsed as text in
> the surrounding paragraph.) 
>   - ox-latex.el:org-latex-plain-text.  This is where special characters
> that don't get parsed as part of a LaTeX fragment are
> protected/escaped.
>
> I still think it might be nice if each of the protections in
> org-latex-plain-text could be toggled via an #+OPTIONS keyword, since
> more often than not, I find that characters are escaped in LaTeX export
> when I would prefer they weren't.  But that might be a peculiar fact
> about how I use Org.  Since for now I don't require this behavior, I'm
> not going to try to implement it myself, but if anyone else would also
> find it useful, let me know and I will take a stab at writing a patch.
>
> Thanks, all, for the help!

As Eric said, Org format is not LaTeX, and I would add that Org mode is
not Auctex mode. You can already write raw LaTeX code with appropriate
markers. There's no point in allowing more LaTeX code without markers.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH (v3)][ox-latex.el] Allow AUTO argument to org-latex-guess-babel-language.

2013-06-09 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Nicolas Goaziou  writes:
>  
>> It is, thank you. Here is another round of comments.
>
> v4 attached.

Thank you.

The patch looks good, but the feature needs to be documented. I think
you could add a paragraph in `org-latex-classes' docstring, below the
first reference to "AUTO".

> Subject: [PATCH] Allow AUTO argument to org-latex-guess-babel-language.
>
> * ox-latex.el (org-latex-guess-babel-language): replace AUTO with
>   language if AUTO is the option of the LaTeX package Babel.
>
> * ox-latex.el (org-latex-guess-babel-language): retain case in final
> replace-match of the function.

You don't need to make two entries for the same function.


Regards,

-- 
Nicolas Goaziou



Re: [O] link abbreviation with multiple params, e. g. for geo locations

2013-06-09 Thread Michael Brand
Hi Eric

On Sat, Jun 8, 2013 at 8:03 PM, Eric Schulte  wrote:
> I've just pushed up a commit which should fix this problem.  The
> org-babel-current-exec-src-block-head variable wasn't bound during
> export.

Confirmed, thanks. In the attached marker_offset.org the evaluation of
the variable todo-state-var during export did not work before, now it
does.

What I do not understand is the behavior of the evaluation of the
other variable marker-var. During "C-c C-c" it is like expected with
point >= 305 which means within entry "* s". But during export it is
far before 305 which confuses me. How can "DONE" instead of nil from
the previous entry be assigned to todo-state-var this way and is this
"displacement" to be accepted?

For me it is enough for now if the marker is just anywhere within the
current entry. I do not (yet?) have a use case where I need the marker
to be at an individual source block and therefore different when
calling a function twice in the same entry as in marker_offset.org
with calls "(a)" and "(b)".

Michael



[O] [PATCH] summarize timestamps in column view

2013-06-09 Thread Pedro Silva
* org-colview.el (org-columns-compile-map):
(org-columns-number-to-string):
(org-columns-string-to-number): Handle timestamp summaries.

* org.texi (Column attributes): Document timestamp summaries.

TINYCHANGE
---
 contrib/lisp/org-colview-xemacs.el | 11 ++-
 doc/org.texi   |  3 +++
 lisp/org-colview.el| 11 ++-
 3 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/contrib/lisp/org-colview-xemacs.el 
b/contrib/lisp/org-colview-xemacs.el
index 63c0238..c2cff84 100644
--- a/contrib/lisp/org-colview-xemacs.el
+++ b/contrib/lisp/org-colview-xemacs.el
@@ -901,7 +901,12 @@ around it."
 ("@mean" mean_age
  (lambda (&rest x) (/ (apply '+ x) (float (length x
  (lambda (x) (- org-columns-time x)))
-("est+" estimate org-estimate-combine))
+("est+" estimate org-estimate-combine)
+(" format,function,calc  map.
 Used to compile/uncompile columns format and completing read in
 interactive function `org-columns-new'.
@@ -1190,6 +1195,9 @@ Don't set this, this is meant for dynamic scoping.")
 (defun org-columns-number-to-string (n fmt &optional printf)
   "Convert a computed column number to a string value, according to FMT."
   (cond
+   ((memq fmt '(timestamp))
+(format-time-string
+ (or printf (car org-time-stamp-formats)) (seconds-to-time n)))
((memq fmt '(estimate)) (org-estimate-print n printf))
((not (numberp n)) "")
((memq fmt '(add_times max_times min_times mean_times))
@@ -1218,6 +1226,7 @@ Don't set this, this is meant for dynamic scoping.")
   "Convert a column value to a number that can be used for column computing."
   (if s
   (cond
+   ((memq fmt '(timestamp)) s)
((memq fmt '(min_age max_age mean_age))
(cond ((string= s "") org-columns-time)
  ((string-match
diff --git a/doc/org.texi b/doc/org.texi
index 6d5eca0..8b1c49d 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -5497,6 +5497,9 @@ optional.  The individual parts have the following 
meaning:
 @{@@min@}@r{Minimum age (in days/hours/mins/seconds).}
 @{@@max@}@r{Maximum age (in days/hours/mins/seconds).}
 @{@@mean@}   @r{Arithmetic mean of ages (in 
days/hours/mins/seconds).}
+@{ format,function,calc  map.
 Used to compile/uncompile columns format and completing read in
 interactive function `org-columns-new'.
@@ -1055,6 +1060,9 @@ Don't set this, this is meant for dynamic scoping.")
 (defun org-columns-number-to-string (n fmt &optional printf)
   "Convert a computed column number to a string value, according to FMT."
   (cond
+   ((memq fmt '(timestamp))
+(format-time-string
+ (or printf (car org-time-stamp-formats)) (seconds-to-time n)))
((memq fmt '(estimate)) (org-estimate-print n printf))
((not (numberp n)) "")
((memq fmt '(add_times max_times min_times mean_times))
@@ -1083,6 +1091,7 @@ Don't set this, this is meant for dynamic scoping.")
   "Convert a column value to a number that can be used for column computing."
   (if s
   (cond
+   ((memq fmt '(timestamp)) s)
((memq fmt '(min_age max_age mean_age))
 (cond ((string= s "") org-columns-time)
   ((string-match
-- 
1.8.3




Re: [O] link abbreviation with multiple params, e. g. for geo locations

2013-06-09 Thread Michael Brand
On Sun, Jun 9, 2013 at 9:56 AM, Michael Brand
 wrote:
> In the attached marker_offset.org

Sorry, forgot that.


marker_offset.org
Description: Binary data


Re: [O] Org-mode latex pdf export issue: Underlined lines not breaking properly

2013-06-09 Thread Nicolas Goaziou
Hello,

Nathaniel Cunningham  writes:

> Suvayu Ali  gmail.com> writes:
>
>> 
>> Org mode
>> translates _underlined text_ to \underline{underlined text}, however if
>> you read the TeX.sx question referenced below you will see that it
>> doesn't support line breaks and the TeX community recommends \uline{..}
>> from the ulem package.
>> 
>>   
>
> The \ul{..} command from the soul package also supports underlining across
> line breaks.
> *And soul is included by default in org's list of loaded latex packages* -- 
> see
> org-latex-default-packages-alist.
>
> Therefore it would be painless for org users if \underline in
> org-latex-text-markup-alist were replaced with \ul -- and it would provide
> more complete support of underlining!  

Indeed. According to

  http://orgmode.org/worg/org-dependencies.html

introducing "soul" package in default packages list was meant to provide
underline and strike-through features. I fixed it in maint.

Thanks for the heads up.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] lisp/ox-html.el: Minimal encoding for code and verbatim text

2013-06-09 Thread Nicolas Goaziou
Hello,

Aurélien Aptel  writes:

> I've reported the following bug earlier:
> http://article.gmane.org/gmane.emacs.orgmode/72967
>
> Here's a fix, attached.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



[O] koma letter exporter: changing the priority of options

2013-06-09 Thread Alan Schmitt
Hello,

I just had to write a new letter with a fresh LCO file, and I would like
to propose to change the priority of options. The current priority is:
local options > emacs variables > lco file.

Unfortunately emacs variables have a default value, which means they are
output in the .tex file even if they are not set. Thus it is impossible
to set some options in the lco file (such as foldmarks or backaddress).

I propose to either change the priority to:
local options > lco file > emacs variables

or to not output these options when they have not been set. Here are the
four options I have not set that end up in my .tex file, shadowing my
lco configuration:

,
| \KOMAoption{backaddress}{true}
| \KOMAoption{foldmarks}{true}
| \KOMAoption{fromphone}{true}
| \KOMAoption{fromemail}{true}
`

What do you think?

Alan



Re: [O] 'listings' package used but not required in LaTeX export

2013-06-09 Thread Thorsten Jolitz

Rasmus  writes:
Nicolas Goaziou  writes:

> By default, `org-latex-listings' is nil, which means no "listings" code
> is inserted in the output. Therefore, the problem comes from your
> configuration (i.e. you changed variable's value without reading its
> docstring).

Ok, thanks to both of you, knowing what to search for I found the entry
in my init file and adapted my settings such that 'listings' are enabled
_and_ the package is loaded by default. 

-- 
cheers,
Thorsten




Re: [O] Go to heading using LISP

2013-06-09 Thread Alexander Wingård
Eric Abrahamsen  ericabrahamsen.net> writes:

> 
> Alexander Wingård  gmail.com> writes:
> 
> > Hi!
> >
> > I want to create special key-bindings that use the org-refile goto
> > interface to jump to specific headings.
More specific example, let's say I want to bind keys in my .emacs file:

"C-c b" -> find "gtd.org" and jump to "Projects/Work/Bugs"
"C-c m" -> find "gtd.org" and jump to "Projects/Work/Meetings"
> >
> > My initial attempt was:
> > (org-refile 4 "gtd.org" "Projects/Work/Bugs")
> >
> > But it seems specifying RFLOC is not that simple.
> >
> > Someone have any idea how to achieve this or another way to jump to a
> > heading?
> 
> Is the `org-goto' interface close enough? It only does the current
> buffer, but you can set org-goto-interface to make it behave a fair bit
> like refile...
I've looked at that function aswell but it seems even harder to achieve 
what I want with: Call it from lisp without any user interaction. If you think
that is possible I would love an example.
> 
> Yours
> Eric
> 
> 





[O] bug#14586: 23.3; void-variable calendar-view-diary-initially-flag

2013-06-09 Thread Glenn Morris
Version: 24.1

Mike Kupfer wrote:

> 1. visit an org-mode file.
> 2. insert a date (C-c ! RET)
> 3. M-x calendar RET
>
> This gives me (from *Messages*):
>
> calendar: Symbol's value as variable is void: 
> calendar-view-diary-initially-flag
[...]
> This is with the stock Emacs that comes with Ubuntu 12.04.
>
> In GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.10)

Thanks for the report. This was fixed in Emacs 24.1.
Please upgrade (latest is 24.3) and/or encourage your distribution to do so.
You can work around the problem by simply using (require 'calendar)
before using Org.





Re: [O] koma letter exporter: changing the priority of options

2013-06-09 Thread Viktor Rosenfeld
Hi Alan,

Alan Schmitt wrote:

> Hello,
> 
> I just had to write a new letter with a fresh LCO file, and I would like
> to propose to change the priority of options. The current priority is:
> local options > emacs variables > lco file.
> 
> Unfortunately emacs variables have a default value, which means they are
> output in the .tex file even if they are not set. Thus it is impossible
> to set some options in the lco file (such as foldmarks or backaddress).

Why not simply set these Emacs variables to nil? Then they are not
written in the TeX file and the LCO file works as expected.

> I propose to either change the priority to:
> local options > lco file > emacs variables

I chose the current behavior in order to have the LCO file as a default
which can easily be overwritten if wanted by setting an option line for
an individual header. For example, I have foldmarks and backaddress
enabled in my LCO file. Recently I had to sent a few letters by email
where these things don't make a lot of sense. So I disabled them using
#+OPTIONS: foldmarks:nil backaddress:nil
 
> or to not output these options when they have not been set. Here are the
> four options I have not set that end up in my .tex file, shadowing my
> lco configuration:
> 
> ,
> | \KOMAoption{backaddress}{true}
> | \KOMAoption{foldmarks}{true}
> | \KOMAoption{fromphone}{true}
> | \KOMAoption{fromemail}{true}
> `

Perhaps the best option would be to change the default value of these
variables to nil? We have almost every option that personalizes
a letter, e.g., opening and closing, set to nil already. The only
benefit of having default values is to show off the features of
org-koma-letter. But it seems to be interfering with people's workflow
so best turn them off.

Cheers,
Viktor
> 
> What do you think?
> 
> Alan
> 



[O] Xemacs 21.5.32 & org-8.03 almost

2013-06-09 Thread Uwe Brauer
Hello

I hope I am almost done with the installation. 

- First thanks to Achim Gratz for pointing out
  http://orgmode.org/worg/dev/org-build-system.html#sec-4-1-4
  to set the compilation and built process correctly.

-  next, when I compiled installed and restarted xemacs using
   the 8.03 version I run into an error of the sort 

   
Wrong number of arguments: (lambda (obsolete-name current-name
when &optional docstring) "$ad-doc:
define-obsolete-function-alias$" (let (ad-return-value) (setq
ad-return-value (ad-Orig-define-obsolete-function-alias
obsolete-name current-name)) ad-return-value)), 2 

This is now a common subject, define-obsolete-function-alias in
xemacs still only accepts 2 arguments while GNU emacs accepts 3.

(I had this issue for example in Ulf icalendar.el). I thought of
wrapping (if (featurep 'xemacs) around the relevant code, till I
found out that there is already a org-compat, so I
   added (require 'org-compat) and then the problem disappeared.

-  However I now receive:

 Cannot open load file:   "org-version.el"


and that puzzles me, I grepped by init files and looked for such
a file but no avail.

Is there anybody who could give me a hint?

Thanks 

Uwe Brauer 





Re: [O] Xemacs 21.5.32 & org-8.03 almost

2013-06-09 Thread Achim Gratz
Uwe Brauer writes:
> (I had this issue for example in Ulf icalendar.el). I thought of
> wrapping (if (featurep 'xemacs) around the relevant code, till I
> found out that there is already a org-compat, so I
>added (require 'org-compat) and then the problem disappeared.
>
> -  However I now receive:
>
>  Cannot open load file:   "org-version.el"

This would indicate you didn't create the autoload files.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#BlofeldUserWavetables




Re: [O] link abbreviation with multiple params, e. g. for geo locations

2013-06-09 Thread Eric Schulte
Michael Brand  writes:

> Hi Eric
>
> On Sat, Jun 8, 2013 at 8:03 PM, Eric Schulte  wrote:
>> I've just pushed up a commit which should fix this problem.  The
>> org-babel-current-exec-src-block-head variable wasn't bound during
>> export.
>
> Confirmed, thanks. In the attached marker_offset.org the evaluation of
> the variable todo-state-var during export did not work before, now it
> does.
>
> What I do not understand is the behavior of the evaluation of the
> other variable marker-var. During "C-c C-c" it is like expected with
> point >= 305 which means within entry "* s". But during export it is
> far before 305 which confuses me. How can "DONE" instead of nil from
> the previous entry be assigned to todo-state-var this way and is this
> "displacement" to be accepted?
>

Export buffers are sometimes modified or narrowed during the export
process, so I wouldn't depend too much on the absolute values of markers
generated during export.  As long as the heading in which the marker
lives seems to be correct I'd count it as a success.

>
> For me it is enough for now if the marker is just anywhere within the
> current entry. I do not (yet?) have a use case where I need the marker
> to be at an individual source block and therefore different when
> calling a function twice in the same entry as in marker_offset.org
> with calls "(a)" and "(b)".
>

Great.  If such a need arises, you could try setting the variable in the
src_call line, rather than relying on the value set in the main code
block.

Cheers,

BTW: I notice your Org file attached as application/vnd.lotus-organizer
(the default for .org in Emacs mime types).  I had this issue as well,
and I now use the following so that Org-mode files attach as org.

;; -*- emacs-lisp -*-
(setf mailcap-mime-extensions
  (cons '(".org" . "text/x-org") mailcap-mime-extensions))

>
> Michael

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Xemacs 21.5.32 & org-8.03 almost

2013-06-09 Thread Uwe Brauer

>> "Achim" == Achim Gratz  writes:

   > Uwe Brauer writes:
   >> (I had this issue for example in Ulf icalendar.el). I thought of
   >> wrapping (if (featurep 'xemacs) around the relevant code, till I
   >> found out that there is already a org-compat, so I
   >> added (require 'org-compat) and then the problem disappeared.
   >> 
   >> -  However I now receive:
   >> 
   >> Cannot open load file:   "org-version.el"

   > This would indicate you didn't create the autoload files.
Strange I am sure I run make autoload.
I did it again and now this file is generated. *However* 
now  even with 
(require 'org-compat)

I obtain 
,
| 
| (1) (initialization/error) An error has occurred while loading 
/home/oub/.emacs:
| 
| Wrong number of arguments: (lambda (obsolete-name current-name when
| &optional docstring) "$ad-doc: define-obsolete-function-alias$" (let
| (ad-return-value) (setq ad-return-value
| (ad-Orig-define-obsolete-function-alias obsolete-name current-name))
| ad-return-value)), 2 
`

The strange this is that C-h f define-obsolete-function-alias tells me
that the function is advised and points to org-compat but it seems not
to work. 
I can of course just wrap the xemacs featurep and delete the docstring
in these functions but I thought org-compat would make this not
necessary.

Uwe 




Re: [O] add "joint work with"

2013-06-09 Thread Eric S Fraga
Andrej Depperschmidt  writes:

> Hello emacs-orgmode list!
>
> I am trying to prepare a talk using ox-beamer and am missing a function
> that I am used to.
>
> In beamer latex one can for example write
>
> \author[speaker]{speaker \\ joint work with second author and third author}
>
> Then I get my name and that of my coauthors on the titlepage. My name
> can then also appear (depending on the beamer theme) in the footnote on
> each slide.
>
> Is it possible to achieve this without exporting to latex and adjusting
> the corresponding entries there?

Yes, you can do the following:

#+latex_header: \author[speaker]{speaker \\ joint work with second author and 
third author}
#+latex_header: \renewcommand{\author}[1]{}

It's a bit of a hack but it works...

HTH,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.3-193-g334581




[O] BUG in org-element-context

2013-06-09 Thread Eric Schulte

To demonstrate, run M-: (org-element-context) with the point at the
beginning of the following, and notice that the second ")" is not
included in the returned string.

  call_foo(bar=(+ 2 2))

Cheers,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] Xemacs 21.5.32 & org-8.03 almost

2013-06-09 Thread Achim Gratz
Uwe Brauer writes:
> The strange this is that C-h f define-obsolete-function-alias tells me
> that the function is advised and points to org-compat but it seems not
> to work. 

I think it is possible that XEmacs treats advices a bit differently.
Anyway, the idea of the advice is to drop the (not needed) third
argument before calling the XEmacs function.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Blofeld:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds




Re: [O] add "joint work with"

2013-06-09 Thread Andrej Depperschmidt
Eric S Fraga writes:



> #+latex_header: \author[speaker]{speaker \\ joint work with second author and 
> third author}
> #+latex_header: \renewcommand{\author}[1]{}


Thank you very much! The second line is the one that I was missing.

Cheers,
Andrej



Re: [O] link abbreviation with multiple params, e. g. for geo locations

2013-06-09 Thread Michael Brand
Hi Eric

On Sun, Jun 9, 2013 at 9:18 PM, Eric Schulte  wrote:
> Export buffers are sometimes modified or narrowed during the export
> process, so I wouldn't depend too much on the absolute values of markers
> generated during export.  As long as the heading in which the marker
> lives seems to be correct I'd count it as a success.

Ok.

Out of curiosity I also tried to assign a Lisp marker with :var

#+HEADER: :var marker-var=(identity org-babel-current-src-block-location)

which leads to

executing Emacs-Lisp code block (func)...
(marker-var (quote #))
eval: Invalid read syntax: "#"

Is such a Lisp marker supposed to work across a :var assignment? For
me it does not matter because either the variable
org-babel-current-src-block-location is better evaluated within the
source block or in the header I do not expect the value to be of much
use for source blocks other than Lisp. I just let you know in case you
wanted the assignment to work with other #-constructs or there was a
connection with the recent changes that temporarily required :shebang
quoting.

Michael



Re: [O] Xemacs 21.5.32 & org-8.03 almost

2013-06-09 Thread Uwe Brauer
>> "Achim" == Achim Gratz  writes:

   > Uwe Brauer writes:
   >> The strange this is that C-h f define-obsolete-function-alias tells me
   >> that the function is advised and points to org-compat but it seems not
   >> to work. 

   > I think it is possible that XEmacs treats advices a bit differently.
   > Anyway, the idea of the advice is to drop the (not needed) third
   > argument before calling the XEmacs function.
Yes this was my understanding but it seems not to work.
Tomorrow I try to deal with the define-obsolete-function-alias manually

Uwe 


smime.p7s
Description: S/MIME cryptographic signature


Re: [O] Org-mode latex pdf export issue: Underlined lines not breaking properly

2013-06-09 Thread Feng Shu
Nicolas Goaziou  writes:

> Hello,
>
> Nathaniel Cunningham  writes:
>
>> Suvayu Ali  gmail.com> writes:
>>
>>> 
>>> Org mode
>>> translates _underlined text_ to \underline{underlined text}, however if
>>> you read the TeX.sx question referenced below you will see that it
>>> doesn't support line breaks and the TeX community recommends \uline{..}
>>> from the ulem package.
>>> 
>>>   >
>> The \ul{..} command from the soul package also supports underlining across
>> line breaks.
>> *And soul is included by default in org's list of loaded latex packages* -- 
>> see
>> org-latex-default-packages-alist.
>>
>> Therefore it would be painless for org users if \underline in
>> org-latex-text-markup-alist were replaced with \ul -- and it would provide
>> more complete support of underlining!  
>
> Indeed. According to
>
>   http://orgmode.org/worg/org-dependencies.html
>
> introducing "soul" package in default packages list was meant to provide
> underline and strike-through features. I fixed it in maint.
>
> Thanks for the heads up.

When the article is writen with Chinese,  soul will output:

#+begin_src
soul Error: Reconstruction failed.
#+end_src

and underline word will dispear from  the output pdf file!

A tmp solution is :


\ul{\mbox{中文测试}}

but,when it can't break lines properly too.

>
>
> Regards,

-- 



Re: [O] Go to heading using LISP

2013-06-09 Thread Eric Abrahamsen
Alexander Wingård  writes:

> Eric Abrahamsen  ericabrahamsen.net> writes:
>
>> 
>> Alexander Wingård  gmail.com> writes:
>> 
>> > Hi!
>> >
>> > I want to create special key-bindings that use the org-refile goto
>> > interface to jump to specific headings.
> More specific example, let's say I want to bind keys in my .emacs file:
>
> "C-c b" -> find "gtd.org" and jump to "Projects/Work/Bugs"
> "C-c m" -> find "gtd.org" and jump to "Projects/Work/Meetings"
>> >
>> > My initial attempt was:
>> > (org-refile 4 "gtd.org" "Projects/Work/Bugs")
>> >
>> > But it seems specifying RFLOC is not that simple.
>> >
>> > Someone have any idea how to achieve this or another way to jump to a
>> > heading?
>> 
>> Is the `org-goto' interface close enough? It only does the current
>> buffer, but you can set org-goto-interface to make it behave a fair bit
>> like refile...
> I've looked at that function aswell but it seems even harder to achieve 
> what I want with: Call it from lisp without any user interaction. If you think
> that is possible I would love an example.

Ah, I see. Well, if you're just looking for a lisp function to jump to a
headline, you could use `org-refile-get-targets' to produce a full table
of all the possible refile targets, and then choose among them. (assoc
"gtd.org/Projects/Work/Bugs" (org-refile-get-targets)) will find the
right heading, then I guess the value of point is in that heading
somewhere -- you can visit the file and goto-point.

But if you're just looking to bind a bunch of keys to "jump to specific
heading" commands, I'd use custom ids. Give all the headings in question
ID properties, and then just use something like this:

(global-set-key (kbd "C-c b") (lambda () (org-id-open
"f1d05552-1dce-4004-a914-d2b092d8470e")))

Hope that helps,
Eric




Re: [O] org-cut-subtree, bug?

2013-06-09 Thread Andreas Röhler

Issue doesn't show up with Emacs built from trunk

GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.18) of 2013-06-07

Thanks,

Andreas




Re: [O] Go to heading using LISP

2013-06-09 Thread Jambunathan K
Eric Abrahamsen  writes:

> if you're just looking for a lisp function to jump to a headline

One can use org-ctags and use Emacs and etags interface (M-. etc) to
jump to a headline.  One can also choose the headline via completion.