Re: [O] no beamer export?
> "LF" == Luca Ferrariwrites: LF> Hi all, LF> I'm running emacs 25.1.2 and I've no beamer export in the C-c C-e. LF> I've tried to include the directives: LF> #+LaTeX_CLASS: beamer LF> #+LaTeX_CLASS_OPTIONS: [presentation,smaller] LF> #+BEAMER_THEME: default LF> and then do a latex ordinary export (C-c C-e l p) but I got 'Unknow LF> latex beamer class'. LF> Am I missing something? Yes. Either use `org-beamer-mode' or use #+STARTUP: beamer in your org file. Regards, Sebastian -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] Emacs hangs sometimes for no reason
> "SL" == Samuel Lourywrites: SL> For what it's worth, when this happens, I generally pkill SL> -SIGUSR2 emacs. emacs reacts to the USR2 signal by stopping SL> everything and start a lisp debugging session. From there, I SL> reset all the org caches with this command: SL> (defun konix/org-element-cache-reset-all () SL> (interactive) SL> (mapc SL> (lambda (file) SL> (save-window-excursion SL> (save-excursion SL> (find-file file) SL> (org-element-cache-reset SL> (org-agenda-files))) Thanks for this snippet. I know it's a little bit early but setting `org-element-use-cache' seems to do the trick for me. SL> Finally, I quit the debugging session and reset the debug on SL> quit with (toggle-debug-on-quit) and everything comes back to SL> normal. So, aren't you restarting Emacs after pkill -SIGUSR2 emacs? Regards, Sebastian -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] Emacs hangs sometimes for no reason
> "NG" == Nicolas Goaziouwrites: NG> You could try to set `org-element-use-cache' to nil and see if NG> the hangs disappear. I'll try this. Thank you very much. /src -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] Emacs hangs sometimes for no reason
> "SW" == Samuel Waleswrites: SW> fwiw, i have had the element cache turned off since org 8 SW> because of intermittent bugs. i tried it on in org 9 maint SW> recently and it caused similar problems. so you might be SW> experiencing same. SW> funnily enough, it doesn't seem to make any difference to agenda SW> creation speed, which is my bottleneck. Nicolas Goaziou suggested the same thing. I'll try this an report back. Thanks. /src -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
[O] Emacs hangs sometimes for no reason
Hi list, in the last couple weeks (perhaps months?) Emacs hangs for no specific reason for me. The single constant is, that when it hangs, it hangs while I'm in org-mode. This occurs on multiple circumstance as - changing the outline structure by demoting and promoting headline - when refiling - re-schedule in agenda - yanking - perhaps more The strange thing is that it happens unpredictably, e.g. I re-schedule 11 items without problems and the 12th one lets Emacs crash. Sometimes it works for days without problems and then I promote a headline and Emacs crashes. Very sad :( When I kill Emacs with $ pkill -SIGUSR2 Emacs this leaves me in the Emacs debugger in a flyspell function or (today) in a avl-tree function. My actual question is, had someone had similar issues? Or is it just me with my configuration? Perhaps someone can guide me on how I can find the root cause for this? I pretty much lost here. Thanks in advance for any hints. Best, Sebastian -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] writing letters using the latex letters class?
On 2016-12-08 11:40, Stig Brautasetwrote: > It looks promising but I can't get it to work as I expect; is it > perhaps > not fully compatible with Org 9? No. It's working fine with Org 9. > After following the instructions on that page to the best of my > abilities, and using their example document, my output contains lots > of stuff that I expect to be hidden. (E.g. all the to/from special > headings etc). You need to load `ox-koma-letter' and make sure you're not using the latex exporter. For letters there is (after loading `ox-koma-letter' of course) a separate koma exporter. Best, Sebastian -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] writing letters using the latex letters class?
On 2016-12-08 0:46, Stig Brautasetwrote: > That at least got me past the "Unknow LaTeX class 'letter'" error, but > it > doesn't produce a nice letter. I only get my lorem ipsum text. I can't > figure > out how to get the \begin{letter}{...} stuff inside the > \begin{document} part > automatically, nor how to inject text from #+recipient: into the > second block > of the \begin{letter}{...} macro. I can't actually help in using the letter class, but have you checked "Creating letters with KOMA-Script scrlttr2 and Org-mode" [1]? I've been using it excursively for all my /formal/ letter writing and it works great. Maybe you can give that a try? Plus it produces really nice letters :) Best, Sebastian [1] http://orgmode.org/worg/exporters/koma-letter-export.html -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] Any help on that bug?
On 2016-10-13 21:6, Pierre-Henry Frohringwrote: > > Hi list! > Made a few lines of elisp that take one org-file and turns it into a static > website. > https://github.com/phfrohring/org-to-blog > > Since it is useful to me, I tried to share it. Someone tried, but some bug > occurred: > https://github.com/phfrohring/org-to-blog/issues/1 > > I cannot reproduce the bug... it's working on my machine. > > Can anyone help? > Thx! > Actually, I'm quite surprised that is working for you. According to the file variables you enable lexical bindings. This prevents the recursive call to "find_duplicates". This symbol isn't visible in the lambda. Can you double check that `lexical-binding' is really non-nil? Best, Sebastian P.S.: Do you know about `flet' and `labels'? -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] Name of code pieces when exported to PDF
On 2016-09-26 17:32, Nick Dokoswrote: >> #+caption: MainClass >> #+name: MainClass >> >> #+begin_src ... > That seems indeed to be necessary (at least in a few experiments that > I've run), but it's less than ideal (duplication of information). In this peculiar case, yes. But, at least for me, I use each for a different purpose that doesn't duplicate the information. I'm using org-ref for references and most of the time a more meaningful caption. For example: #+caption: A class with a main method #+name: lst-main #+begin_src java Regards, Sebastian -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] Name of code pieces when exported to PDF
On 2016-09-26 18:48, claude fuhrerwrote: > \lstset{language=java,label=secondBlock,caption= ,captionpos=b,numbers=none} > \begin{lstlisting} > . > \end{lstlisting} > > But I wanted to have the "caption" filled with the same value as the > label. Is it possible ? > Yes, use caption! #+caption: MainClass #+name: MainClass #+begin_src ... Regards, Sebastian -- Sebastian (Rudolfo) Christ http://rudolfochrist.github.io GPG Fingerprint: 306D 8FD3 DFB6 4E44 5061 CE71 6407 D6F8 2AC5 55DD
Re: [O] blog refurbised: how is it in 2015 ?
Hi Xavier, I'm using org-page (https://github.com/kelvinh/org-page) and I'm quite happy with it. Best, Sebastian
Re: [O] [PATCH] ox-extra.el: Fix filtering of latex header blocks
BUMP ??? Best wishes, Sebastian
Re: [O] Org Mode and PDF Notes!
> On Wed, 11 Nov 2015 15:48:15 -0500, Kaushal Modi> said: > May be you can work with the interleave.el dev to add in your ideas > and code. I had worked with him to make interleave support pdf-tools > and it was a pleasure to work with him. You're so kind! It was also a pleasure for me. Best, Sebastian
Re: [O] Org Mode and PDF Notes!
> On Wed, 11 Nov 2015 15:58:24 -0500, Matt Pricesaid: > I meant INTERLEAVE_PDF. I just opened an issue: > https://github.com/rudolfochrist/interleave/issues/13 so who knows, > maybe... Sound like a good idea. I'm currently a little short on time,but perhaps I can look into that this weekend. -Sebastian
Re: [O] [PATCH] ox-extra.el: Fix filtering of latex header blocks
Hi Aaron, thanks for the tip with (org-element-property :value X). I also got rid of the let*. Actually, the previous patch is buggy and I've thought had submitted another patch to fix that. But unfortunately it seems it got lost in the interwebs. Best wishes, Sebastian >From a814380158de6185747975848533e3bd6e675afd Mon Sep 17 00:00:00 2001 From: Sebastian Christ <rudolfo.chr...@gmail.com> Date: Thu, 12 Nov 2015 19:23:05 +0100 Subject: [PATCH] ox-extra.el: Fix filtering of latex header blocks * contrib/lisp/ox-extra.el (org-latex-header-blocks-filter): Use `org-element' API to find beginning, end and contents of latex header blocks. `org-latex-header-blocks-filter' still called `org-edit-src-find-region-and-lang' and raised an undefined function error because the funtion was removed from org-mode. This is fixed by determining the begin and end of the latex block via `org-element'. --- contrib/lisp/ox-extra.el | 29 - 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/contrib/lisp/ox-extra.el b/contrib/lisp/ox-extra.el index e6d45cc..232f623 100644 --- a/contrib/lisp/ox-extra.el +++ b/contrib/lisp/ox-extra.el @@ -60,7 +60,7 @@ (defun org-latex-header-blocks-filter (backend) (when (org-export-derived-backend-p backend 'latex) -(let ((positions +(let ((blocks (org-element-map (org-element-parse-buffer 'greater-element nil) 'export-block (lambda (block) (when (and (string= (org-element-property :type block) "LATEX") @@ -69,23 +69,18 @@ "yes")) (list (org-element-property :begin block) (org-element-property :end block) - (org-element-property :post-affiliated block))) - (mapc (lambda (pos) - (goto-char (nth 2 pos)) - (destructuring-bind - (beg end ignore) - (org-edit-src-find-region-and-lang) - (let ((contents-lines (split-string - (buffer-substring-no-properties beg end) - "\n"))) - (delete-region (nth 0 pos) (nth 1 pos)) - (dolist (line contents-lines) - (insert (concat "#+latex_header: " -(replace-regexp-in-string "\\` *" "" line) -"\n")) - ;; go in reverse, to avoid wrecking the numeric positions + (org-element-property :value block))) + (mapc (lambda (block) + (goto-char (nth 0 block)) + (let ((contents-lines (split-string (nth 2 block) "\n" t))) +(delete-region (nth 0 block) (nth 1 block)) +(dolist (line contents-lines) + (insert (concat "#+latex_header: " + (replace-regexp-in-string "\\` *" "" line) + "\n") + ;; go in reverse, to avoid wrecking the numeric blocks ;; earlier in the file - (reverse positions) + (reverse blocks) ;; During export headlines which have the "ignore" tag are removed -- 2.6.3
Re: [O] [PATCH] ox-extra.el: Fix filtering of latex header blocks
Hi Kyle, you're completely right. This is a bug in the provided patch. I've thought I had submitted another patch to fix that, but it seems that it got lost somewhere on the interwebs. It took some time until I've realized this. I've submitted an new patch already. Thanks. -Sebastian
Re: [O] [PATCH] ox-extra.el: Fix filtering of latex header blocks
> On Mon, 09 Nov 2015 01:30:23 -0500, Kyle Meyersaid: >> * ox-extra.el (org-latex-header-blocks-filter): Use `org-element' API to >> find begin and end of latex header blocks. Kyle> Kyle> s|ox-extra.el|contrib/lisp/ox-extra.el| Kyle> s/begin/beginning/ Kyle> Thanks. I'll change that. >> (mapc (lambda (pos) >> -(goto-char (nth 2 pos)) >> -(destructuring-bind >> -(beg end ignore) >> -(org-edit-src-find-region-and-lang) >> - (let ((contents-lines (split-string >> - (buffer-substring-no-properties beg end) >> - "\n"))) >> -(delete-region (nth 0 pos) (nth 1 pos)) >> -(dolist (line contents-lines) >> - (insert (concat "#+latex_header: " >> - (replace-regexp-in-string "\\` *" "" line) >> - "\n")) >> + (let* ((beg (third pos)) >> + (end (second pos)) >> + (post-affiliated (first pos)) Kyle> Kyle> Hmm, the pos items are constructed as Kyle> Kyle> (list (org-element-property :begin block) Kyle> (org-element-property :end block) Kyle> (org-element-property :post-affiliated block))) Kyle> Kyle> so shouldn't beg be the first element and post-affiliated the third? I thought it would be better to change as little as possible. Rearranging the list is obviously the cleaner solution. I'll change that. Thanks for the review. -Sebastian
Re: [O] Format of links in PDF beamer export
Hi Loris, I put #+LATEX_HEADER: \hypersetup{colorlinks=true} in my org files and let hyperref do the styling. -- Sebastian > On Tue, 20 Oct 2015 15:01:57 +0200, "Loris Bennett" >said: > > Hi, > How can I control the appearance of link in a PDF beamer presentation. > > I'm using the default beamer style with the following > > [[http://www.dfg.de/foerderung/programme/infrastruktur/wgi/forschungsgrossgeraete/index.html][Übersicht]] > > which works, but it is not visually obvious in the PDF that "Übersicht" > is a link, unless I move the mouse over it. > > Cheers, > > Loris > > -- > This signature is currently under construction. > > >
Re: [O] [PATCH] ox-extra.el: Fix filtering of latex header blocks
And of course, the previous patch contains a bug. I should have tested it with multiple latex header blocks. Sorry for the inconvenience. The attached patch should (hopefully) fix that. Best wishes, Sebastian >From d9890ab84c92ec60e76913d2a1b3967353819500 Mon Sep 17 00:00:00 2001 From: Sebastian Christ <rudolfo.chr...@gmail.com> Date: Fri, 9 Oct 2015 17:37:39 +0200 Subject: [PATCH] ox-extra.el: Fix filtering of latex header blocks * ox-extra.el (org-latex-header-blocks-filter): Use `org-element' API to find begin and end of latex header blocks. `org-latex-header-blocks-filter' still called `org-edit-src-find-region-and-lang' and raised an undefined function error because the funtion was removed from org-mode. This is fixed by determining the begin and end of the latex block via `org-element'. --- contrib/lisp/ox-extra.el | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/contrib/lisp/ox-extra.el b/contrib/lisp/ox-extra.el index e6d45cc..669d54f 100644 --- a/contrib/lisp/ox-extra.el +++ b/contrib/lisp/ox-extra.el @@ -71,18 +71,24 @@ (org-element-property :end block) (org-element-property :post-affiliated block))) (mapc (lambda (pos) - (goto-char (nth 2 pos)) - (destructuring-bind - (beg end ignore) - (org-edit-src-find-region-and-lang) - (let ((contents-lines (split-string - (buffer-substring-no-properties beg end) - "\n"))) - (delete-region (nth 0 pos) (nth 1 pos)) - (dolist (line contents-lines) - (insert (concat "#+latex_header: " -(replace-regexp-in-string "\\` *" "" line) -"\n")) + (let* ((beg (first pos)) + (end (second pos)) + (post-affiliated (third pos)) + (contents-lines (split-string + (buffer-substring-no-properties beg + end) + "\n"))) +(goto-char post-affiliated) +(delete-region beg end) +(dolist (line (remove-if (lambda (line) + (or +(string-prefix-p "#+HEADER:" line) +(string-prefix-p "#+BEGIN_LaTeX" line) +(string-prefix-p "#+END_LaTeX" line))) + contents-lines)) + (insert (concat "#+latex_header: " + (replace-regexp-in-string "\\` *" "" line) + "\n") ;; go in reverse, to avoid wrecking the numeric positions ;; earlier in the file (reverse positions) -- 2.6.1
[O] [PATCH] ox-extra.el: Fix filtering of latex header blocks
Hi group, I'd like to provide a patch to ox-extra.el. `org-latex-header-blocks-filter' still calls `org-edit-src-find-region-and-lang' and raises therefore an undefined function error. Best wishes, Sebastian >From 34b76e06bda5739e433c95b451915c8b804a1733 Mon Sep 17 00:00:00 2001 From: Sebastian Christ <rudolfo.chr...@gmail.com> Date: Fri, 9 Oct 2015 17:37:39 +0200 Subject: [PATCH] ox-extra.el: Fix filtering of latex header blocks * ox-extra.el (org-latex-header-blocks-filter): Use `org-element' API to find begin and end of latex header blocks. `org-latex-header-blocks-filter' still called `org-edit-src-find-region-and-lang' and raised an undefined function error because the funtion was removed from org-mode. This is fixed by determining the begin and end of the latex block via `org-element'. --- contrib/lisp/ox-extra.el | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/contrib/lisp/ox-extra.el b/contrib/lisp/ox-extra.el index e6d45cc..bb838fc 100644 --- a/contrib/lisp/ox-extra.el +++ b/contrib/lisp/ox-extra.el @@ -71,18 +71,22 @@ (org-element-property :end block) (org-element-property :post-affiliated block))) (mapc (lambda (pos) - (goto-char (nth 2 pos)) - (destructuring-bind - (beg end ignore) - (org-edit-src-find-region-and-lang) - (let ((contents-lines (split-string - (buffer-substring-no-properties beg end) - "\n"))) - (delete-region (nth 0 pos) (nth 1 pos)) - (dolist (line contents-lines) - (insert (concat "#+latex_header: " -(replace-regexp-in-string "\\` *" "" line) -"\n")) + (let* ((beg (third pos)) + (end (second pos)) + (post-affiliated (first pos)) + (contents-lines + (cdr (butlast +(split-string + (buffer-substring-no-properties post-affiliated + end) + "\n") +2 +(goto-char beg) +(delete-region beg end) +(dolist (line contents-lines) + (insert (concat "#+latex_header: " + (replace-regexp-in-string "\\` *" "" line) + "\n") ;; go in reverse, to avoid wrecking the numeric positions ;; earlier in the file (reverse positions) -- 2.6.1