Re: Emacs as an Org LSP server

2020-12-14 Thread Dominik Schrempf
Hello!

I am infrequent active participant on this list but follow some discussions.
This one I found particularly interesting. I do see both of your points Tim
Cross, and Jean Louis, thank you for your detailed explanations including the
references.

As a user of Emacs and Org mode (and not so much as a developer), I am mostly
interested in an editor that works well with the features and languages I use.
For example, I am writing a lot of Haskell, and the Haskell Language Server
provides excellent development support. The Haskell Language Server is not
developed exclusively by Emacs users. To the contrary, it's probably developed
mostly by non-Emacs users. Would I use Emacs to write Haskell code if I could
not use the Haskell Language Server? I don't know although I love Emacs. (I am
sure I would, but I would be a little disappointed).

More generally, on https://langserver.org/ I found a very good argument for why
we need a specification such as the LSP.

I quote:

The problem: "The Matrix"
   Go   JavaTypeScript  ...
Emacs  X  X X
VimX  X X
VSCode X  X X
...

The solution: Lang[uage] servers and clients
Go X
Java   X
TypeScript X
...

Emacs  X
VimX
VSCode X

I think this is an excellent idea. However, I am not familiar with the legal
aspects mentioned by Jean. So far I had good experiences with language servers.
On the other side, Org mode is Emacs specific, so this argument does not really
apply. Do we want Org mode to stay Emacs specific? I don't know.

Dominik

Jean Louis  writes:

> There is definitely nothing wrong in providing Org language server
> that runs for different editors who could support the LSP protocol, it
> will boost collaboration.
>
> That is pretty much separate subject of the centralization and
> strategies we spoke about.
>
> * Tim Cross  [2020-12-14 23:19]:
>> This is just ill informed nonsense. The LSP is nothing more than a
>> specification. The fact it was initially defined/proposed by Microsoft
>> is completely irrelevant.
>
> I truly wish it would be that simple.
>
> There are many tools and inventions by Microsoft. Some of them appear
> to be free, but all of them are there to contribute to profit
> making. I am not against profit making. But we have to look into the
> tool as having the purpose to contribute to THEIR profit
> making. History of Microsoft is clear. Sorry, I do not share the
> narrowed viewpoint that they will invest so much money "to help other
> free software developers". That it is defined by Microsoft in
> collaboration with others is very relevant there.
>
> First question to clarify is if it is really patented or not. While
> you as user you can download some Rust server software or Java
> software and run server that will work with various editors, somebody
> else may not be able to do so if there is patent on it. That imposes
> freedom obstacles in future.
>
> Does this patent description correspond to the subject:
> https://uspto.report/patent/app/20190149346
>
>> It is NOT server based in the sense you mean. In fact, it is
>> actually precisely what you argue it should be. LSP is simply a
>> "generic definitions how editor could act, and editor could load
>> those generic definitions locally."
>
> I am well aware that you as user may download the piece of software
> and run it as server on your computer and that you wish to distinguish
> how user may not need a remote server. We clarified this
> already.
>
> Corporation will not have use of your personal use, they will promote
> their servers and push people to get hooked and trapped into it. It
> will become questionable if other entities become able to do the same
> if such process is patented.
>
> That it is server based should be undisputable. The whole protocol
> speaks of sparing client's CPU time, so CPU time will be spared when
> process does not run on the same CPU. You can run it now for
> yourself. Sure. But the strategy is visible from their very open
> descriptions. Large company is not interested in those single
> users. Single users had "git" under their control but nobody had
> enough money and power to centralize 50 million developers.
>
> Innocent example is: https://melpa.org/#/lsp-pascal package that
> requires: https://github.com/arjanadriaanse/pascal-language-server
>
> But it is made and designed as a server for third parties to take
> advantage of it one time in future.
>
> https://code.visualstudio.com/api/language-extensions/language-server-extension-guide
>
> If one would like to improve all editors to use centralized
> specifications than that could be done also by providing server-less
> specification that every editor could load and thus function in the
> same way. Then editor developers could make their underlying language
> module that would understand the extension
> specificiation. Then users would just need to import or load the
> general specification something like XML file or similar type of a
> document that 

Re: The Website Revamp: The final stretch

2020-09-22 Thread Dominik Schrempf
Hello,

thank you very much for working on the new Org Mode web site!

Just one thing which might already have been said:

The scrolling is weird. I use keys to scroll the browser, and there is a delay
and some weird smooth scrolling behavior. Is this desired?

Thanks,
Dominik

TEC  writes:

> Hello everyone,
>
> I'm pleased to announce that after chatting with Bastien, my little
> revamp project seems to be nearing the point where it may replace the
> current site.
>
> Two things that would be good to get sorted:
> 1. Translation of the index page to French/Japanese ::
>I'm english only, and Bastien is busy, so volunteers would be much
>   appreciated!
> 2. Picking the best 'Hero banner' on the home page ::
>Concerns were raised over the lack of contrast between the logo and
>the current banner background. I've chatted to someone else with
>some ideas and we've produced a few concepts which we'd like to get
>your feedback on.
>See the file attached, and if you could give say your top three
>picks (ordered), and any relevant reasoning/considerations/comments
>that would be great!
>
> All the best,
>
> Timothy.
>
> p.s. I haven't had much luck with attachments in the past, if this fails
> I'll reply with the attachment.




Re: multiple EXPORT_LATEX_HEADER lines

2020-06-12 Thread Dominik Schrempf
Hello,

are you looking for, e.g.,

#+latex_header: \addbibresource{bibliography.bib}
#+latex_header_extra: do some stuff
#+latex_header_extra: and even more

I don't use the EXPORT keyword at the beginning, I am not sure if it is needed.

Best,
Dominik

Alan Schmitt  writes:

> Hello,
>
> I would like to have a multi-line export header when exporting a
> subtree. I tried this:
>
> :EXPORT_LATEX_HEADER: \makeatletter
> :EXPORT_LATEX_HEADER+: \@setplength{refvpos}{\useplength{toaddrvpos}}
> :EXPORT_LATEX_HEADER+: \makeatother
>
> The problem is that it's exported on a single line, and as such it does
> not work. Is there a way to have the multiple properties exported as
> multiple lines, or to specify in the property there is a line break?
>
> Thanks,
>
> Alan




Re: Necessity of `org-fill-paragraph'

2020-06-04 Thread Dominik Schrempf
Dear Nicolas!

Thank you for your fast reply! I now use a custom =org-unfill-toggle= which does
the same as =unfill-toggle= but uses =org-fill-paragraph=. It just took me a
while to see where the problem lies! For cases like these, it would be
advantageous if major modes could redefine certain functions. Like
=fill-paragraph= in this case. Instead, they usually (have to?) rebind the
keys...

Kind regards,
Dominik

Nicolas Goaziou  writes:

> Hello,
>
> Dominik Schrempf  writes:
>
>> I am using a global keybinding for =M-q=, so that I can fill and unfill
>> paragraphs with one key stroke (unfill.el):
>>
>> : (global-set-key (kbd "s-q") 'unfill-toggle)
>>
>> For a long time, I thought that =fill-paragraph= was broken in Org mode, 
>> because
>> it doesn't work well on code blocks, on lists, and on many other things [1].
>> Just now, I realized that Org mode uses a specialized version of
>> `fill-paragraph`, called `org-fill-paragraph`.
>>
>> Hence, the aforementioned global key binding breaks behavior in Org mode,
>> although the function =unfill-toggle= is just a wrapper around
>> =fill-paragraph=.
>
> You could detect if you're in an Org document beforehand.
> `org-fill-paragraph' obeys to `fill-column'.
>
>> Is it necessary to have the specialized function =org-fill-paragraph=? Is it
>> possible to use the canonical =fill-paragraph=?
>
> There is `fill-paragraph-function', but it only kicks when no region is
> selected. Using it would break region filling. There is also
> `fill-forward-paragraph-function', but I think it is too limited.
>
> In a nutshell, I didn't find any way to fill correctly Org documents
> using `fill-paragraph' mechanism. So I wrote the current implementation
> of `org-fill-paragraph', which is a wrapper around `org-fill-element'.
>
> Regards,




Necessity of `org-fill-paragraph'

2020-06-04 Thread Dominik Schrempf
Hello,

I am using a global keybinding for =M-q=, so that I can fill and unfill
paragraphs with one key stroke (unfill.el):

: (global-set-key (kbd "s-q") 'unfill-toggle)

For a long time, I thought that =fill-paragraph= was broken in Org mode, because
it doesn't work well on code blocks, on lists, and on many other things [1].
Just now, I realized that Org mode uses a specialized version of
`fill-paragraph`, called `org-fill-paragraph`.

Hence, the aforementioned global key binding breaks behavior in Org mode,
although the function =unfill-toggle= is just a wrapper around =fill-paragraph=.

Is it necessary to have the specialized function =org-fill-paragraph=? Is it
possible to use the canonical =fill-paragraph=?

Thanks,
Dominik

[1] https://github.com/syl20bnr/spacemacs/issues/13384



Re: [O] Feature Proposal: Titled Paragraphs

2019-10-23 Thread Dominik Schrempf
Hello!

I agree with this proposal. At some point I already asked if the following
structure is possible:

#+begin_example
* Title
** Section I
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec hendrerit tempor
tellus. Donec pretium posuere tellus. Proin quam nisl, tincidunt et, mattis
eget, convallis nec, purus. Cum sociis natoque penatibus et magnis dis
parturient montes, nascetur ridiculus mus. Nulla posuere. Donec vitae dolor.
Nullam tristique diam non turpis. Cras placerat accumsan nulla. Nullam rutrum.
Nam vestibulum accumsan nisl.

Another paragraph that is not related to Section I, but doesn't deserve a
section title. Another paragraph that is not related to Section I, but doesn't
deserve a section title. Another paragraph that is not related to Section I, but
doesn't deserve a section title. Another paragraph that is not related to
Section I, but doesn't deserve a section title.
#+end_example

With titled paragraphs, this document structure could be achieved.

All the best,
Dominik

Christoph Michelbach  writes:

> On 2019-10-23 15:24, Fraga, Eric wrote:
>> Why not use a further headline if you are exporting to LaTeX?  In the
>> default configuration, the 4th level heading corresponds to \paragraph
>> in LaTeX.
>>
>
> 1. Because headlines and paragraphs are different things. One is used for
> hierarchical structuring and description, the other only for description.
> 2. Because that'd mean skipping hierarchical levels when using paragraphs on a
> high level.
> 3. Because headlines are collapsed by default. I realize the default can be
> changed but if you like hierarchical levels to be collapsed, you still have to
> expand paragraphs far up individually or expand all the hierarchical levels
> below by dobule-tabbing.




[O] org-lint reports non-existent file for html links

2019-03-13 Thread Dominik Schrempf

Hi,

I have the following in-buffer variable set:

#+SETUPFILE: https://path/to/some/setupfile.setup

Org lint reports

17 low   Non-existent setup file "https://path/to/some/seutpfile.setup

This is true, but also not very relevant. Should we check for URLs with
org-lint?

Kind regards,
Dominik



Re: [O] Latex export with \begin{equation}

2018-09-18 Thread Dominik Schrempf

Hello,

I tried to follow your suggestions. Please let me know, if the patch is OK like
this.

The patch only adds one footnote. It is unfortunate, that all subsequent
footnotes are changed too.

Best,
Dominik

>From 4b97952b0d6d218de7d7cab6f7017f87b68b966c Mon Sep 17 00:00:00 2001
From: Dominik Schrempf 
Date: Tue, 18 Sep 2018 15:04:47 +0200
Subject: [PATCH] Mention peculiarities of Math in HTML code. TINYCHANGE.

---
 doc/org-manual.org | 132 +++--
 1 file changed, 68 insertions(+), 64 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 0732c1d97..90b2dbd12 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -12638,7 +12638,7 @@ is.
 #+vindex: org-html-mathjax-options~
 LaTeX math snippets (see [[*LaTeX fragments]]) can be displayed in two
 different ways on HTML pages.  The default is to use the [[http://www.mathjax.org][MathJax]],
-which should work out of the box with Org[fn:123].  Some MathJax
+which should work out of the box with Org[fn:123][fn:124].  Some MathJax
 display options can be configured via ~org-html-mathjax-options~, or
 in the buffer.  For example, with the following settings,
 
@@ -12650,7 +12650,7 @@ in the buffer.  For example, with the following settings,
 #+texinfo: @noindent
 equation labels are displayed on the left margin and equations are
 five em from the left margin.  In addition, it loads the two MathJax
-extensions =cancel.js= and =noErrors.js=[fn:124].
+extensions =cancel.js= and =noErrors.js=[fn:125].
 
 #+vindex: org-html-mathjax-template
 See the docstring of ~org-html-mathjax-options~ for all supported
@@ -12713,7 +12713,7 @@ line.
 #+vindex: org-export-html-todo-kwd-class-prefix
 #+vindex: org-export-html-tag-class-prefix
 You can modify the CSS style definitions for the exported file.  The
-HTML exporter assigns the following special CSS classes[fn:125] to
+HTML exporter assigns the following special CSS classes[fn:126] to
 appropriate parts of the document---your style specifications may
 change these, in addition to any of the standard classes like for
 headlines, tables, etc.
@@ -12953,7 +12953,7 @@ LaTeX export back-end finds the compiler version to use from
 Org file.  See the docstring for the
 ~org-latex-default-packages-alist~ for loading packages with certain
 compilers.  Also see ~org-latex-bibtex-compiler~ to set the
-bibliography compiler[fn:126].
+bibliography compiler[fn:127].
 
 *** LaTeX specific export settings
 :PROPERTIES:
@@ -13564,7 +13564,7 @@ a limit to a level before the absolute limit (see [[*Export Settings]]).
 
 The ODT export back-end handles creating of OpenDocument Text (ODT)
 format.  Documents created by this exporter use the
-{{{cite(OpenDocument-v1.2 specification)}}}[fn:127] and are compatible
+{{{cite(OpenDocument-v1.2 specification)}}}[fn:128] and are compatible
 with LibreOffice 3.4.
 
 *** Pre-requisites for ODT export
@@ -13965,7 +13965,7 @@ document in one of the following ways:
  variables ~org-latex-to-mathml-convert-command~ and
  ~org-latex-to-mathml-jar-file~.
 
- If you prefer to use MathToWeb[fn:128] as your converter, you can
+ If you prefer to use MathToWeb[fn:129] as your converter, you can
  configure the above variables as shown below.
 
  #+begin_src emacs-lisp
@@ -13975,7 +13975,7 @@ document in one of the following ways:
"/path/to/mathtoweb.jar")
  #+end_src
 
- To use LaTeX​ML[fn:129] use
+ To use LaTeX​ML[fn:130] use
 
  #+begin_src emacs-lisp
  (setq org-latex-to-mathml-convert-command
@@ -14295,7 +14295,7 @@ with the =#+ATTR_ODT= line.  For a discussion on default formatting of
 tables, see [[*Tables in ODT export]].
 
 This feature closely mimics the way table templates are defined in the
-OpenDocument-v1.2 specification.[fn:130]
+OpenDocument-v1.2 specification.[fn:131]
 
 #+vindex: org-odt-table-styles
 For quick preview of this feature, install the settings below and export the
@@ -14329,7 +14329,7 @@ templates, define new styles there.
 
 To use this feature proceed as follows:
 
-1. Create a table template[fn:131].
+1. Create a table template[fn:132].
 
A table template is set of =table-cell= and =paragraph= styles for
each of the following table cell categories:
@@ -14368,7 +14368,7 @@ To use this feature proceed as follows:
== element of the content template file
(see [[x-orgodtcontenttemplate-xml][Factory styles]]).
 
-2. Define a table style[fn:132].
+2. Define a table style[fn:133].
 
#+vindex: org-odt-table-styles
To define a table style, create an entry for the style in the
@@ -15395,7 +15395,7 @@ If you want to publish the Org file as an =.org= file but with
 ~org-publish-org-to-org~.  This produces =file.org= and put it in the
 publishing directory.  If you want a htmlized version of this file,
 set the parameter ~:htmlized-source~ to ~t~.  It produces
-=file.org.html= in the publishing directory[fn:133].
+=file.org.html= in t

Re: [O] Latex export with \begin{equation}

2018-09-17 Thread Dominik Schrempf

Oh thanks,

I thought it would be good to add a comment to the Org mode manual although it
is of course not really Org mode related.

I decided that a good location would be
https://orgmode.org/manual/Math-formatting-in-HTML-export.html#Math-formatting-in-HTML-export

A proposed patch is attached, please let me know what you think.

Best,
Dominik

--- org-manual.org	2018-09-17 18:48:17.868785307 +0200
+++ org-manual.org.new	2018-09-17 18:48:09.708751068 +0200
@@ -12655,7 +12655,9 @@
 #+vindex: org-html-mathjax-template
 See the docstring of ~org-html-mathjax-options~ for all supported
 variables.  The MathJax template can be configure via
-~org-html-mathjax-template~.
+~org-html-mathjax-template~.  Please note that formulas will be part
+of an HTML document, and that signs such as =<=, =>=, or =&= have
+special meanings (see [[http://docs.mathjax.org/en/latest/tex.html#tex-and-latex-in-html-documents][MathJax TeX and LaTeX support]]).
 
 If you prefer, you can also request that LaTeX fragments are processed
 into small images that will be inserted into the browser page.  Before


Nick Dokos  writes:


Dominik Schrempf  writes:



so I found the reason. Both Org versions behave the same, sorry for the
confusion. The original equation that does not get exported correctly 
contained

angles:

\begin{equation}
  = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

This equation is correctly rendered when using a .tex file and native LaTeX.
If the angles are removed, the Org Mode HTML export works:

\begin{equation}
 k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

Does anybody know why? Is this expected behavior? Can this be changed?



Maybe this explains it:

"...Also, since the mathematics is initially given as text on the
page, you need to be careful that your mathematics doesn’t look like
HTML tags to the browser (which parses the page before MathJax gets to
see it). In particular, that means that you have to be careful about
things like less-than and greater-than signs (< and >), and ampersands
(&), which have special meaning to the browsers. For example,

... when $xhttp://docs.mathjax.org/en/latest/tex.html

the section entitled "TeX and LaTeX in HTML documents":


Re: [O] Latex export with \begin{equation}

2018-09-13 Thread Dominik Schrempf

Hi,

so I found the reason. Both Org versions behave the same, sorry for the
confusion. The original equation that does not get exported correctly contained
angles:

\begin{equation}
  = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

This equation is correctly rendered when using a .tex file and native LaTeX.
If the angles are removed, the Org Mode HTML export works:

\begin{equation}
 k_{eff} = \frac{\sum_i w_i k_{eff}(i)}{\sum_i w_i}.
\end{equation}

Does anybody know why? Is this expected behavior? Can this be changed?

Dominik Schrempf  writes:


Hi,

I have the following document:

\begin{equation}
foobar
\end{equation}

I perform an HTML export.

The equation is not rendered with MathJax when using Org Mode 9.1.14
(Spacemacs).

The equation is correctly rendered with =emacs -Q=; then, Org Mode 9.1.9 is
used.

I am sure that Spacemacs sets other variables that may influence the HTML
export, but even then LaTeX export works perfectly when using dollar signs to
mark the equation.

Help much appreciated!

Thanks,
Dominik




[O] Latex export with \begin{equation}

2018-09-13 Thread Dominik Schrempf

Hi,

I have the following document:

\begin{equation}
foobar
\end{equation}

I perform an HTML export.

The equation is not rendered with MathJax when using Org Mode 9.1.14
(Spacemacs).

The equation is correctly rendered with =emacs -Q=; then, Org Mode 9.1.9 is 
used.


I am sure that Spacemacs sets other variables that may influence the HTML
export, but even then LaTeX export works perfectly when using dollar signs to
mark the equation.

Help much appreciated!

Thanks,
Dominik



[O] Org-capture, empty lines and date tree

2018-04-06 Thread Dominik Schrempf

Hi,

I am using date trees with org-capture with the =:empty-lines n= directive.
The list item of =org-capture-templates= looks similar to this one:

#+BEGIN_EXAMPLE
(list "j" "Journal" 'entry
 (list 'file+olp+datetree journal-file)
 "* %^{Entry}\n%?\n"
 :empty-lines 1)
#+END_EXAMPLE

Now, whenever a new day is inserted, for instance today,

: *** 2018-04-06 Friday

There is no empty line before that line but between this line and the actual
headline of the captured entry. So the complete captured entry looks like this:

: Some text in the file that was already present before the Org capture process.
: Bla.
: *** 2018-04-06 Friday
:
:  TODO The newly captured entry
:  Some text.

However, I think it should rather look like this:

: Some text in the file that was already present before the Org capture process.
: Bla.
:
: *** 2018-04-06 Friday
: (OPTIONAL EMPTY LINE HERE)
:  TODO The newly captured entry
:  Some text.

Only, if I enter another entry, the line should be left empty, like

: Some text in the file that was already present before the Org capture process.
: Bla.
:
: *** 2018-04-06 Friday
: (OPTIONAL EMPTY LINE HERE)
:  TODO The newly captured entry
:  Some text.
: (MANDATORY EMPTY LINE HERE)
:  TODO The new newly captured entry
:  Bla bla bla.

Please let me know what you think.

Dominik



[O] [Capture] Monthly/weekly date tree

2018-02-05 Thread Dominik Schrempf

Hello,

I am interested in a capture template that creates date trees collected into
months (or weeks as another possibility). The reason is that creating a headline
for each day (=file+old+datetree=) is too precise for my use cases and hides
information in unnecessarily deep headlines.

An example:

: * 2017
: ** 2017-11 November
: *** An interesting captured headline
: With some very interesting details.
: * 2018
: ** 2018-02 February
: *** Another headline which has been captured
: And so on.
: *** Another one
: --> The newly captured headline should be appended here

Is this feature already available or how could I imitate this feature? If not,
would you be positive towards a possible pull request from my side (would take
me a while because I am not a lisp expert)?

Thanks,
Dominik



[O] Org capture + datetree + language specification

2016-07-13 Thread Dominik Schrempf
Hello,

usually, my Org mode documents are in English.  However, now I need to
create an Org document in German.  I would like to use Org Capture, to
create a date tree in German (but only for this document).  Is there a
way to specify this?

Thank you,
Dominik



Re: [O] Bug: Error upon HTML export of LaTeX source code [8.3.4 (release_8.3.4-831-gbf93e1 @ /home/dominik/.emacs.d/org-mode/lisp/)]

2016-05-28 Thread Dominik Schrempf
Hello,

you are right.  I found the problem.  I had the following code in my
initialization file to treat latex beamer \frametitle commands as
sections.

(defun my-reftex-mode-hook ()
  "Tell reftex to treat \frametitle as section commands."
  (add-to-list 'reftex-section-levels
   '("frametitle" . 2))
  (reftex-reset-mode))
(add-hook 'reftex-mode-hook 'my-reftex-mode-hook)

It turned out that (reftex-reset-mode) broke org mode html export.  I
thought that this line was needed to make reftex aware of the newly
defined section labels but double checked now and it turns out that it
doesn't need the reset anyway.

Just so that you know the cause.

Thanks and best wishes,
Dominik



On Mon, May 23 2016, Nicolas Goaziou wrote:
> Hello,
>
> Dominik Schrempf <dominik.schre...@gmail.com> writes:
>
>> I try to export a fontified LaTeX source code listing with HTML export.
>> It boils down to an error that is thrown upon execution of the following
>> function during HTML export:
>>
>> (org-html-fontify-code "\\begin{tabular}{@{} l @{}}\n\\hline\nno
>> leading space\n\\hline\n\\end{tabular}\n" "latex")
>>
>> The debugging information is:
>> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>>   expand-file-name(nil)
>>   reftex-TeX-master-file()
>
> I cannot reproduce the error. 
>
> I do not use reftex. However I tried to 
>
>   (add-hook 'TeX-mode-hook #'turn-on-reftex)
>
> to no avail. This might be something in your config.
>
>
> Regards,



[O] Bug: Error upon HTML export of LaTeX source code [8.3.4 (release_8.3.4-831-gbf93e1 @ /home/dominik/.emacs.d/org-mode/lisp/)]

2016-05-21 Thread Dominik Schrempf
Hello,

I try to export a fontified LaTeX source code listing with HTML export.
It boils down to an error that is thrown upon execution of the following
function during HTML export:

(org-html-fontify-code "\\begin{tabular}{@{} l @{}}\n\\hline\nno leading 
space\n\\hline\n\\end{tabular}\n" "latex")

The debugging information is:
Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  expand-file-name(nil)
  reftex-TeX-master-file()
  reftex-reset-scanning-information()
  reftex-reset-mode()
  my-reftex-mode-hook()
  run-hooks(reftex-mode-hook)
  reftex-mode(t)
  turn-on-reftex()
  run-hooks(change-major-mode-after-body-hook text-mode-hook TeX-mode-hook 
LaTeX-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook text-mode-hook 
TeX-mode-hook LaTeX-mode-hook))
  TeX-run-mode-hooks(text-mode-hook TeX-mode-hook LaTeX-mode-hook)
  TeX-latex-mode()
  apply(TeX-latex-mode nil)
  latex-mode()
  org-html-fontify-code("\\begin{tabular}{@{} l @{}}\n\\hline\nno leading 
space\n\\hline\n\\end{tabular}\n" "latex")
  eval((org-html-fontify-code "\\begin{tabular}{@{} l @{}}\n\\hline\nno leading 
space\n\\hline\n\\end{tabular}\n" "latex") nil)
  eval-last-sexp-1(nil)
  eval-last-sexp(nil)
  call-interactively(eval-last-sexp nil nil)
  command-execute(eval-last-sexp)

All the best,
Dominik



Re: [O] Feature Request: Time Line in Lab Book

2016-04-05 Thread Dominik Schrempf
Hi John,

thanks for your long answer.  I could take out a lot of it.  I think I
did not describe my problem well although all of you seemed to guess it!
Just a short rephrase with vocabulary from your posts:

I want a logbook/journal where I always append text about new stuff to
the end.  Only, when I work on a task that has arisen before, I file
this text under this task.  This text should belong to the task only.
Text after the task should belong to the top level (but this is not
possible as you pointed out).

The thing is, I can't really do this with headings only, because I often
append text after a task in the same minute and it does not make sense
to create a new headline then.  I now use drawers to achieve this.  That
was not intuitive to me but it seems to work well!  I can now fold the
task-specific text under the tasks.  If I expand all text but the
drawers, I get the view that I wanted (at least within Emacs).

The setup would be perfect if I could file tasks without headlines, kind
of (is this clear?).  This may correspond to what you called "inline
tasks" (because I want my tasks to show up next to where I take my
notes).

E.g.:
--
Top level entries.  This is all very interesting (A).

** TODO A task bla bla.
   :DESCRIPTION:
   We have to do this, because...
   And then, ten days later we finished it using...
   :END:

This is the top level again and text here may be written directly after
I wrote (A) from above and filed the task.
--

Do I make myself clear now?

Thanks,
Dominik

On Thu, Mar 31 2016, John Hendy wrote:
> On Thu, Mar 31, 2016 at 3:12 AM, Dominik Schrempf
> <dominik.schre...@gmail.com> wrote:
>> Hello,
>>
>
> [snip]
>
>> A possible example:
>>
>> * February 2016
>> February 10th: Some text and stuff in February 2016.
>>
>> ** TODO A task to be done. Filed on February 10th.
>>E.g., February 24th: Some text that should belong to the task only.
>>I could not work on this task before February 18th.
>>
>> February 18th: Some more text belonging to February 2016 and not to the
>> task.
>>
>> * March 2016
>
> Like Eric, I'm a little confused of what you would want instead. The
> above is great for what currently happens, but could you do a similar
> example of what you want? You ask if this "feature" exists, but I'm
> not sure what it would be... all I can envision as a modification to
> above is:
>
> * Feb 2016
>
> Feb 10th: blah blah blah notes
>
> Feb 18th: blah blah notes
>
> ** TODO filed feb 10th, but *done* on 2/24
>
>> And so on.  Maybe this feature does already exist, but I am not aware of
>> it.  I know that especially upon export, this is hard to realize,
>> because all text always belongs to the previous headline.  But maybe it
>> is worth thinking about it because at least to me this would be highly
>> useful (e.g., having different styles in HTML export for the text under
>> the task and the text of the top level, the time line).
>
> I've wrestled with this a lot myself, at least if I put this in the
> bucket of "what's the *best* way to organize an org file." To expand
> on Nick's comments, something can only be in one hierarchy at a time,
> and everything afterward will live in that parent/child, unless you
> start a new sibling. The downside is you can't "escape" a current
> sub-heading to return to "just the parent heading" again. I've not
> quite wrestled with that, but moreso the desire to have one thing live
> in several places at the same time. I posted some structure questions
> when I migrated from TiddlyWiki in 2010; you could take a look at
> these threads if you're interested:
> - https://lists.gnu.org/archive/html/emacs-orgmode/2010-03/msg00390.html
> - http://lists.gnu.org/archive/html/emacs-orgmode/2011-07/msg01173.html
>
> If your example is accurate, why not make everything it's own
> headline? The notes from 2/18 wouldn't, then, "belong" to the todo
> filed on 2/10 and completed on 2/24. You'd just have:
>
> ** Feb 10
> blah blah
> ** TODO Feb 10 something
> Notes about task
> ** Feb 18
> blah blah
>
> It seems the core of your issue is not being certain on whether or not
> you want the TODO to be represented in the date tree according to
> creation or completion. That, or you don't like that you have to
> decouple the todo itself and your notes about it, which would lead to
> separate entries, one for the todo on 2/10 and one for the notes about
> what you did to complete it on 2/24. Are any of those accurate? I
> think clarification would be helpful if I've missed what you're
> wrestling with.
>
> I've taken to a pure datetree for 

Re: [O] Feature Request: Time Line in Lab Book

2016-03-31 Thread Dominik Schrempf
Hi Eric,

thanks for your answer.  I guess drawers in general are the solution to
my problems because then I can associate text to a specific headline.  I
introduced a DESCRIPTION drawer that includes the description of my
problem/task and I log the solution or outcome into the LOGBOOK drawer
when setting the state to DONE.  The drawer names are of course
arbitrary.  I also tried to use a single LOGBOOK drawer but Org mode
always adds notes at the top in the respective drawer.  I guess this is
fine in general but not expected behavior in this setting, that's why I
use two of them.

Thanks,
Dominik

On Thu, Mar 31 2016, Eric S Fraga wrote:
> Hi Dominik,
>
> it's not entirely clear what you want but I can suggest what I do.  I
> use the following capture rule to add entries to my journal (equivalent
> to your lab book):
>
> #+begin_src emacs-lisp
>   ("j" "journal" entry
>(file+datetree+prompt "~/s/notes/journal.org")
>"* %(format-time-string \"%H:%M\") %^{Entry} %^G\n%i%?")
> #+end_src 
>
> You could have two such capture rules, one for notes and one for TODO
> items.  To add notes to the TODO items, you could use the logging
> capability so that org prompts for a note every time a TODO item changes
> state.  Have a look at org-log-state-notes-into-drawer.



[O] Feature Request: Time Line in Lab Book

2016-03-31 Thread Dominik Schrempf
Hello,

I want to write a lab book with Org mode.  Thereby my workflow is as
follows: New stuff is appended to the bottom of the document (with time
stamps in chronological order).  Sometimes, especially when I discuss
something in a meeting, tasks pop up that can only be done later.  These
tasks are filed into TODO entries.  However, new stuff is being appended
to the end of the document before I can come back to getting these tasks
done.  When I work on a task, I document it below this task and do not
append it to the bottom of the document.  This new stuff should belong
to that task and not to the top level (i.e., the time line).  New stuff
belonging to the time line should belong to the top level and not to any
task above it.  I want to fold tasks together with text belonging to
them while the time line is still visible below them.  I am not sure if
I make myself clear.

A possible example:

* February 2016
February 10th: Some text and stuff in February 2016.

** TODO A task to be done. Filed on February 10th.
   E.g., February 24th: Some text that should belong to the task only.
   I could not work on this task before February 18th.
   
February 18th: Some more text belonging to February 2016 and not to the
task.

* March 2016

And so on.  Maybe this feature does already exist, but I am not aware of
it.  I know that especially upon export, this is hard to realize,
because all text always belongs to the previous headline.  But maybe it
is worth thinking about it because at least to me this would be highly
useful (e.g., having different styles in HTML export for the text under
the task and the text of the top level, the time line).

Thanks and best wishes,
Dominik



[O] Bug: Invalid search bound (wrong side of point) upon latex code execution [8.3.4 (release_8.3.4-607-gaa7815 @ /home/dominik/.emacs.d/org-mode/lisp/)]

2016-02-25 Thread Dominik Schrempf

Hello,

if I try to execute the following latex code block after a list item and
followed by two blank lines I get an error.  If I remove one blank line
the code executes fine.

--
- Very convenient for typesetting the integral variable =dx=:
  #+BEGIN_SRC latex :exports code :results html
\newcommand{\ud}{\,\mathrm{d}}
  #+END_SRC


--

The error message is:
Debugger entered--Lisp error: (error "Invalid search bound (wrong side of 
point)")
  re-search-forward("^[ 
]*#\\+RESULTS\\(?:\\[\\(?:\"<([0-9]{4}-[0-9]{2}-[0-9]{2}
 ?[^.\n>]*?)>\"\\)?\\([[:alnum:]]+\\)\\]\\)?:[  ]*$" 387 t)
  
byte-code("\212\214~\210\306!\211.\307>\203Z.\310\311\310\312\"\".\310\313\"b\210\314\nw\210\315\316`\nW\205T.\317
 
.\306!\320=\205S.\310\321\"\322\230\205S.\f\204D.`\202S.`\310\313\"b\210\323\324x\210`|\210`)\"\210)\202\335.

\325>\203\330.\310\326\"\211.\205l.\327.!\211.%\206v.\310\313\"b\210.%\203\222.\330.&!\203\212.\331.&\"\210\315\316`\"\210\202\324.
\204\324.m\204\324.\332 .'\212\310\333.'\"b\210\334 
).(.)\335P.*\336.+\337.*.(\336#,\203\324.\340 
\210\330.&!\203\317.\331\324.&\"\210\315\316`\"\210*\202\335.\315\316\324\"\210+\f\205.\212\310\313\"d^b\210\314\324x\210\324y\210n\204\374.\341c\210\202.m\204

.\310\342\"\343U\203.\344c\210\202.\324y\210\331\310\326\".&\"\210`)\207" 
[context val limit result insert name org-element-type (inline-babel-call 
inline-src-block) org-element-property :contents-end :parent :end " \n" 
throw :found org-element-context macro :key "results" " " nil (babel-call 
src-block) :name org-babel-find-named-result org-babel--clear-results-maybe 
org-babel--insert-results-keyword org-element-at-point :post-affiliated 
line-end-position "$" t re-search-forward beginning-of-line "\n\n" :post-blank 
0 "\n" named-results hash next end org-babel-result-regexp empty-result-re 
case-fold-search] 7)
  org-babel-where-is-src-block-result(nil ("latex" 
"\\newcommand{\\ud}{\\,\\mathrm{d}}" ((:comments . "") (:shebang . "") (:cache 
. "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") 
(:results . "html replace") (:hlines . "no") (:session . "none")) "" nil 388))
  org-babel-remove-result(("latex" "\\newcommand{\\ud}{\\,\\mathrm{d}}" 
((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . 
"no") (:tangle . "no") (:exports . "code") (:results . "html replace") (:hlines 
. "no") (:session . "none")) "" nil 388))
  #[nil "\302=\203 .\303 \207\304  !\207" [type info inline 
org-babel-remove-inline-result org-babel-remove-result] 2]()
  org-babel-exp-do-export(("latex" "\\newcommand{\\ud}{\\,\\mathrm{d}}" 
((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . 
"no") (:tangle . "no") (:exports . "code") (:results . "html replace") (:hlines 
. "no") (:session . "none")) "" nil 388) block nil)
  org-babel-exp-src-block(("latex" ":exports" "code" ":results" "html"))
  org-babel-exp-process-buffer(#<2>>)
  org-export-execute-babel-code()
  org-export-as(html nil nil nil (:output-file "./programming.html"))
  org-export-to-file(html "./programming.html" nil nil nil nil nil)
  org-html-export-to-html(nil nil nil nil)
  org-export-dispatch(nil)
  call-interactively(org-export-dispatch nil nil)
  command-execute(org-export-dispatch)

Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.6)
 of 2015-09-10 on foutrelis
Package: Org-mode version 8.3.4 (release_8.3.4-607-gaa7815 @ 
/home/dominik/.emacs.d/org-mode/lisp/)

Thanks,
Dominik



Re: [O] Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)]

2015-12-11 Thread Dominik Schrempf
Hi Rasmus,

thanks for your answer.  I asked the people from MathJax and the problem
is HTML related. 

[O] Bug: LaTeX in HTML export [8.3.2 (release_8.3.2-380-g64aee4 @ /home/dominik/.emacs.d/org-mode/lisp/)]

2015-12-11 Thread Dominik Schrempf
Hello,

I am trying to export a LaTeX code block into HTML and have a problem
when using lower (<) signs (maybe it also happens with greater signs but
I did not check that).

E.g., the following Org code leads to an error when viewing the HTML
file because the '<' sign is interpreted in a wrong way (I don't know
how but it seems to be interpreted as part of a tag) and MathJax does
not succeed then.

Org code:
#+BEGIN_SRC latex :results html
  \begin{equation}
\text{if } 0

[O] Bug: Org timeline does not work [8.3beta (release_8.3beta-1229-ge900eb @ /home/dominik/.emacs.d/org-mode/lisp/)]

Hello,

if I want to create a timeline of an arbritrary org file, I get the
following error:

Symbol's function is void: org-timeline

Best wishes,
Dominik

Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
 of 2015-04-20 on bitzer.hoetzel.info
Package: Org-mode version 8.3beta (release_8.3beta-1229-ge900eb @
/home/dominik/.emacs.d/org-mode/lisp/)


[O] Exporting selected tasks (maybe from agenda view) including their body.


Is there a possibility to export tasks including their body (text,
maybe logbook etc.) from the agenda view?

What I would like to do is the following: I have Tasks with a certain
todo state (e.g. WAITING). I can view all these tasks in an agenda
view. Now I need to leave my computer and want to print out every task
showing up in the agenda view (e.g. every task with a WAITING todo
state) including the bodies of the tasks (the whole text that shows up
in the org file, maybe without logbook drawers). It should work like
exporting to HTML (because the latex formulas should be compiled) but
picking only some tasks of multiple org files. Does such an export
function exist? If not, how could I achieve this?

Thanks,
Dominik