Re: [O] remote execution in heterogeneous environment
Neil Best writes: Hi, > I run Macport's Emacs and ELPA's Org on my Mac but my data lives in a > Red Hat environment. I thought I could edit locally and compute > remotely but there seems to be a problem with temp files for executing > source blocks. > > #+BEGIN_SRC sh :dir /midway:~ echo "Executed by `whoami` on `hostname` > in `pwd`" #+END_SRC > > Results are empty and in the message buffers appears this: > > executing Sh code block... Tramp: Opening connection for midway using > ssh... > > Opening connection for midway using ssh... \ Tramp: Opening connection > for midway using ssh...done Tramp: Encoding region using function > `base64-encode-region'...done Tramp: Decoding region into remote file > /ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN...done > byte-code: Couldn't write region to > `/ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN', > decode using `base64 -d -i >%s' failed Which version of Tramp are you using? You find it by "C-h v tramp-version". I remember a problem with remote temporary directories, fixed in Tramp 2.2.6. Btw, I don't use org. For local tests, what shall I apply in order to execute the code in #+BEGIN_SRC ... #+END_SRC? Best regards, Michael (Tramp maintainer).
[O] org-columns slowness with fairly large files (~700 lines)
Hello, I'm facing a slowness while using org-columns mode on a fairly large file of mine with around 700 lines split between 3 outlines. My column definition is the following: :PROPERTIES: :COLUMNS: %50ITEM %Director %Year %WATCHED{X/} :WATCHED_ALL: "[ ]" "[X]" :END: The slowness is observed when I change the value of the WATCHED property to the next value. Attached you can find the point where I found the slowness after elp-instrumenting everything I could think of: org-columns-compute1 4.310940636 4.310940636 org-get-property-block 786 2.4934241719 0.0031722953 re-search-forward 39191.4093316059 0.0003596151 org-before-first-heading-p 786 0.7155264029 0.0009103389 re-search-backward 15730.4510285690 0.0002867314 org-update-property-plist 780 0.2562820100 0.0003285666 org-remove-if 780 0.2458024500 0.0003151313 org-columns-string-to-number 780 0.0475362070 6.094...e-05 org-back-to-heading787 0.0263376949 3.346...e-05 org-outline-level 787 0.0196983080 2.502...e-05 org-re-property15640.0084069410 5.375...e-06 org-end-of-subtree 1 0.007929779 0.007929779 org-match-string-no-properties 780 0.0048964310 6.277...e-06 org-not-nil780 0.002704256 3.466...e-06 org-columns-number-to-string 6 0.000193883.231...e-05 org-nofm-to-completion 6 0.000100014 1.6669e-05 org-add-props 6 4.5256e-057.542...e-06 It seems strange to me that switching to the next value of a cell, a call to org-columns-compute is needed. As you can see org-get-property-block is calles 786 times (which is rougly the number of all-level entries in this particular org file). Is there any way to make things faster? Best Regards, Leonidas Tsampros
[O] writing research articles with org-mode
Hello, I need an example of research article written with org-mode by personal purposes. Who can I help me? Thanks in advance. -- David Arroyo Menéndez http://www.davidam.com gpg --keyserver pgp.rediris.es --recv-keys B395B90A
Re: [O] remote execution in heterogeneous environment
On Thu, Nov 29, 2012 at 1:25 PM, Nick Dokos wrote: > >> But your earlier mail says that it is trying to create the temp file on the >> remote >> >> , >> | > Tramp: Decoding region into remote file >> | > >> /ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN...done >> | > byte-code: Couldn't write region to >> | > >> `/ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN' >> ` >> >> Not sure what causes tramp to use /var/folders/2y for remote temp files >> but that seems to be the main problem here. >> > > If you evaluate > >(tramp-compat-temporary-file-directory) > > on your local system, what do you get? > > tramp may be assuming that whatever temp directory you are using > on your local system should work on the remote as well, an > assumption that's not true in your case. You may have to provide > your own function to get around this - or use /tmp just like the > rest of the world. > It's exactly as you suspected, Nick. That crazy /var/folders/... value was apparently hard-coded in the value of temporary-file-directory out of the box. That must be something that happens in Macports. When I changed it to "/tmp" things appear to work better: #+BEGIN_SRC sh :dir /midway:~ echo "Executed by `whoami` on `hostname` in `pwd`" #+END_SRC #+RESULTS: : Executed by nbest on lep in /Users/nbest The temp file problem was preventing any results from appearing, but now we see that the code is being executed locally, as suspected. There is a work-around for this, however: M-x ssh. #+BEGIN_SRC sh :session *ssh-midway* echo "Executed by `whoami` on `hostname` in `pwd`" #+END_SRC #+RESULTS: : Executed by nbest on midway-login1 in /pwd/from/that/session This opens up some possibilities but probably does not address the shortcomings detailed in the thread that Nick points to. The elisp hacking going on there is over my head so I will play with this some more and watch for updates.
Re: [O] remote execution in heterogeneous environment
On Thu, Nov 29, 2012 at 11:16 AM, Nick Dokos wrote: > It looks as if you are creating temp files under /var/folders/2y on the > remote: are you sure that a) the structure exists and b) permissions are > set correctly? > > Do you have the /var/folders/2y structure on the local host or only on > the remote? If only on the remote and the source block is running > locally (because of the funcall bug), that would sort-of explain this > behavior. > /var/folders/2y is peculiar to the local host, my Mac. I am pretty sure that this is a Mac (BSD?) idiom for temp files. /var on the remote is for root only and I have no influence over its permissions. By the way I have also tried this with ":session *ssh-midway*" in the header pointing to a session started with M-x ssh -- same results. In case more precision about my (org-version) is helpful: Org-mode version 7.9.2 (7.9.2-82-g2aeb28-elpa @ /Users/nbest/.emacs.d/elpa/org-20121112/)
Re: [O] Exchange calendar to orgmode (Chris Raschl)
Hi Russell, On 11/29/2012 06:35 PM, Russell Carden wrote: Can you tell me more about your script or about how a calendar in an exchange server works. All it does is fetch your calendar and use the subject as headline and formats the date scheduled in the event so orgmode can pick it up. Each event has a unique id? On the exchange server side, i guess. But it's not used in my script. Do you dump this info into your org-file. It does write the result to stdout. I use a cronjob to execute it and redirect it's output into a file which is configured as agenda file in orgmode. Does your script sync the org-file with the exchange server? No. It's just exchange to orgmode. It does no sync at all. > Would it be possible to create a link from org-mode that would open up a particular event in your exchange calendar? Possibly to the OWA webinterface. But I'm not sure about that. Wouldn't you prefer to discuss this on the list? Maybe others are interested too... - chris
Re: [O] remote execution in heterogeneous environment
Neil Best wrote: > I run Macport's Emacs and ELPA's Org on my Mac but my data lives in a > Red Hat environment. I thought I could edit locally and compute > remotely but there seems to be a problem with temp files for executing > source blocks. > > #+BEGIN_SRC sh :dir /midway:~ echo "Executed by `whoami` on `hostname` > in `pwd`" #+END_SRC > > Results are empty and in the message buffers appears this: > > executing Sh code block... Tramp: Opening connection for midway using > ssh... > > Opening connection for midway using ssh... \ Tramp: Opening connection > for midway using ssh...done Tramp: Encoding region using function > `base64-encode-region'...done Tramp: Decoding region into remote file > /ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN...done > byte-code: Couldn't write region to > `/ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN', > decode using `base64 -d -i >%s' failed > > I suspect this has something to do with how Emacs asks OSX for temp > file names. Can anyone confirm this? Is there a work-around? > It may be that the fix I pointed to in the previous email will change this (who knows? it may even fix it :-) ) But there is one additional point that you might want to check. It looks as if you are creating temp files under /var/folders/2y on the remote: are you sure that a) the structure exists and b) permissions are set correctly? Do you have the /var/folders/2y structure on the local host or only on the remote? If only on the remote and the source block is running locally (because of the funcall bug), that would sort-of explain this behavior. Nick
Re: [O] remote execution in heterogeneous environment
Neil Best wrote: > I run Macport's Emacs and ELPA's Org on my Mac but my data lives in a > Red Hat environment. I thought I could edit locally and compute > remotely but there seems to be a problem with temp files for executing > source blocks. > > #+BEGIN_SRC sh :dir /midway:~ echo "Executed by `whoami` on `hostname` > in `pwd`" #+END_SRC > > Results are empty and in the message buffers appears this: > > executing Sh code block... Tramp: Opening connection for midway using > ssh... > > Opening connection for midway using ssh... \ Tramp: Opening connection > for midway using ssh...done Tramp: Encoding region using function > `base64-encode-region'...done Tramp: Decoding region into remote file > /ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN...done > byte-code: Couldn't write region to > `/ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN', > decode using `base64 -d -i >%s' failed > > I suspect this has something to do with how Emacs asks OSX for temp > file names. Can anyone confirm this? Is there a work-around? > Not sure about this. > Ultimately I want to inspect the environment where the remote > execution is happening. We use a system called Modules [1] to > customize $PATH, etc. When I try this: > > #+BEGIN_SRC sh :dir /midway:~ module list #+END_SRC > > I get "sh: line 1: module: command not found" which makes me think > that the command is running on the local system where Modules is not > installed. How does this square with the discussion at [2]? > But here you are probably right: see the thread at http://thread.gmane.org/gmane.emacs.orgmode/60102 and particularly this post: http://thread.gmane.org/gmane.emacs.orgmode/60102/focus=62587 It might be worth trying the fix in that mail (the funcall part), although it is known to be incomplete (at the very least: there are a few more things that seem to go wrong). Nick > > [1] http://modules.sourceforge.net/ > > [2] > http://lists.gnu.org/archive/html/emacs-orgmode/2010-03/msg00071.html >
Re: [O] Exchange calendar to orgmode
I've been slowly starting to learn about org-mode. So far it's mostly been a flexible document format for me. (Very good for tracking software issues, design, strategy, etc.) Getting access to my calendar off of our exchange server, however, might be the push I need to dive in deep! Thanks. ,Doug > -Original Message- > From: emacs-orgmode-bounces+dougl=shubertticketing@gnu.org > [mailto:emacs-orgmode-bounces+dougl=shubertticketing@gnu.org] On > Behalf Of Chris Raschl > Sent: Thursday, 2012 November 29 11:17 > To: emacs-orgmode@gnu.org > Subject: [O] Exchange calendar to orgmode > > Hi all, > I recently wrote a python script to fetch my calendar from the > corporate > exchange server into an orgmode file to view it in my agenda. > It uses the exchange webservices (ews). > > There are lots of things that could be added, but I thought I'd share > it > as-is. Maybe somebody can use it... > > https://github.com/kautsig/ews-orgmode > > Regards, > chris
[O] remote execution in heterogeneous environment
I run Macport's Emacs and ELPA's Org on my Mac but my data lives in a Red Hat environment. I thought I could edit locally and compute remotely but there seems to be a problem with temp files for executing source blocks. #+BEGIN_SRC sh :dir /midway:~ echo "Executed by `whoami` on `hostname` in `pwd`" #+END_SRC Results are empty and in the message buffers appears this: executing Sh code block... Tramp: Opening connection for midway using ssh... Opening connection for midway using ssh... \ Tramp: Opening connection for midway using ssh...done Tramp: Encoding region using function `base64-encode-region'...done Tramp: Decoding region into remote file /ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN...done byte-code: Couldn't write region to `/ssh:midway:/var/folders/2y/qrw3hhkx0dlb9sbl51mjy5wmgn/T/sh-510999vN', decode using `base64 -d -i >%s' failed I suspect this has something to do with how Emacs asks OSX for temp file names. Can anyone confirm this? Is there a work-around? Ultimately I want to inspect the environment where the remote execution is happening. We use a system called Modules [1] to customize $PATH, etc. When I try this: #+BEGIN_SRC sh :dir /midway:~ module list #+END_SRC I get "sh: line 1: module: command not found" which makes me think that the command is running on the local system where Modules is not installed. How does this square with the discussion at [2]? [1] http://modules.sourceforge.net/ [2] http://lists.gnu.org/archive/html/emacs-orgmode/2010-03/msg00071.html
[O] Exchange calendar to orgmode
Hi all, I recently wrote a python script to fetch my calendar from the corporate exchange server into an orgmode file to view it in my agenda. It uses the exchange webservices (ews). There are lots of things that could be added, but I thought I'd share it as-is. Maybe somebody can use it... https://github.com/kautsig/ews-orgmode Regards, chris
[O] Bug: hl-line obscures org-habit tracking in agenda [7.8.11]
Hello, I'm using org-habit to track habits in the agenda view, displaying the consistency graph. I'm also using hl-line to highlight the line the cursor is on. When the habit line is highlighted, the line highlight obscures the consistency graph. It seems behavior should be opposite -- i.e: the consistency graph should lie atop the highlight bar, such that the graph is visible when the line is highlighted. Thanks! Emacs : GNU Emacs 24.2.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-08-27 on bob.porkrind.org Package: Org-mode version 7.8.11 current state: == (setq org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code) org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-agenda-start-on-weekday nil org-export-preprocess-before-normalizing-links-hook '(org-remove-file-link-modifiers) org-confirm-shell-link-function 'yes-or-no-p org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc org-beamer-auto-fragile-frames org-beamer-place-default-actions-for-lists) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-agenda-skip-scheduled-if-done t org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-tags-column 80 org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-export-latex-format-toc-function 'org-export-latex-format-toc-default org-export-blocks '((src org-babel-exp-src-block nil) (export-comment org-export-blocks-format-comment t) (ditaa org-export-blocks-format-ditaa nil) (dot org-export-blocks-format-dot nil)) org-agenda-tags-column 93 org-export-first-hook '(org-beamer-initialize-open-trackers) org-export-interblocks '((src org-babel-exp-non-block-elements)) org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo org-habit org-irc org-mew org-mhe org-rmail org-vm org-wl org-w3m) org-agenda-ndays 9 org-deadline-warning-days 0 org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-habit-graph-column 75 org-agenda-files '("~/Vazhno/Logs/ToDo/todo.org") org-clock-out-hook '(org-clock-remove-empty-clock-drawer) ) -- Boyan Penkov