[O] Archive to weektree?
Hi, I know it's possible to archive to a datetree like so: > (setq org-archive-location "~/org/test.org::datetree/") When I tried this using "weektree" instead, it did not work; the entry was placed in the correct file, but as a top-level heading. Is it possible to do this? -- http://telegram.me/ephzero cryptocat ephzero
Re: [O] org-mobile-push needs a visible frame ?
Bingowrites: > Hi, > > I see that when there is an emacs server without a visible frame, > > emacsclient --eval "(org-mobile-push)" , gives the error : > > *ERROR*: Unknown terminal type > > Only when there is a visible frame does org-mobile-push succeed. Is there a > reason why org-mobile-push needs a frame ? How can I make it work without a > frame? > > Org version is 8.3.2, emacs version 24.4.1, Debian Linux 8.2. > > thanks > Confirmed. I'm seeing this on trunk Emacs on Debian. -- Ian Dunn
[O] Org-babel for sending emails
Hi, Is there a dedicated org-babel for composing and sending emails from org-mode ? I know that a entire org-mode file could be sent as email by exporting with org-mime, but I was wondering if there exist some package to have message mode for org-babel, like the following: #+BEGIN_SRC message FROM: TO:... #+END_SRC and executing above send the email. Thank you in advance for your responses.
Re: [O] How to obtain the headline level from org-element-at-point
There is nothing in that function that limits it to level 2 headings. The only way you would not get the property is if you are on the level one heading. It will not look down into the subheading for the property. Jeremie Juste writes: > Hello, > > Thanks for the reply. >> what do you mean it only considers level 1 headlines? It seems to work on >> all headlines for me. > I mean that interleave-mode doesn't find the pdf path if I use the > following configuration. That is property at level 2 headline. > > * Literature > ** Notes for CS103 > :PROPERTIES: > :INTERLEAVE_PDF: cs103.pdf > :END: > > >> The email subject doesn't seem related to the body you can get the level >> like this. > I was thinking that the function looks at the property of level 1 level > only. am I wrong ? I filed an issue > https://github.com/rudolfochrist/interleave/issues/44 and the > maintainer seems to have confirmed it. > >> (org-element-property :level (org-element-at-point)) > Thanks for the command. I was hoping to understand more this issue with > it. Will post a reply if I find anything interesting. > > Bests regards, > > Jeremie > > > > > > > >> > >> > >> >> 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 >> >> On Sat, Apr 8, 2017 at 10:17 AM, Jeremie Juste>> wrote: >> >> Hello, >> >> Interleave-mode https://github.com/rudolfochrist/interleave, is a very >> convenient tool for writing notes in associated >> with pdf. It uses org-mode for this purpose. >> >> I recently noticed that in the case where I want to write notes for >> multiple pdf in a singlie org file, I have to use the level 1 headline >> >> * Notes for CS103 >> :PROPERTIES: >> :INTERLEAVE_PDF: cs103.pdf >> :END: >> >> I would like to have the possibility of using any headline level for >> this purpose but my org-fu is weak. >> >> I think it boils down to this function in interleave-mode mode where >> (org-element-type headline) checks only for level 1 headline. >> >> #+BEGIN_SRC elisp >> (defun interleave--headline-pdf-path (buffer) >> "Return the INTERLEAVE_PDF property of the current headline in BUFFER." >> (with-current-buffer buffer >> (save-excursion >> (let ((headline (org-element-at-point))) >>(when (and (equal (org-element-type headline) 'headline) >> (org-entry-get nil interleave--pdf-prop)) >> (setq interleave-multi-pdf-notes-file t) >> (org-entry-get nil interleave--pdf-prop)) >> >> #+END_SRC >> >> Can anyone see a way around it ? >> >> Best regards, >> >> Jeremie -- 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] How to obtain the headline level from org-element-at-point
what do you mean it only considers level 1 headlines? It seems to work on all headlines for me. The email subject doesn't seem related to the body you can get the level like this. (org-element-property :level (org-element-at-point)) 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 On Sat, Apr 8, 2017 at 10:17 AM, Jeremie Justewrote: > > Hello, > > Interleave-mode https://github.com/rudolfochrist/interleave, is a very > convenient tool for writing notes in associated > with pdf. It uses org-mode for this purpose. > > I recently noticed that in the case where I want to write notes for > multiple pdf in a singlie org file, I have to use the level 1 headline > > * Notes for CS103 > :PROPERTIES: > :INTERLEAVE_PDF: cs103.pdf > :END: > > > I would like to have the possibility of using any headline level for > this purpose but my org-fu is weak. > > I think it boils down to this function in interleave-mode mode where > (org-element-type headline) checks only for level 1 headline. > > > #+BEGIN_SRC elisp > (defun interleave--headline-pdf-path (buffer) > "Return the INTERLEAVE_PDF property of the current headline in BUFFER." > (with-current-buffer buffer > (save-excursion > (let ((headline (org-element-at-point))) > (when (and (equal (org-element-type headline) 'headline) > (org-entry-get nil interleave--pdf-prop)) > (setq interleave-multi-pdf-notes-file t) > (org-entry-get nil interleave--pdf-prop)) > > #+END_SRC > > > Can anyone see a way around it ? > > Best regards, > > Jeremie > >
[O] How to obtain the headline level from org-element-at-point
Hello, Interleave-mode https://github.com/rudolfochrist/interleave, is a very convenient tool for writing notes in associated with pdf. It uses org-mode for this purpose. I recently noticed that in the case where I want to write notes for multiple pdf in a singlie org file, I have to use the level 1 headline * Notes for CS103 :PROPERTIES: :INTERLEAVE_PDF: cs103.pdf :END: I would like to have the possibility of using any headline level for this purpose but my org-fu is weak. I think it boils down to this function in interleave-mode mode where (org-element-type headline) checks only for level 1 headline. #+BEGIN_SRC elisp (defun interleave--headline-pdf-path (buffer) "Return the INTERLEAVE_PDF property of the current headline in BUFFER." (with-current-buffer buffer (save-excursion (let ((headline (org-element-at-point))) (when (and (equal (org-element-type headline) 'headline) (org-entry-get nil interleave--pdf-prop)) (setq interleave-multi-pdf-notes-file t) (org-entry-get nil interleave--pdf-prop)) #+END_SRC Can anyone see a way around it ? Best regards, Jeremie
[O] Babel + sh + sessions
Hi Org-Mode list, I'm having trouble running babel shells with nested applications with sessions. A simple MWE is that this works: #+BEGIN_SRC sh :results verbatim :eval no-export echo "bash" octave disp("Octave") #+END_SRC And if you add ":session BashOctave" to the header, it does not work. Inspecting the "BashOctave" buffer, I see that Babel attempts to determine end-of-execution with =echo 'org_babel_sh_eoe'=, which is an invalid command in Octave. I can fix this with: (setq org-babel-sh-eoe-indicator "disp('org_babel_sh_eoe')") I can also do this with Python and :session, but have to update the eoe indicator to use 'print': (setq org-babel-sh-eoe-indicator "print('org_babel_sh_eoe')") #+BEGIN_SRC sh :results verbatim :eval no-export :session BashPython echo "bash" python str="In Python" print(str) #+END_SRC Check that sessions work: #+BEGIN_SRC sh :results verbatim :eval no-export :session BashPython print(str) #+END_SRC Is this the correct solution? This seems a bit heavy-handed, because now regular shell sessions will not work because the "print()" or "disp()" functions do not exist in bash. Q1: How do I appropriately update "org-babel-sh-eoe-indicator" in this situation? Oddly, if I replace "python" with "IPython", things do not work: (setq org-babel-sh-eoe-indicator "print('org_babel_sh_eoe')") #+BEGIN_SRC sh :results verbatim :eval no-export :session BashIPython echo "bash" ipython --pylab=qt5 --pdb --pprint --nosep --no-confirm-exit --no-banner str="In IPython" print(str) #+END_SRC For me, Org hangs here. I might know why: If I run "ipython --classic" in my terminal, I get a ">>>" prompt. If I run that same command in the emacs shell spawned by the Babel session above, it does not respect the "--classic" option, and the prompt is "In [1]: ". I think this may be the cause. I cannot figure out why ipython behaves differently in a shell in emacs versus a shell in my terminal. The two environments appear identical to me when inspected via "printenv". Q2: Can anyone provide hints or advice so that Python and IPython behave the same? Why am I doing this when Babel has support for Octave, Python, and IPython? My actual use case is GRASS GIS, which I've been using for a while and works fine because it is built on top of bash. But GRASS has a Python interface, so now I'm actually trying to run babel blocks that are IPython nested in GRASS nested in bash. This works (note: no session): #+BEGIN_SRC sh :results verbatim :eval no-export echo "in bash" grass72 echo "in GRASS" ipython --pylab=qt5 --pdb --pprint --nosep --no-confirm-exit --no-banner print("In Python") #+END_SRC The above: + works without sessions + works with sessions and Python (not IPython) if I update eoe as above + Does not work with session + IPython Does anyone have any other suggestions how to get an IPython session with a custom bash environment loaded before (that is all GRASS is - a bash environment). Can I run Babel IPython blocks instead of shell blocks, but have some weird hack like: (setq org-babel-python-command "bash; grass72; ipython)? Thanks for reading this far, and thanks in advance for any advice or hints you might have -k.
[O] ox-md and ox-leanpub
Hi all, I am starting to write a CC BY-SA 4.0 textbook and I want to be able to write it in org-mode and publish it on leanpub. I have hit some problems. I install org-mode on emacs 25.1 from http://orgmode.org/elpa/ like this (use-package org :ensure org-plus-contrib :defer t) (require 'ox-md) If I try to export the draft of my book https://raw.githubusercontent.com/fommil/fp-scala-mortals/master/book.org using C-c C-e and select m m (Markdown), I get this error: Debugger entered--Lisp error: (wrong-type-argument listp #("2017" 0 4 (:parent (#1 org-element-set-contents(#("2017" 0 4 (:parent (#0 apply(org-element-set-contents #("2017" 0 4 (:parent (#0))) nil) If I revert back to the version of ox-md that comes with Emacs 25.1, the file is exported ok. However, further to this. If I (require 'ox-leanpub) and C-c C-e using the default version of org-mode, then the option to export to Leanpub does not appear. Could somebody who knows how to write exporters please have a look over https://raw.githubusercontent.com/juanre/ox-leanpub/master/ox-leanpub.el to see if they can spot any obvious problems? If I install ox-leanpub with the latest org-plus-contrib then the :export-block line must be removed or it will fail to load. -- Best regards, Sam signature.asc Description: PGP signature