[O] org mode R remote code evaluation
dear all, I have some computation intense R-code that I want to run remotely on my server, and, according to the org manual that should be possible with the :dir parameter. so I went on and tried the following (user/server masked): #+BEGIN_SRC R :dir /xx@xxx: system(hostname) #+END_SRC when I execute it I get the error: Tramp: Encoding region using function `base64-encode-region'...done Tramp: Decoding region into remote file /ssh:xx@xxx :/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/R-46345BQs...done byte-code: Couldn't write region to `/ssh:xx@xxx:/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/R-46345BQs', decode using `base64 -d -i %s' failed apparently, this temp folder does not exist on the linux server, it is actually the temp folder from my local machine. I get the same error when I try to execute remote shell code, so it's not R related. I also tried to start a ssh session using M-x ssh and used the source block #+BEGIN_SRC R :exports both :session *ssh xxx* system(hostname) #+END_SRC on the server it executes the command but it can not write the results: xxx Warning message: In file.rename(tfile, transfer.file) : cannot rename file '/tmp/RtmpsirjGl/file51c8f6ce4ec' to '/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/babel-46345zSH/R-46345a4N', reason 'No such file or directory' I am using emacs 24.3 and Org-mode version 8.0.7 (release_8.0.7-384-g6fdc23) I would be helpful for any suggestions how I could solve this problem. thanks in advance
Re: [O] Invalid specification of styles.xml: nil
On Thu, Aug 29, 2013 at 6:22 AM, Jambunathan K kjambunat...@gmail.com wrote: The double quotes. See the following section in the manual. Great! I did not noted that! Thanks, Luca
Re: [O] org mode R remote code evaluation
Johannes Rainer johannes.rai...@gmail.com writes: dear all, I have some computation intense R-code that I want to run remotely on my server, and, according to the org manual that should be possible with the :dir parameter. so I went on and tried the following (user/server masked): #+BEGIN_SRC R :dir /xx@xxx: system(hostname) #+END_SRC when I execute it I get the error: Tramp: Encoding region using function `base64-encode-region'...done Tramp: Decoding region into remote file /ssh:xx@xxx:/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/R-46345BQs...done byte-code: Couldn't write region to `/ssh:xx@xxx:/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/R-46345BQs', decode using `base64 -d -i %s' failed apparently, this temp folder does not exist on the linux server, it is actually the temp folder from my local machine. I get the same error when I try to execute remote shell code, so it's not R related. I also tried to start a ssh session using M-x ssh and used the source block #+BEGIN_SRC R :exports both :session *ssh xxx* system(hostname) #+END_SRC on the server it executes the command but it can not write the results: xxx Warning message: In file.rename(tfile, transfer.file) : cannot rename file '/tmp/RtmpsirjGl/file51c8f6ce4ec' to '/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/babel-46345zSH/R-46345a4N', reason 'No such file or directory' I am using emacs 24.3 and Org-mode version 8.0.7 (release_8.0.7-384-g6fdc23) I would be helpful for any suggestions how I could solve this problem. thanks in advance The following works for me: #+BEGIN_SRC R :results output :dir /xxx@x: system(hostname) #+END_SRC with Emacs 24.2.1 and 8.0.7 (8.0.7-6-g13cb28-elpaplus) Cheers, Loris -- This signature is currently under construction.
Re: [O] (error Stack overflow in equal)
Hello, Jambunathan K kjambunat...@gmail.com writes: Export the below file to ODT. You will see the following stacktrace. Debugger entered--Lisp error: (error Stack overflow in equal) gethash(((table (:type org :attr_odt (:style \GriddedTable\) :parent)) . 0)) org-export-table-cell-width((table-cell (:parent (table-row (:type standard ) org-odt-table-cell((table-cell )) org-export-data((table-cell )) Just to remind you, the table is created on fly by manipulating the tree. Using an `eq' as predicate in `org-export-table-cell-width' solves the problem. I am not sure this would be the right fix though. Indeed, predicate has to be `eq', but then, key used (a cons cell) is invalid. I changed both key and value structure in cache so it can use `eq' as a predicate. This should now be fixed. Thank you for reporting it. Regards, -- Nicolas Goaziou
Re: [O] Ignored in-buffer settings and after-export hook
Hello, I guess I can, but it means re-doing the mapping sources to exported file names. AFAICT, there is only one place where both the source and the output name are known: in `org-publish-file', right after a file has been published. We may add a hook there. Since, at that time, the current buffer can be anything, both file names need to be passed as arguments to the hook. Also, files skipped during the publishing process won't trigger it. What do you think? It would be fine!
Re: [O] org mode R remote code evaluation
thanks! so the :results output does the trick. On Thu, Aug 29, 2013 at 10:25 AM, Loris Bennett loris.benn...@fu-berlin.dewrote: Johannes Rainer johannes.rai...@gmail.com writes: dear all, I have some computation intense R-code that I want to run remotely on my server, and, according to the org manual that should be possible with the :dir parameter. so I went on and tried the following (user/server masked): #+BEGIN_SRC R :dir /xx@xxx: system(hostname) #+END_SRC when I execute it I get the error: Tramp: Encoding region using function `base64-encode-region'...done Tramp: Decoding region into remote file /ssh:xx@xxx :/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/R-46345BQs...done byte-code: Couldn't write region to `/ssh:xx@xxx :/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/R-46345BQs', decode using `base64 -d -i %s' failed apparently, this temp folder does not exist on the linux server, it is actually the temp folder from my local machine. I get the same error when I try to execute remote shell code, so it's not R related. I also tried to start a ssh session using M-x ssh and used the source block #+BEGIN_SRC R :exports both :session *ssh xxx* system(hostname) #+END_SRC on the server it executes the command but it can not write the results: xxx Warning message: In file.rename(tfile, transfer.file) : cannot rename file '/tmp/RtmpsirjGl/file51c8f6ce4ec' to '/var/folders/ny/6kbb36310wz2kww8y8ctry60gn/T/babel-46345zSH/R-46345a4N', reason 'No such file or directory' I am using emacs 24.3 and Org-mode version 8.0.7 (release_8.0.7-384-g6fdc23) I would be helpful for any suggestions how I could solve this problem. thanks in advance The following works for me: #+BEGIN_SRC R :results output :dir /xxx@x: system(hostname) #+END_SRC with Emacs 24.2.1 and 8.0.7 (8.0.7-6-g13cb28-elpaplus) Cheers, Loris -- This signature is currently under construction. -- Johannes Rainer, PhD Applied Bioinformatics Group, Division Molecular Pathophysiology, Biocenter, Medical University Innsbruck, Innrain 80/82 II, 6020 Innsbruck, Austria and Tyrolean Cancer Research Institute Innrain 66, 6020 Innsbruck, Austria Tel.: +43 (0)512 9003 70961 Email: johannes.rai...@i-med.ac.at johannes.rai...@tcri.at URL: http://bioinfo.i-med.ac.at
Re: [O] [patch][ox-latex] context-aware subscript
Nicolas Goaziou n.goaz...@gmail.com writes: Rasmus ras...@gmx.us writes: Correct. Then, fixing it is more important than caring about some user filter. OK, can I help? Sure, please go ahead. I've just enclosed a quick patch (as in doesn't contain proper commit msg), but it's basically the previous patch minus the removal of \text in math plus some quick checks towards potential nasty filters. It works with the following test file, but let me know about more hair-pulling test cases, and/or filters. #+BEGIN_SRC Org * filters :noexport: #+begin_src emacs-lisp (defun test-filter (script backend info) (when (org-export-derived-backend-p backend 'latex) (if (string-match a script) script))) (defun test-filter2 (script backend info) (when (org-export-derived-backend-p backend 'latex) (replace-regexp-in-string zz script))) (add-to-list 'org-export-filter-subscript-functions 'test-filter) (add-to-list 'org-export-filter-subscript-functions 'test-filter2) #+end_src * test | | mathp | text | |--+---+--| | merge maybe | \beta_t| \times_t | | long merge maybe | \beta_tb | \times_tb | | filter drop | \beta_abc | \times_abc | | filter replace all | \beta_zz | \times_zz | | filter replace parts | \beta_zzx | \times_zzx | #+END_SRC The output is something like this (hline removed) mathptext \\ % %% merge maybe $\beta_{\text{t}}$ \texttimes{}$_{\text{t}}$ \\ long merge maybe $\beta_{\text{tb}}$ \texttimes{}$_{\text{tb}}$ \\ filter drop $\beta$ \texttimes{} \\ filter replace all$\beta_{\text{}}$\texttimes{}$_{\text{}}$ \\ filter replace parts $\beta_{\text{x}}$ \texttimes{}$_{\text{x}}$ \\ From b59c60eb7df5b1ff927aff9f4442b1d226d24ceb Mon Sep 17 00:00:00 2001 From: rasmus ras...@gmx.us Date: Thu, 29 Aug 2013 12:18:00 +0200 Subject: [PATCH] maybe merge subscript and mathp entity with some checks --- lisp/ox-latex.el | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index 1fe918a..91ab912 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1234,8 +1234,25 @@ holding contextual information. See `org-export-data'. Transcode an ENTITY object from Org to LaTeX. CONTENTS are the definition itself. INFO is a plist holding contextual information. - (let ((ent (org-element-property :latex entity))) -(if (org-element-property :latex-math-p entity) (format $%s$ ent) ent))) + (let ((ent (org-element-property :latex entity)) + (prev (org-export-get-previous-element entity info)) + (next (org-export-get-next-element entity info)) + (no-post-blanks-p (= (or (org-element-property :post-blank entity) 1) 0)) + (no-pre-blanks-p (= (or (org-element-property :post-blank + (org-export-get-previous-element + entity info)) 1) 0)) + (scripts '(subscript superscript))) +(if (not (org-element-property :latex-math-p entity)) ent + (concat + (if (and no-pre-blanks-p + (memq (org-element-type prev) scripts) + (not (eq (org-export-data prev info) ))) + $) + ent + (if (and no-post-blanks-p + (memq (org-element-type next) scripts) + (not (eq (org-export-data next info) ))) + $) Example Block @@ -2232,12 +2249,14 @@ channel. ;; superscript into the same math snippet. (concat (and (not in-script-p) (let ((prev (org-export-get-previous-element object info))) - (or (not prev) - (not (eq (org-element-type prev) -(if (eq type 'subscript) 'superscript - 'subscript))) - (let ((blank (org-element-property :post-blank prev))) - (and blank ( blank 0) + (and + (not (org-element-property :latex-math-p prev)) + (or (not prev) + (not (eq (org-element-type prev) + (if (eq type 'subscript) 'superscript + 'subscript))) + (let ((blank (org-element-property :post-blank prev))) + (and blank ( blank 0)) $) (if (eq (org-element-type object) 'subscript) _ ^) (and ( (length output) 1) {) -- 1.8.4 -- When in doubt, do it!
[O] macro expansion in source code
hi, I was just wondering if there is a way to use macro expansion also in source code blocks or headers. I tried this, but the macro was never expanded, but rather the {{{image_width}}} was exported. could the expansion be done by calling the macro expansion before export (e.g. using a hook)? something like this: #+MACRO: image_width 16 #+BEGIN_SRC R :results silent :exports code IMAGE - test.png WIDTH - {{{image_width}}} HEIGHT - 6 png( file=IMAGE, width=WIDTH, height=HEIGHT, units=cm, res=600, pointsize=6 ) library( RColorBrewer ) display.brewer.all() dev.off() #+END_SRC or #+BEGIN_SRC R :results file :exports results :width {{{image_width}}} display.brewer.all() #+END_SRC cheers, jo
[O] Problems with Block Agenda Setup
Hi, I tried to setup my own block agenda and Im facing some problems: Heres the custom settings in org-agenda-custom-commands: (h Agenda for today (MYWN) ((agenda ((org-agenda-overriding-header Calendar) (org-agenda-span (quote day)) (org-agenda-entry-types (quote (:timestamp))) (org-agenda-time-grid (quote (t) (agenda ((org-agenda-overriding-header Critical Now) (org-agenda-entry-types (quote (:deadline))) (org-agenda-sorting-strategy (quote (deadline-down priority-down))) (org-agenda-time-grid nil) (org-deadline-warning-days 0))) (agenda ((org-agenda-overriding-header Opportunity Now max. 100) (org-agenda-entry-types (quote (:scheduled))) (org-agenda-sorting-strategy (quote (scheduled-down priority-down))) (org-agenda-time-grid nil) (org-agenda-max-entries 100 nil nil) (n Agenda and all TODOs ((agenda nil) (alltodo nil)) nil What I want to achieve is a daily Agenda view of 3 things: 1 Timegrid with appointments for day X 2 All tasks having a deadline on day X or before (sorted by priority) 3 All tasks scheduled on day X or before (sorted by priority) - limited to 100 entries :-( My problems: 1) day X - if I have the cursor in one of the 3 blocks of the agenda and type e. g. F to change the date to tomorrow, only this block will change its date, not the other ones. If one of the other blocks already had a date different from today, it will be reset to today when rebuilding the agenda. How can I define them, so that all blocks have the same date, which can be chosen with the calendar like in normal agendas? 2) My custom headers (defined with org-agenda-overriding-header) are not shown. Instead, above each block there is only written the date like Thursday 29 August 2013 3) I would like to restrict block 3 (scheduled tasks) to priorities A-C (Im also having D and E). How could I do that? 4) for block 3, I would like to split it into 2 parts: a) all tasks scheduled on day X sorted priority-down b) all tasks scheduled in the past, sorted priority-down and then scheduled-down Unfortunately, I do not know how to set the criteria for day X / before day X Thanks in advance for your help! Kind regards Martin
Re: [O] macro expansion in source code
Johannes Rainer johannes.rainer at gmail.com writes: hi, I was just wondering if there is a way to use macro expansion also in source code blocks or headers. I tried this, but the macro was never expanded, but rather the {{{image_width}}} was exported. could the expansion be done by calling the macro expansion before export (e.g. using a hook)? something like this: [snip] I think the answer is no. But you can accomplish much the same thing with properties and/or noweb references. Like this * header :PROPERTIES: :image_width: 16 :END: #+NAME: imwide #+HEADER: :var iw=(org-entry-get (point) image_width) #+BEGIN_SRC R :results value iw #+END_SRC #+RESULTS: imwide : 16 #+BEGIN_SRC R :noweb yes :results output image.width - imwide() image.width #+END_SRC #+RESULTS: : [1] 16
Re: [O] macro expansion in source code
thanks for that solution! I will give it a try! On Thu, Aug 29, 2013 at 5:15 PM, Charles Berry ccbe...@ucsd.edu wrote: Johannes Rainer johannes.rainer at gmail.com writes: hi, I was just wondering if there is a way to use macro expansion also in source code blocks or headers. I tried this, but the macro was never expanded, but rather the {{{image_width}}} was exported. could the expansion be done by calling the macro expansion before export (e.g. using a hook)? something like this: [snip] I think the answer is no. But you can accomplish much the same thing with properties and/or noweb references. Like this * header :PROPERTIES: :image_width: 16 :END: #+NAME: imwide #+HEADER: :var iw=(org-entry-get (point) image_width) #+BEGIN_SRC R :results value iw #+END_SRC #+RESULTS: imwide : 16 #+BEGIN_SRC R :noweb yes :results output image.width - imwide() image.width #+END_SRC #+RESULTS: : [1] 16 -- Johannes Rainer, PhD Applied Bioinformatics Group, Division Molecular Pathophysiology, Biocenter, Medical University Innsbruck, Innrain 80/82 II, 6020 Innsbruck, Austria and Tyrolean Cancer Research Institute Innrain 66, 6020 Innsbruck, Austria Tel.: +43 (0)512 9003 70961 Email: johannes.rai...@i-med.ac.at johannes.rai...@tcri.at URL: http://bioinfo.i-med.ac.at
[O] org-velocity only returns top-level headlines?
Hi, I'm using org 8.0.7 and I just installed org-velocity from git master. It seems to work, but when searching, it only displays top-level headlines. For example, I have a log.org file with a datetree like this: * 2013 ** 2013-07 July *** 2013-07-19 Friday Found a peanut last night *** 2013-07-24 Wednesday ... *** 2013-07-31 Wednesday When I use org-velocity-read to search for Wednesday, it shows one result that looks like this: 2013 ** 2013-07 July *** 2013-07-19 Friday ... Instead of showing individual subheadings that match the search, it flattens the tree to the top-level headline and shows a single result. It seems to me that it should show a list of results like this: *** 2013-07-24 Wednesday *** 2013-07-31 Wednesday I've looked through the page on Worg, the org-velocity customize group, the comments in org-velocity.el, and posts on this list, but this behavior doesn't seem documented. I looked through the elisp code and saw where it seems to only match top-level headlines, but I don't understand why it's written that way. It claims to support navigating any and all org files, but since it only matches top-level headings, it doesn't seem very useful for that. Am I missing something? Is there a simple way to change it to match subheadings? Thanks.
[O] gmx-test
Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Thanks for the patch. Here are some comments about it. Rasmus ras...@gmx.us writes: Currently one can't write something like \beta_t and get a nice result in org when exporting to LaTeX (where nice result := $\beta_t$). This patch tries to fix it. Translating \beta_t into $\beta$$_\text{t}$ and \beta_bar into $\beta$$ \text{bar}$ is intended. Unless you explicitly ask for math mode, Org defaults to text mode. The fact that it needs to go through math mode to insert some entities is not relevant. IOW, there's a difference between \beta_{$t$} and \beta_t. Also, merging consecutive subscript and superscript is fragile (and the code in `org-latex--script-size' could be improved in that area), as it also depends on user's filters. Here is a contrived example: Let's assume I have a filter which removes any subscript with the letter a in it. With the following code: \beta_a Trying to merge both the entity and the subscript will return $\beta which is wrong. As is evident from the pdf output $\alpha$$\beta$$_{\text{t}}$ ≠ $\alpha$$\beta$$_{{t}}$ ≠ $\alpha\beta_{t}$ There seems to be no difference between $\alpha$$\beta$ and $\alpha\beta$ in the pdf, but the latter is more aesthetically pleasing in the source. Beautifying LaTeX code is fine, unless it means adding yet another variable, and making some assumptions about user's configuration. If it ain't broken, don't fix it. Regards, -- . . . The proofs are technical in nature and provides no real understanding.
Re: [O] from Android to org's calendar in a painless way?
Charles Philip Chan writes: James Harkins writes: Also, calendar sync is not working on my Android 4 tablet after the most recent OS update from Asus. I've filed a bug report about that too, and asked on the mobileorg mailing list, but so far, no response. (This surprises me -- usually the list is pretty responsive.) Work find on my Nexus 7 with the latest Jelly Bean. I presume your tablet does not use vanilla Android. From https://github.com/matburt/mobileorg-android/issues/409 -- ~~ My tablet is an ASUS transformer pad TF300T. Android 4.2.1 Kernel version 3.1.10-g890b05a android@Taurus #1 Thu Jul 11 17:55:00 CST 2013 Build number JOP40D.US_epad-10.6.1.27.1-20130711 Calendar app version 4.2.1-US_epad-10.6.1.27.1-20130711 ~~ If you were asking if I've rooted my tablet, no, I haven't. It might be worth it if you checked your build number, to see if you're on the same base version (JOP40D) or earlier or later. Probably should also move this to the mobileorg mailing list, as this isn't strictly an org/emacs issue. Thanks for confirming that isn't a universal problem. hjh