Re: [O] can't press ret without error

2016-07-17 Thread Nicolas Goaziou
Samuel Wales  writes:

> thanks for your reply.  next time i will check for long lines.
>
> On 7/17/16, Nicolas Goaziou  wrote:
>> It seems you are using very long lines.
>>
>> In particular one of them is ambiguous and the parser has to match too
>> much (hence the stack overflow) to decide what is that line.

Thinking about it, trying to evaluate

  (re-search-forward org-element-paragraph-separate nil t)

in various places may give you a clue about the problematic line.

Regards,



Re: [O] Importing ODT/libreoffice into Org

2016-07-17 Thread Eric Abrahamsen
Christian Moe  writes:

> Eric Abrahamsen writes:
>
>> I just had to convert a 200+ page document to Org by hand: searching
>> for italics worked, but not replace.
>
> Looks like pandoc is the way to go, I'll have to try it.
>
> Still, Search/Replace for italics in LibreOffice ought to work. Try this
> recipe:
>
> 1) Edit -> Find / Replace -> More options: check the box for "regular
>expressions".
> 2) On "Search for", type "(.*)" (without the quotes, with the parens).
> 3) With the cursor still on the "Search for" box, click on "Format" and
>select "Italics".
> 4) As a replacement, type: "/$1/" (for Org).
> 5) Replace all.

I have done that successfully in the past! This time it wouldn't work.
In the "other options" menu, after you choose the italics, there's a
"including styles" checkbox. Libreoffice would only find the italics if
that was checked, but if it was checked, clicking replace wouldn't work
-- it would ignore the contents of the replace box, and instead change
the style of the paragraph to "paragraph style". No matter what I poked,
that's all it would do. I appreciate Libreoffice in a way, but it's
mystery behavior like that that makes me get out of it as soon as
humanly possible.

It can be pandoc's job now!





Re: [O] can't press ret without error

2016-07-17 Thread Samuel Wales
thanks for your reply.  next time i will check for long lines.

On 7/17/16, Nicolas Goaziou  wrote:
> It seems you are using very long lines.
>
> In particular one of them is ambiguous and the parser has to match too
> much (hence the stack overflow) to decide what is that line.



Re: [O] Importing ODT/libreoffice into Org

2016-07-17 Thread Christian Moe

Eric Abrahamsen writes:

> I just had to convert a 200+ page document to Org by hand: searching
> for italics worked, but not replace.

Looks like pandoc is the way to go, I'll have to try it.

Still, Search/Replace for italics in LibreOffice ought to work. Try this
recipe:

1) Edit -> Find / Replace -> More options: check the box for "regular
   expressions".
2) On "Search for", type "(.*)" (without the quotes, with the parens).
3) With the cursor still on the "Search for" box, click on "Format" and
   select "Italics".
4) As a replacement, type: "/$1/" (for Org).
5) Replace all.

Annoyingly, there seems to be no way to write a macro for this in
LibreOffice, as formating attributes on search/replace isn't part of the
API. (If anyone has information to the contrary, please let me know.)

Yours,
Christian



Re: [O] [BUG] org-compile-file

2016-07-17 Thread Nicolas Goaziou
Hello,

"Charles C. Berry"  writes:

> In trying to export to a pdf in another directory specified with a 
> relative pathname as the destination, I kept running into errors.
>
> It looks like `org-compile-file' does not handle such things gracefully.
>
> I believe that `out-dir' here is redundant as `default-directory' is 
> already set to `out-dir':
>
>(let ((output (concat out-dir base-name "." ext)))
>
> and deleting it seems to cure the problems I am seeing.
>
> Here is an ECM
>
>
> #+BEGIN_SRC emacs-lisp
>(make-directory "./tmp" t)
>(shell-command "echo \"start...\" > ./tmp/ocf.txt")
>(org-compile-file "./tmp/ocf.txt" '("echo \"done\" >> %b.txt") "txt")
> #+END_SRC
>
> #+RESULTS:
>
> Results should be
>
> : ocf.txt
>
> and there should be no error messages.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] how to speed up an org-mode file?

2016-07-17 Thread Nicolas Goaziou
Hello,

Sharon Kimble  writes:

> I'm working on an org-mode file about cancer which is 945.1kb, is
> converted to a tex file of 1.0mb and a pdf of 2.0mb with 505 pages. The
> conversion is done through this code snippet '(global-set-key (kbd
> "s-#") 'org-latex-export-to-latex)'. There is no problem with the
> conversion to tex or conversion to pdf.
>
> However, the org-mode file is increasingly slowing down and becoming
> difficult to move about within the file, and also enter new information
> within it.
>
> How then can I speed it up within the org file please?

It would help to have some profiling to determine where the bottleneck
is. You could use `elp-instrument-package' on "org-" prefix and report
results here.


Regards,

-- 
Nicolas Goaziou



Re: [O] PATCH for Re: Bug: src block asterisk escaping doesn't work anymore

2016-07-17 Thread Nicolas Goaziou
Hello,

Robert Klein  writes:

> Thanks for the confirmation.  I also have issues exporting
> http://orgmode.org/worg/dev/org-element-api.org -- while the error
> message is "Unable to resolve code reference: end" bisecting leads to
> the same commit; reverting the commit solves the issue.  I reckon the
> line(s) beginning with #+ in the src block above confuse the exporter
> in the same way.

I reverted the commit. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] can't press ret without error

2016-07-17 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> all i did was press return.  this followed trying to comment
> a blank line (which i wish emacs would just do).
>
> i cannot do a thorough bug report or q/a at this time but
> thought this might be useful.
>
> Debugger entered--Lisp error: (error "Stack overflow in regexp matcher")
>   re-search-forward("^\\(?:\\*+
> \\|\\[\\(?:[0-9]+\\|fn:[-_[:word:]]+\\)\\]\\|%%(\\|[
>   ]*\\(?:$\\||\\|\\+\\(?:-+\\+\\)+[   ]*$\\|#\\(?:
> \\|$\\|\\+\\(?:BEGIN_\\S-+\\|\\S-+\\(?:\\[.*\\]\\)?:[
>   ]*\\)\\)\\|:\\(?: \\|$\\|[-_[:word:]]+:[]*$\\)\\|-\\{5,\\}[
>   
> ]*$\\|begin{\\([A-Za-z0-9*]+\\)}\\|CLOCK:\\|\\(?:[-+*]\\|\\(?:[0-9]+\\)[.)]\\)\\(?:[
>   ]\\|$\\)\\)\\)" 422741 move)
>   org-element-paragraph-parser(422741 (211182))

It seems you are using very long lines. 

In particular one of them is ambiguous and the parser has to match too
much (hence the stack overflow) to decide what is that line.

It would help to see that line. Could you make an ECM?

Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Clocking without timestamp

2016-07-17 Thread Nicolas Goaziou
Hello,

Sanel Zukan  writes:

> I've been using org-mode 7.9.3f for quite a bit time and for clocking
> with unspecified timestamp I'd use the following construct:
>
>  * Some task
>CLOCK: => 2:00
>
> which was perfectly valid in this org-mode version.

This syntax isn't valid. Actually it is rather unexpected that it was
producing something meaningful before.

CLOCK lines require at least a time-stamp.

Regards,

-- 
Nicolas Goaziou