Re: [O] Org-mode and koma-script
Thank you very much for that very complete answer and advice. This will allow me to learn better how to use emacs (and org-mode). Frédéric Le 29/08/2018 à 00:38, Tim Cross a écrit : Just a few comments. While none will solve your immediate issue, they may help track it down. - it looks like your running as root! This is a very bad idea, especially if your inexperienced and still trying to work things out. Highly recommend you create a normal account (possibly with appropriate permissions to run sudo and perform administration tasks). - Those lines look like your system is installing quite a few ELPA packages - this normally only happens once or after you do an upgrade of the elpa packages. Most of those packages are not standard parts of Emacs and while very useful, can severely complicate working out problems. Installing lots of them at once also makes configuration much harder. Given you appear to only have limited Emacs experience, I would highly recommend avoiding the temptation to install lots of interesting packages all at once. A far better approach is to get to know basic Emacs and then, as you gain familiarity, look at what packages are available and then install and try out ones which look like they might actually be useful. At the moment, you have lots of packages which I suspect your not even using or know about. My recommendation would be to start again. Create a user account and just run emacs without installing any packages. Focus on configuring basic Emacs (which comes with org 'built-in'). Ensure you are using a current version of Emacs (preferably Emacs 26.1 or Emacs 25.3). Get basic Org working - don't worry about Korma Script initially, just use basic Latex and verify that is all working first). Once the basics are all working, then start tweaking to suit your needs, but do it incrementally. Another popular alternative, but not one I recommend, is to use one of the pre-defined Emacs setups, such as spacemacs, prelude, Purcell's .emacs etc. This will get you up and runining with an emacs config defined by someone else and force you to work following their workflows, but it is quick. Problem is, when you run into problems, you will be lost and need others to help you out rather than being able to help yourself.
Re: [O] Org-mode and koma-script
Just a few comments. While none will solve your immediate issue, they may help track it down. - it looks like your running as root! This is a very bad idea, especially if your inexperienced and still trying to work things out. Highly recommend you create a normal account (possibly with appropriate permissions to run sudo and perform administration tasks). - Those lines look like your system is installing quite a few ELPA packages - this normally only happens once or after you do an upgrade of the elpa packages. Most of those packages are not standard parts of Emacs and while very useful, can severely complicate working out problems. Installing lots of them at once also makes configuration much harder. Given you appear to only have limited Emacs experience, I would highly recommend avoiding the temptation to install lots of interesting packages all at once. A far better approach is to get to know basic Emacs and then, as you gain familiarity, look at what packages are available and then install and try out ones which look like they might actually be useful. At the moment, you have lots of packages which I suspect your not even using or know about. My recommendation would be to start again. Create a user account and just run emacs without installing any packages. Focus on configuring basic Emacs (which comes with org 'built-in'). Ensure you are using a current version of Emacs (preferably Emacs 26.1 or Emacs 25.3). Get basic Org working - don't worry about Korma Script initially, just use basic Latex and verify that is all working first). Once the basics are all working, then start tweaking to suit your needs, but do it incrementally. Another popular alternative, but not one I recommend, is to use one of the pre-defined Emacs setups, such as spacemacs, prelude, Purcell's .emacs etc. This will get you up and runining with an emacs config defined by someone else and force you to work following their workflows, but it is quick. Problem is, when you run into problems, you will be lost and need others to help you out rather than being able to help yourself. HTH Tim gmx writes: > Le 28/08/2018 à 18:04, Tim Cross a écrit: >> Sorry, I was in a rush before work and sent you the wrong command! > No problem. Thank you for giving me your time. >> >> What you need to do is run emacs --debug-init rather than emacs -q. > > Well. And the answer is... too long (many, many lines) : are ready to > read it (please take a look down) ? > > >> >> Your emacs init is either in the file .emacs in your home directory or >> the file init.el in the .emacs.d directory (assuming your not using >> something like spacemacs or some other 'canned' setup, which may break >> out the config into other files). > I work with Debian 9. >> >> The code you posted i.e. > > > Leaving directory ‘/root/.emacs.d/elpa/avy-20180814.2121’ > > Compiling file /root/.emacs.d/elpa/avy-20180814.2121/avy.el at Tue Aug > 28 20:00:34 2018 > Entering directory ‘/root/.emacs.d/elpa/avy-20180814.2121/’ > > Compiling no file at Tue Aug 28 20:00:35 2018 > Leaving directory ‘/root/.emacs.d/elpa/ace-window-20180814.1516’ > > Compiling file > /root/.emacs.d/elpa/ace-window-20180814.1516/ace-window.el at Tue Aug 28 > 20:00:35 2018 > Entering directory ‘/root/.emacs.d/elpa/ace-window-20180814.1516/’ > > Compiling no file at Tue Aug 28 20:00:36 2018 > Leaving directory ‘/root/.emacs.d/elpa/anzu-20161017.1607’ > > Compiling file /root/.emacs.d/elpa/anzu-20161017.1607/anzu.el at Tue Aug > 28 20:00:36 2018 > Entering directory ‘/root/.emacs.d/elpa/anzu-20161017.1607/’ > > Compiling no file at Tue Aug 28 20:00:37 2018 > Leaving directory ‘/root/.emacs.d/elpa/seq-2.20’ > > Compiling file /root/.emacs.d/elpa/seq-2.20/seq-24.el at Tue Aug 28 > 20:00:37 2018 > Entering directory ‘/root/.emacs.d/elpa/seq-2.20/’ > > Compiling file /root/.emacs.d/elpa/seq-2.20/seq-25.el at Tue Aug 28 > 20:00:37 2018 > > Compiling file /root/.emacs.d/elpa/seq-2.20/seq-pkg.el at Tue Aug 28 > 20:00:37 2018 > > Compiling file /root/.emacs.d/elpa/seq-2.20/seq.el at Tue Aug 28 > 20:00:37 2018 > Leaving directory ‘/root/.emacs.d/elpa/seq-2.20/’ > > Compiling file /root/.emacs.d/elpa/seq-2.20/tests/seq-tests.el at Tue > Aug 28 20:00:37 2018 > Entering directory ‘/root/.emacs.d/elpa/seq-2.20/tests/’ > > Compiling no file at Tue Aug 28 20:00:39 2018 > Leaving directory ‘/root/.emacs.d/elpa/beacon-20180706.1725’ > > Compiling file /root/.emacs.d/elpa/beacon-20180706.1725/beacon.el at Tue > Aug 28 20:00:39 2018 > Entering directory ‘/root/.emacs.d/elpa/beacon-20180706.1725/’ > > Compiling no file at Tue Aug 28 20:00:40 2018 > Leaving directory ‘/root/.emacs.d/elpa/browse-kill-ring-20171219.1908’ > > Compiling file > /root/.emacs.d/elpa/browse-kill-ring-20171219.1908/browse-kill-ring.el > at Tue Aug 28 20:00:40 2018 > Entering directory ‘/root/.emacs.d/elpa/browse-kill-ring-20171219.1908/’ > > Compiling no file at Tue Aug 28 20:00:41 2018 > Leaving directory
Re: [O] org babel R source blocks :results output with :session includes extra blank lines
Thank you and my apologies. Seeing the session output you posted convinced me the problem was with my ess settings. Of course I should have known that because I could find no-one else with the same problem and I could see no change to ob-R.el in the git repo in the past months that could have affected this. The problem turned out to be the ess variable ess-eval-visibly. The default, nil works fine with ob-R (doc: "If nil, ESS doesn’t print input commands and doesn’t wait for the process."). I had accidentally set to 'nowait (doc: If ’nowait, ESS still shows the input commands, but don’t wait for the process.). My apologies for the spurious post. I had not realized that I was setting that ess variable. Sincerely, Dylan On 08/28/2018 11:57 AM, Berry, Charles wrote: > Cannot confirm. See inline. > >> On Aug 28, 2018, at 7:48 AM, Dylan Schwilk wrote: >> >> Hello, >> >> I recently have run into a change in output from my R language source code >> blocks. >> >> I have found that when I include :session to the source block header, I now >> get >> extra blank lines in the #+results. This has broken my lecture slides for my >> courses with too much extra blank space. >> >> for example: >> >> #+begin_src R :results output :exports both :session >> 1 + 2 >> 3 + 4 >> print("the end") >> #+end_src >> >> #+results: >> : [1] 3 >> : >> : [1] 7 >> : >> : [1] "the end" >> > > With the :session arg I get the output as you show it below. > > This was with master on commit f79545 from last month and on today's master > (commit 38a8901). > >> >> I do not have this issue when I omit the :session header argument, eg: >> >> #+begin_src R :results output :exports both >> 1 + 2 >> 3 + 4 >> print("the end") >> #+end_src >> >> #+results: >> : [1] 3 >> : [1] 7 >> : [1] "the end" >> >> > > > FWIW, my R session looks like this > > > --8<---cut here---start->8--- > [...] > Type 'demo()' for some demos, 'help()' for on-line help, or > 'help.start()' for an HTML browser interface to help. > Type 'q()' to quit R. > >> setwd('/Users/cberry/') >> 1 + 2 > 3 + 4 > print("the end") > 'org_babel_R_eoe' > [1] 3 >> [1] 7 >> > [1] "the end" >> [1] "org_babel_R_eoe" > --8<---cut here---end--->8--- > > If this is what your session looks like, then we need to dig deeper into ob-R. > > HTH, > > Chuck > > > >
Re: [O] Org-mode and koma-script
Oh, oh. I've opening a new emacs file, and this message waits me : Warning (initialization): An error occurred while loading ‘/home/frederic/.emacs’: Symbol's value as variable is void: + To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the ‘--debug-init’ option to view a complete error backtrace. Well. I deleted this +, and... Everything's working perfectly! That stupid + blocked everything. I'm sorry I didn't see it. Thank you again, Tim, for your patience in answering me. Problem solved (shame on me...). Frédéric Le 28/08/2018 à 18:04, Tim Cross a écrit : Sorry, I was in a rush before work and sent you the wrong command! What you need to do is run emacs --debug-init rather than emacs -q. Your emacs init is either in the file .emacs in your home directory or the file init.el in the .emacs.d directory (assuming your not using something like spacemacs or some other 'canned' setup, which may break out the config into other files). The code you posted i.e. ; CONFIGURATION POUR UTILISER LATEX ;; ;; Source : https://orgmode.org/worg/org-tutorials/org-latex-export.html ;; Pour pouvoir utiliser LaTeX dans un doc. org-mode (require 'ox-latex) (unless (boundp 'org-latex-classes) (setq org-latex-classes nil)) + (add-to-list 'org-latex-classes '("article" "\\documentclass{article}" ("\\section{%s}" . "\\section*{%s}"))) ;; Pour configurer les subdivisions des articles (add-to-list 'org-latex-classes '("article" "\\documentclass{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) ;; Pour configurer les subdivisions de la classe book (indiquer : #+LaTeX_CLASS: book) (with-eval-after-load "ox-latex" (add-to-list 'org-latex-classes '("book" "\\documentclass{book}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}" ;; Pour utiliser la classe koma-script. Indiquer : #+LaTeX_CLASS: koma-article (with-eval-after-load "ox-latex" (add-to-list 'org-latex-classes '("koma-article" "\\documentclass{scrartcl}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}" doesn't look quite right. It should be in your init file i.e. .emacs or .emacs.d/init.el and it needs to be correctly formed elisp statements, The --debug-init will check this. Looking at it, you seem to have a spurious '+' character, but there may be other problems as well. There is a customize interface you can use to add the korma classes, which may be easier than writing elisp if your not familiar with that. Do M-x customize-group org and have a look around. What I use in my init is (setq org-latex-classes '(("beamer" "\\documentclass[presentation]{beamer}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("hitec-article" "\\documentclass[12pt]{hitec} [DEFAULT-PACKAGES] [PACKAGES] [NO-EXTRA] \\settextfraction{0.95}\n" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("korma-article" "\\documentclass[11pt]{scrartcl}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("korma-report" "\\documentclass[11pt]{scrreport}" ("\\part{%s}" . "\\part*{%s}")
Re: [O] Org-mode and koma-script
gmx writes: > Hello, > > I'm trying to use the koma class. I found a configuration of the.emacs > file, in the manual and in a Stack Exchange post > (https://tex.stackexchange.com/questions/364914/using-koma-script-article-with-org-mode). > > > > I open a new .org file, and I declare: > > #+TITLE: MyTitle > #+DATE: date > > #+LANGUAGE: fr > #+LaTeX_CLASS: koma-article > > When I want to export my work in .pdf, I get the following answer: > Unknown LaTeX class 'koma-article'. > > What to do? Most likely, you have an error in your .emacs file. You can check that by seeing whether you successfully modified the org-latex-classes variable: M-x v org-latex-classes RET Chances are that it does not contain an entry for `koma-article', because your .emacs was not read completely: emacs encountered an error while processing it and gave up on processing the rest of it. -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
Re: [O] Org-mode and koma-script
Tim Cross writes: > If that is a copy of what is in your .emacs or init.el file, then I > think you have a number of errors. Try running emacs -q and see if emacs > reports errors in your init file. > Did you mean `emacs --debug-init'? `emacs -q' will skip the user file. > Tim > > gmx writes: > >> I forgot the >> >> Le 27/08/2018 à 21:51, gmx a écrit: >>> Hello, >>> >>> I'm trying to use the koma class. I found a configuration of the.emacs >>> file, in the manual and in a Stack Exchange post >>> (https://tex.stackexchange.com/questions/364914/using-koma-script-article-with-org-mode). >>> >>> >>> >>> I open a new .org file, and I declare: >>> #+TITLE: MyTitle >>> #+DATE: date >>> #+LANGUAGE: fr >>> #+LaTeX_CLASS: koma-article >>> >>> When I want to export my work in .pdf, I get the following answer: >>> Unknown LaTeX class 'koma-article'. >>> >>> What to do? >>> Thank you for your advice >>> >>> Frédéric (real newbie with org-mode, but I do my best) >>> >> contents of the file. Ready ? >> >> >> >> ;; Added by Package.el. This must come before configurations of >> ;; installed packages. Don't delete this line. If you don't want it, >> ;; just comment it out by adding a semicolon to the start of the line. >> ;; You may delete these explanatory comments. >> (package-initialize) >> >> (custom-set-variables >> ;; custom-set-variables was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> '(ansi-color-faces-vector >> [default default default italic underline success warning error]) >> '(ansi-color-names-vector >> ["#212526" "#ff4b4b" "#b4fa70" "#fce94f" "#729fcf" "#e090d7" >> "#8cc4ff" "#ec"]) >> '(current-language-environment "UTF-8") >> '(custom-enabled-themes (quote (deeper-blue))) >> '(display-battery-mode t)) >> (custom-set-faces >> ;; custom-set-faces was added by Custom. >> ;; If you edit it by hand, you could mess it up, so be careful. >> ;; Your init file should contain only one such instance. >> ;; If there is more than one, they won't work right. >> ) >> (put 'upcase-region 'disabled nil) >> >> >> ; CONFIGURATION POUR UTILISER LATEX ;; >> ;; Source : https://orgmode.org/worg/org-tutorials/org-latex-export.html >> >> ;; Pour pouvoir utiliser LaTeX dans un doc. org-mode >> (require 'ox-latex) >> (unless (boundp 'org-latex-classes) >> (setq org-latex-classes nil)) >> + >> (add-to-list 'org-latex-classes >> '("article" >> "\\documentclass{article}" >> ("\\section{%s}" . "\\section*{%s}"))) >> >> ;; Pour configurer les subdivisions des articles >> (add-to-list 'org-latex-classes >> '("article" >> "\\documentclass{article}" >> ("\\section{%s}" . "\\section*{%s}") >> ("\\subsection{%s}" . "\\subsection*{%s}") >> ("\\subsubsection{%s}" . "\\subsubsection*{%s}") >> ("\\paragraph{%s}" . "\\paragraph*{%s}") >> ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) >> >> ;; Pour configurer les subdivisions de la classe book (indiquer : >> #+LaTeX_CLASS: book) >> (with-eval-after-load "ox-latex" >> (add-to-list 'org-latex-classes >> '("book" >> "\\documentclass{book}" >> ("\\part{%s}" . "\\part*{%s}") >> ("\\chapter{%s}" . "\\chapter*{%s}") >> ("\\section{%s}" . "\\section*{%s}") >> ("\\subsection{%s}" . "\\subsection*{%s}") >> ("\\subsubsection{%s}" . "\\subsubsection*{%s}" >> >> ;; Pour utiliser la classe koma-script. Indiquer : #+LaTeX_CLASS: >> koma-article >> (with-eval-after-load "ox-latex" >> (add-to-list 'org-latex-classes >> '("koma-article" "\\documentclass{scrartcl}" >> ("\\section{%s}" . "\\section*{%s}") >> ("\\subsection{%s}" . "\\subsection*{%s}") >> ("\\subsubsection{%s}" . "\\subsubsection*{%s}") >> ("\\paragraph{%s}" . "\\paragraph*{%s}") >> ("\\subparagraph{%s}" . "\\subparagraph*{%s}" -- Nick "There are only two hard problems in computer science: cache invalidation, naming things, and off-by-one errors." -Martin Fowler
Re: [O] Org-mode and koma-script
Le 28/08/2018 à 18:04, Tim Cross a écrit : Sorry, I was in a rush before work and sent you the wrong command! No problem. Thank you for giving me your time. What you need to do is run emacs --debug-init rather than emacs -q. Well. And the answer is... too long (many, many lines) : are ready to read it (please take a look down) ? Your emacs init is either in the file .emacs in your home directory or the file init.el in the .emacs.d directory (assuming your not using something like spacemacs or some other 'canned' setup, which may break out the config into other files). I work with Debian 9. The code you posted i.e. Leaving directory ‘/root/.emacs.d/elpa/avy-20180814.2121’ Compiling file /root/.emacs.d/elpa/avy-20180814.2121/avy.el at Tue Aug 28 20:00:34 2018 Entering directory ‘/root/.emacs.d/elpa/avy-20180814.2121/’ Compiling no file at Tue Aug 28 20:00:35 2018 Leaving directory ‘/root/.emacs.d/elpa/ace-window-20180814.1516’ Compiling file /root/.emacs.d/elpa/ace-window-20180814.1516/ace-window.el at Tue Aug 28 20:00:35 2018 Entering directory ‘/root/.emacs.d/elpa/ace-window-20180814.1516/’ Compiling no file at Tue Aug 28 20:00:36 2018 Leaving directory ‘/root/.emacs.d/elpa/anzu-20161017.1607’ Compiling file /root/.emacs.d/elpa/anzu-20161017.1607/anzu.el at Tue Aug 28 20:00:36 2018 Entering directory ‘/root/.emacs.d/elpa/anzu-20161017.1607/’ Compiling no file at Tue Aug 28 20:00:37 2018 Leaving directory ‘/root/.emacs.d/elpa/seq-2.20’ Compiling file /root/.emacs.d/elpa/seq-2.20/seq-24.el at Tue Aug 28 20:00:37 2018 Entering directory ‘/root/.emacs.d/elpa/seq-2.20/’ Compiling file /root/.emacs.d/elpa/seq-2.20/seq-25.el at Tue Aug 28 20:00:37 2018 Compiling file /root/.emacs.d/elpa/seq-2.20/seq-pkg.el at Tue Aug 28 20:00:37 2018 Compiling file /root/.emacs.d/elpa/seq-2.20/seq.el at Tue Aug 28 20:00:37 2018 Leaving directory ‘/root/.emacs.d/elpa/seq-2.20/’ Compiling file /root/.emacs.d/elpa/seq-2.20/tests/seq-tests.el at Tue Aug 28 20:00:37 2018 Entering directory ‘/root/.emacs.d/elpa/seq-2.20/tests/’ Compiling no file at Tue Aug 28 20:00:39 2018 Leaving directory ‘/root/.emacs.d/elpa/beacon-20180706.1725’ Compiling file /root/.emacs.d/elpa/beacon-20180706.1725/beacon.el at Tue Aug 28 20:00:39 2018 Entering directory ‘/root/.emacs.d/elpa/beacon-20180706.1725/’ Compiling no file at Tue Aug 28 20:00:40 2018 Leaving directory ‘/root/.emacs.d/elpa/browse-kill-ring-20171219.1908’ Compiling file /root/.emacs.d/elpa/browse-kill-ring-20171219.1908/browse-kill-ring.el at Tue Aug 28 20:00:40 2018 Entering directory ‘/root/.emacs.d/elpa/browse-kill-ring-20171219.1908/’ Compiling no file at Tue Aug 28 20:00:41 2018 Leaving directory ‘/root/.emacs.d/elpa/crux-20180612.655’ Compiling file /root/.emacs.d/elpa/crux-20180612.655/crux.el at Tue Aug 28 20:00:41 2018 Entering directory ‘/root/.emacs.d/elpa/crux-20180612.655/’ Compiling no file at Tue Aug 28 20:00:42 2018 Leaving directory ‘/root/.emacs.d/elpa/makey-20131231.1430’ Compiling file /root/.emacs.d/elpa/makey-20131231.1430/makey.el at Tue Aug 28 20:00:42 2018 Entering directory ‘/root/.emacs.d/elpa/makey-20131231.1430/’ Compiling no file at Tue Aug 28 20:00:43 2018 Leaving directory ‘/root/.emacs.d/elpa/discover-my-major-20180606.511’ Compiling file /root/.emacs.d/elpa/discover-my-major-20180606.511/discover-my-major.el at Tue Aug 28 20:00:43 2018 Entering directory ‘/root/.emacs.d/elpa/discover-my-major-20180606.511/’ Compiling no file at Tue Aug 28 20:00:44 2018 Leaving directory ‘/root/.emacs.d/elpa/diff-hl-20180201.1155’ Compiling file /root/.emacs.d/elpa/diff-hl-20180201.1155/diff-hl-amend.el at Tue Aug 28 20:00:44 2018 Entering directory ‘/root/.emacs.d/elpa/diff-hl-20180201.1155/’ Compiling file /root/.emacs.d/elpa/diff-hl-20180201.1155/diff-hl-dired.el at Tue Aug 28 20:00:44 2018 Compiling file /root/.emacs.d/elpa/diff-hl-20180201.1155/diff-hl-flydiff.el at Tue Aug 28 20:00:44 2018 Compiling file /root/.emacs.d/elpa/diff-hl-20180201.1155/diff-hl-margin.el at Tue Aug 28 20:00:44 2018 Compiling file /root/.emacs.d/elpa/diff-hl-20180201.1155/diff-hl.el at Tue Aug 28 20:00:44 2018 Compiling no file at Tue Aug 28 20:00:46 2018 Leaving directory ‘/root/.emacs.d/elpa/diminish-20170419.1736’ Compiling file /root/.emacs.d/elpa/diminish-20170419.1736/diminish.el at Tue Aug 28 20:00:46 2018 Entering directory ‘/root/.emacs.d/elpa/diminish-20170419.1736/’ Compiling no file at Tue Aug 28 20:00:47 2018 Leaving directory ‘/root/.emacs.d/elpa/easy-kill-20151031.529’ Compiling file /root/.emacs.d/elpa/easy-kill-20151031.529/easy-kill.el at Tue Aug 28 20:00:47 2018 Entering directory ‘/root/.emacs.d/elpa/easy-kill-20151031.529/’ Compiling no file at Tue Aug 28 20:00:51 2018 Leaving directory ‘/root/.emacs.d/elpa/editorconfig-20180823.452’ Compiling file /root/.emacs.d/elpa/editorconfig-20180823.452/editorconfig-conf-mode.el at Tue Aug 28
Re: [O] org babel R source blocks :results output with :session includes extra blank lines
Cannot confirm. See inline. > On Aug 28, 2018, at 7:48 AM, Dylan Schwilk wrote: > > Hello, > > I recently have run into a change in output from my R language source code > blocks. > > I have found that when I include :session to the source block header, I now > get > extra blank lines in the #+results. This has broken my lecture slides for my > courses with too much extra blank space. > > for example: > > #+begin_src R :results output :exports both :session > 1 + 2 > 3 + 4 > print("the end") > #+end_src > > #+results: > : [1] 3 > : > : [1] 7 > : > : [1] "the end" > With the :session arg I get the output as you show it below. This was with master on commit f79545 from last month and on today's master (commit 38a8901). > > I do not have this issue when I omit the :session header argument, eg: > > #+begin_src R :results output :exports both > 1 + 2 > 3 + 4 > print("the end") > #+end_src > > #+results: > : [1] 3 > : [1] 7 > : [1] "the end" > > FWIW, my R session looks like this --8<---cut here---start->8--- [...] Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > setwd('/Users/cberry/') > 1 + 2 3 + 4 print("the end") 'org_babel_R_eoe' [1] 3 > [1] 7 > [1] "the end" > [1] "org_babel_R_eoe" --8<---cut here---end--->8--- If this is what your session looks like, then we need to dig deeper into ob-R. HTH, Chuck
Re: [O] Org-mode and koma-script
Sorry, I was in a rush before work and sent you the wrong command! What you need to do is run emacs --debug-init rather than emacs -q. Your emacs init is either in the file .emacs in your home directory or the file init.el in the .emacs.d directory (assuming your not using something like spacemacs or some other 'canned' setup, which may break out the config into other files). The code you posted i.e. >>> ; CONFIGURATION POUR UTILISER LATEX ;; >>> ;; Source : https://orgmode.org/worg/org-tutorials/org-latex-export.html >>> >>> ;; Pour pouvoir utiliser LaTeX dans un doc. org-mode >>> (require 'ox-latex) >>> (unless (boundp 'org-latex-classes) >>>(setq org-latex-classes nil)) >>> + >>> (add-to-list 'org-latex-classes >>>'("article" >>>"\\documentclass{article}" >>>("\\section{%s}" . "\\section*{%s}"))) >>> >>> ;; Pour configurer les subdivisions des articles >>> (add-to-list 'org-latex-classes >>>'("article" >>>"\\documentclass{article}" >>>("\\section{%s}" . "\\section*{%s}") >>>("\\subsection{%s}" . "\\subsection*{%s}") >>>("\\subsubsection{%s}" . "\\subsubsection*{%s}") >>>("\\paragraph{%s}" . "\\paragraph*{%s}") >>>("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) >>> >>> ;; Pour configurer les subdivisions de la classe book (indiquer : >>> #+LaTeX_CLASS: book) >>> (with-eval-after-load "ox-latex" >>> (add-to-list 'org-latex-classes >>>'("book" >>>"\\documentclass{book}" >>>("\\part{%s}" . "\\part*{%s}") >>>("\\chapter{%s}" . "\\chapter*{%s}") >>>("\\section{%s}" . "\\section*{%s}") >>>("\\subsection{%s}" . "\\subsection*{%s}") >>>("\\subsubsection{%s}" . "\\subsubsection*{%s}" >>> >>> ;; Pour utiliser la classe koma-script. Indiquer : #+LaTeX_CLASS: >>> koma-article >>> (with-eval-after-load "ox-latex" >>>(add-to-list 'org-latex-classes >>>'("koma-article" "\\documentclass{scrartcl}" >>>("\\section{%s}" . "\\section*{%s}") >>>("\\subsection{%s}" . "\\subsection*{%s}") >>>("\\subsubsection{%s}" . "\\subsubsection*{%s}") >>>("\\paragraph{%s}" . "\\paragraph*{%s}") >>>("\\subparagraph{%s}" . "\\subparagraph*{%s}" >> doesn't look quite right. It should be in your init file i.e. .emacs or .emacs.d/init.el and it needs to be correctly formed elisp statements, The --debug-init will check this. Looking at it, you seem to have a spurious '+' character, but there may be other problems as well. There is a customize interface you can use to add the korma classes, which may be easier than writing elisp if your not familiar with that. Do M-x customize-group org and have a look around. What I use in my init is (setq org-latex-classes '(("beamer" "\\documentclass[presentation]{beamer}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("hitec-article" "\\documentclass[12pt]{hitec} [DEFAULT-PACKAGES] [PACKAGES] [NO-EXTRA] \\settextfraction{0.95}\n" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("korma-article" "\\documentclass[11pt]{scrartcl}" ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}")) ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("korma-report" "\\documentclass[11pt]{scrreport}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")) ("korma-book" "\\documentclass[11pt]{scrbook}" ("\\part{%s}" . "\\part*{%s}") ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
[O] org babel R source blocks :results output with :session includes extra blank lines
Hello, I recently have run into a change in output from my R language source code blocks. I have found that when I include :session to the source block header, I now get extra blank lines in the #+results. This has broken my lecture slides for my courses with too much extra blank space. for example: #+begin_src R :results output :exports both :session 1 + 2 3 + 4 print("the end") #+end_src #+results: : [1] 3 : : [1] 7 : : [1] "the end" I do not have this issue when I omit the :session header argument, eg: #+begin_src R :results output :exports both 1 + 2 3 + 4 print("the end") #+end_src #+results: : [1] 3 : [1] 7 : [1] "the end" I am using org-mode version 9.1.13, emacs 25.2.2 and R version 3.4.4 (2018-03-15) with no .Rprofile. This does not happen with python source blocks, only with R Sincerely, Dylan
Re: [O] Multi-step ledger org-capture template
On 27 August 2018 09:05:32 BST, ST wrote: >Thank you for sharing! > >It would be nice to be able to generate a .pdf invoice based on a >predefined template (in .org/.tex/etc formats; maybe utilizing org-mode >exporter) for certain ledger transaction (by default the current one, >highlighted by cursor in ledger-mode). > >Did anybody wrote something similar in the past? In this general area, I have been developing a combination of org mode and Scheme code whose aim is to help me define budgets, and then track whether my actual spending is in accordance with those budgets. I'm not using ledger here. I hope I'm not missing something, but I looked at ledger and it didn't seem to help with the main thing I thought I needed, which was to read in transaction dump files from my bank and present those in a summarised form according to my budget categories. I use org tables to define what the categories are, and how particular transaction entries are mapped into those categories (or else show up as "Unknown"). It's a work in progress... In case anyone else is interested in this particular itch, I'd be interested to hear your thoughts. Best wishes, Neil
[O] How to get clock data for today?
Hi Orgers, I'd like to be able to get all clock data for a given period, say today, from a given file(s) (like what `org-agenda-log-mode' does). And I'd like to have it in an Elisp program, so ideally as some data structure. Any hints? -- Marcin Borkowski http://mbork.pl