Re: [O] Insert datetree entry
Daniele Nicolodi writes: > Hello, > > there is a way in org-mode to insert a datetree entry without going > through the org-capture? Ideally the function would jump to the > datetree and inser an headline for the current day if one is not > present, or move to the end of it if one is present. > > I haven't found anything like this in the manual. I'm now digging in the > code. Hopefully it is not something too hard to implement with my > lacking elisp knowledge. I don't believe there really is one, but I've had to do it a couple of times myself. This is my solution (I'm not a lisp expert either, but it did the job): (defun bc/org-new-datetree-at-point (interactive) (org-up-heading-safe) (org-datetree-find-date-create (calendar-gregorian-from-absolute (org-today)) 'subtree-at-point)) This will make the datetree as a subheading of the current heading (or find it if it already exists). Getting rid of 'subtree-at-point will make the year a level 1 heading at the end of the file, like with org-capture. Bruce -- Bruce V. Chiarelli http://github.com/bccomm
[O] Insert datetree entry
Hello, there is a way in org-mode to insert a datetree entry without going through the org-capture? Ideally the function would jump to the datetree and inser an headline for the current day if one is not present, or move to the end of it if one is present. I haven't found anything like this in the manual. I'm now digging in the code. Hopefully it is not something too hard to implement with my lacking elisp knowledge. Thanks. Cheers, Daniele
Re: [O] problem with org-ref after upgrading org-mode from 8.3 to 9.0.5
That looks like an issue with helm-Bibtex. You might try updating it and/or raise an issue with that package. On Mon, Apr 3, 2017 at 11:03 AM Johannes Brauerwrote: > that’s what I get executing (require 'org-ref): > > Debugger entered--Lisp error: (error "Required feature ‘let-alist’ was not > provided") > require(let-alist) > > byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\207" > [require bibtex browse-url hl-line ido json url-queue dash let-alist seq] 2) > require(biblio-core) > > byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\311\312!\207" > [require biblio-core biblio-doi biblio-arxiv biblio-crossref biblio-dblp > biblio-hal biblio-dissemin biblio-download provide biblio] 2) > require(biblio) > eval-buffer(# nil > "/Users/johannes/Library/Preferences/Aquamacs > Emacs/Packages/elpa/helm-bibtex-20170321.1306/bibtex-completion.el" nil t) > ; Reading at buffer position 1340 > load-with-code-conversion("/Users/johannes/Library/Preferences/Aquamacs > Emacs/Packages/elpa/helm-bibtex-20170321.1306/bibtex-completion.el" > "/Users/johannes/Library/Preferences/Aquamacs > Emacs/Packages/elpa/helm-bibtex-20170321.1306/bibtex-completion.el" nil t) > require(bibtex-completion) > byte-code("\306\307!\210\306\310!\210\306\311!\210\306\312!\210\313 > \314\211 \314 :\203f -- John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] problem with org-ref after upgrading org-mode from 8.3 to 9.0.5
that’s what I get executing (require 'org-ref): Debugger entered--Lisp error: (error "Required feature ‘let-alist’ was not provided") require(let-alist) byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\207" [require bibtex browse-url hl-line ido json url-queue dash let-alist seq] 2) require(biblio-core) byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\311\312!\207" [require biblio-core biblio-doi biblio-arxiv biblio-crossref biblio-dblp biblio-hal biblio-dissemin biblio-download provide biblio] 2) require(biblio) eval-buffer(# nil "/Users/johannes/Library/Preferences/Aquamacs Emacs/Packages/elpa/helm-bibtex-20170321.1306/bibtex-completion.el" nil t) ; Reading at buffer position 1340 load-with-code-conversion("/Users/johannes/Library/Preferences/Aquamacs Emacs/Packages/elpa/helm-bibtex-20170321.1306/bibtex-completion.el" "/Users/johannes/Library/Preferences/Aquamacs Emacs/Packages/elpa/helm-bibtex-20170321.1306/bibtex-completion.el" nil t) require(bibtex-completion) byte-code("\306\307!\210\306\310!\210\306\311!\210\306\312!\210\313\314\211\314:\203f
Re: [O] problem with org-ref after upgrading org-mode from 8.3 to 9.0.5
I have not seen that before. Was there a traceback that indicated where the error came from? Johannes Brauer writes: > Hi, > after the upgrade (require 'org-ref) results in the error message: > (error "Required feature ‘let-alist’ was not provided“) > > I am using Aquamacs 3.3 GNU Emacs 25.1.1. I looked for let-plist using > list-packages and found: > let-alist 1.0.4 built-in > > What is going wrong? > > Johannes -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu
Re: [O] Scala problem in Babel
Jarmo Hurriwrites: > When I look at the temporary file I see that the code has been > embedded in a wrapper defined in ob-scala.el. I guess it's the wrapper > that messes up the execution of the code. > What is the wrapper for? How am I supposed to use it? Ok, got it by taking a closer look at ob-scala.el. In Babel scala code isn't compiled and executed, it is run in interactive mode (shell). The following works as expected (just as an example; you can also do this without the Fibonacci class). #+BEGIN_SRC scala :exports both :results output object Fibonacci { def fib (n : Int) : Int = { if (n == 1 || n == 2) n - 1 else fib (n - 1) + fib (n - 2) } } println (Fibonacci.fib (7)) #+END_SRC #+RESULTS: : 8 Jarmo
Re: [O] Bug: Can't execute C code block from remote directory [9.0.5 (release_9.0.5-401-g86ff11 @ /Users/xcy/src/org-mode/lisp/)]
Here is a patch which can fix the issue. >From e42b22f74c2f04a4d8e7eec0a6bdacbd08bebf12 Mon Sep 17 00:00:00 2001 From: Chunyang XuDate: Mon, 3 Apr 2017 14:46:51 +0800 Subject: [PATCH] ob-C: Fix remote executing * lisp/ob-C.el (org-babel-C-execute): Process remote bin file. TINYCHANGE --- lisp/ob-C.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/ob-C.el b/lisp/ob-C.el index 795bcb2b7..e54e17492 100644 --- a/lisp/ob-C.el +++ b/lisp/ob-C.el @@ -161,7 +161,7 @@ or `org-babel-execute:C++' or `org-babel-execute:D'." (org-babel-eval (pcase org-babel-c-variant ((or `c `cpp) - (concat tmp-bin-file cmdline)) + (concat (org-babel-process-file-name tmp-bin-file) cmdline)) (`d (format "%s %s %s %s" org-babel-D-compiler -- 2.12.0 Chunyang Xu writes: > Hi. > > My computer is running Mac OS, I would like to run some C code from my > VPS which is running GNU/Linux Ubuntu. For example, > > #+BEGIN_SRC C :dir /ssh:xuchunyang.me: > puts("Hello, World!"); > #+END_SRC > > but when I execute this code block with C-c C-c, it popups *Org-Babel > Error Output* and here is its contents > > /bin/sh: 1: /ssh:xuchunyang.me:/tmp/C-bin-18285iKe: not found > > However, the file does exist and produce the desired output > > #+BEGIN_SRC sh :dir /ssh:xuchunyang.me: > /tmp/C-bin-18285U4c > #+END_SRC > > #+RESULTS: > | Hello | World! |