Re: [O] Clocking work time vs. office time
On 2016-04-29, at 16:51, Brett Virenwrote: > Marcin Borkowski writes: > >> On 2016-04-29, at 11:21, Michael Welle wrote: >> >>> Marcin Borkowski writes: >>> I assume that you use a laptop or some other portable device? In that >>> case you can grep the IP address (which might change when you change >>> workplaces) and timestamps from the log files (or create a script that >>> logs the IP address changes to an ORG file) and then somehow (coughcough) >>> integrate that into your report. >> >> That's actually an interesting (and not standard) idea. Even moreso >> because I'm writing a RescueTime-like time-tracking tool for Emacs, >> working (unlike Org's clocking) without manual intervention - recording >> the state of computer (i.e., current idle time, active X window, active >> Emacs buffer name and mode) at regular (or not) intervals and making >> reports. I did not include any network-related info, but this would be >> easy to add. Thanks, I'll definitely think about it! > > Along similar lines, how about running a process on a computer near > where you dwell at work which watches for your mobile phone's bluetooth > ID. Recording when your phone enters/exits its range will sample the > time you are physically present. If you roam around at work you will > need to remember to visit the BT range at the start and at the end of > your day in order to get a full measure. And, you'll need to process > the samples to pull out the earliest/latest times to calculate the time > present. This post-processing can emit Org text or whatever format you > want. > > Looking at what bluetooth stuff is available on Ubuntu, "bluemon" seems > perfect for the heavy lifting. Your OS may vary. > > > There are also Android apps that do this kind of locating directly using > GPS/WiFi location and uploading the results to google drive or similar. > However, I've never managed to find one which I can make work reliably. Thanks, this is also interesting, though of no use for me personally; I turn bluetooth on very seldom on my phone (maybe every few months for a few minutes, when I want to send some pictures to my wife's phone or something). Similarly for the GPS; I use it much more often, but still not all the time. > -Brett. Thanks and best regards, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University
[O] Babel save code block results to many files
Hello, In the case where a code block generates many grahique, is it possible to output each graphic to a file direclty? For example in R you can do something like the following. png(file="example%02d.png", width=200, height=200) for (i in c(10:1, "G0!")){ plot.new() text(.5, .5, i, cex = 6) } dev.off() but the it seems that we don't have direct access to the png function in org-mode #+BEGIN_SRC R :results output graphics :file tmp.png for (i in c(10:1, "G0!")){ plot.new() text(.5, .5, i, cex = 6) } #+END_SRC Best regards, Jeremie
Re: [O] Result from evaluation of code in Title or footer (fancyhdr)?
Rainer M Krugwrites: > Hi > > I have a DESCRIPTION file, in which I store the version of the document, > which I extract with the following code: > > src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} > Have you looked at the latex package 'mversion'? I use it and have it working on my document, with it in the date place of my title it shows "Build - \version", and the "version.dat" shows '2.0;' meaning version 2.0 and it being increased in the '' field with every build. You can put it in your header or footer, whichever you want. Thanks Sharon. > > At the moment, I have one Header, which contains the version. > > * Version src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION}:paper: > :PROPERTIES: > :header-args: :exports results > :header-args+: :tangle no > :END: > Version src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} > > Is there a way, that I can have this dynamically in the Title of the > document, or in a footer after LaTeX export (using fancyhdr)? > > Thanks, > > Rainer -- A taste of linux = http://www.sharons.org.uk TGmeds = http://www.tgmeds.org.uk Debian 8.4, fluxbox 1.3.7, emacs 25.0.93 signature.asc Description: PGP signature
Re: [O] Result from evaluation of code in Title or footer (fancyhdr)?
On Monday, 2 May 2016 at 13:41, Rainer M Krug wrote: [...] > Is there a way, that I can have this dynamically in the Title of the > document, or in a footer after LaTeX export (using fancyhdr)? Maybe something along these lines: @@latex:\rfoot{@@ Version src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} @@latex:}@@ immediately after the first headline? Assumes fancyhdr. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412
Re: [O] Beamer \usebackgroundtemplate - better solution?
On Monday, 2 May 2016 at 10:02, Rainer M Krug wrote: > Hi > > I am using the following structure for \usebackgroundtemplate in Beamer: [...] > which works, but I don't like it that much because of the disconnected > nature of the beginning (in the header Overview...) and the closing > bracket (in the header without text). Also, this header without text is > rather fragile, as using tab on it, indents the header and does not fold > (cursor has to be on the stars to fold). Could you use headings that are ignored to make the layout more obvious? I do the following in documents, for instance: --8<---cut here---start->8--- ** (new page):ignoreheading: #+latex: \newpage --8<---cut here---end--->8--- with an appropriate filter that removes the headline with the ignoreheading tag from the export. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-739-g789412
Re: [O] Bug: empty ob-stan.el when installed from ELPA [8.3.4 (8.3.4-47-gaf853d-elpaplus @ /home/tamas/.emacs.d/elpa/org-plus-contrib-20160502/)]
Hello, Tamas Papp <tkp...@gmail.com> writes: > When installing org-plus-contrib from ELPA, the file ob-stan.el is empty > (length 0). This has been the situation for a while (see [1]), but > cloning from the master git repo [2] was a workaround, with the > expectation that this would eventually be fixed. However, the ELPA > version 20160502 has the same problem. The message you linked to didn't include the response from Nicolas (because it was in a later archive period, I think). Here it is: https://lists.gnu.org/archive/html/emacs-orgmode/2016-02/msg00054.html or http://thread.gmane.org/gmane.emacs.orgmode/104733 org-plus-contrib is generated from maint (the branch from which 8.3.* releases are being cut), and ob-stan.el was only introduced in the current master branch (what will be Org 9.0). However, I'm not sure why an empty ob-stan.el is included in the ELPA release, rather than there being no file at all. -- Kyle
[O] Bug: check that org-element--cache-sync-keys is non-nil before clrhash [8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/)]
Emacs : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5) of 2015-03-07 on trouble, modified by Debian Package: Org-mode version 8.3.4 (8.3.4-42-gae73c7-elpa @ /home/mah/.emacs.d/elpa/org-20160425/) I'm using org-mode by default for most buffers and, when using gnus-alias-use-identity, I get a backtrace because org-element--cache-sync-keys is set to nil. Patch to fix this: diff --git a/lisp/org-element.el b/lisp/org-element.el index d02b36c..760fce8 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -5121,7 +5121,8 @@ updated before current modification are actually submitted." ;; Otherwise, reset keys. (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) - (clrhash org-element--cache-sync-keys)) + (when org-element--cache-sync-keys +(clrhash org-element--cache-sync-keys))) (defun org-element--cache-process-request (request next threshold time-limit future-change) Edited backtrace: Debugger entered--Lisp error: (wrong-type-argument hash-table-p nil) clrhash(nil) (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* ((v next)) (aset v 3 (+ ... ...))) (aset next 2 (aref request 2 (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys))) (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add (current-time) org-element-cache-sync-duration)) future-change) (if next (progn (let* (...) (aset v 3 ...)) (aset next 2 (aref request 2 (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next (aref next 0)) threshold (and (not threshold) (time-add ... org-element-cache-sync-duration)) future-change) (if next (progn (let* ... ...) (aset next 2 ...))) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys) (if (buffer-live-p buffer) (progn (save-current-buffer (set-buffer buffer) (let ((inhibit-quit t) request next) (if org-element--cache-sync-timer (progn (cancel-timer org-element--cache-sync-timer))) (catch (quote interrupt) (while org-element--cache-sync-requests (setq request (car org-element--cache-sync-requests) next (nth 1 org-element--cache-sync-requests)) (org-element--cache-process-request request (and next ...) threshold (and ... ...) future-change) (if next (progn ... ...)) (setq org-element--cache-sync-requests (cdr org-element--cache-sync-requests (if org-element--cache-sync-requests (org-element--cache-set-timer buffer) (clrhash org-element--cache-sync-keys)) org-element--cache-sync(#>) apply(org-element--cache-sync #>) byte-code("r\301\302H\303H\"\210)\301\207" [timer apply 5 6] 4) timer-event-handler([t 0 0 60 nil org-element--cache-sync (#>) idle 0]) read-from-minibuffer("Identity: " nil ...) completing-read-default("Identity: " ...) completing-read("Identity: " ...) gnus-alias-identity-prompt() gnus-alias-use-identity() [SNIP]
[O] Result from evaluation of code in Title or footer (fancyhdr)?
Hi I have a DESCRIPTION file, in which I store the version of the document, which I extract with the following code: --8<---cut here---start->8--- src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} --8<---cut here---end--->8--- At the moment, I have one Header, which contains the version. --8<---cut here---start->8--- * Version src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION}:paper: :PROPERTIES: :header-args: :exports results :header-args+: :tangle no :END: Version src_sh{sed -n '/^Version: /s///p' ./DESCRIPTION} --8<---cut here---end--->8--- Is there a way, that I can have this dynamically in the Title of the document, or in a footer after LaTeX export (using fancyhdr)? Thanks, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982 signature.asc Description: PGP signature
[O] Beamer \usebackgroundtemplate - better solution?
Hi I am using the following structure for \usebackgroundtemplate in Beamer: --8<---cut here---start->8--- *** Overview of The Case Study :PROPERTIES: :header-args: :eval never-export :header-args+: :file-ext pdf :END: #+LATEX: { #+LATEX: \usebackgroundtemplate{ #+ATTR_LATEX: :width 1\paperwidth :height 1\paperheight :options keepaspectratio [[./bramble2.jpg]] #+LATEX: } Some slide - one - two - three *** #+LATEX: } --8<---cut here---end--->8--- which works, but I don't like it that much because of the disconnected nature of the beginning (in the header Overview...) and the closing bracket (in the header without text). Also, this header without text is rather fragile, as using tab on it, indents the header and does not fold (cursor has to be on the stars to fold). I assume that I can use org-beamer-environments-extra, but I don't really see how (I would like to have the image as an argument). I saw http://orgmode.org/worg/exporters/beamer/ox-beamer.html but this does not help me with using the image as an argument. Any suggestions? Thanks, Rainer -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982 signature.asc Description: PGP signature
Re: [O] :kkepaspectratio in included imad=ge in LaTeX export
Nicolas Goaziouwrites: > Hello, > > Rainer M Krug writes: > >> I would like to have the keepaspectratio attribute in the >> \includegraphice. >> >> I tried: >> >> #+ATTR_LATEX: :width 1\paperwidth :height 1\paperheight :keepaspectratio >> [[./bramble2.jpg]] >> >> but this results obviously in >> >> \includegraphics[width=1\paperwidth,height=1\paperheight]{./bramble2.jpg} >> >> as the option keepaspectratio does not exist in org. >> >> Is there a way that I can add arbitrary LaTeX option like >> keepaspectratio? > > You can use :options. See (info "(org) LaTeX specific attributes"). How could I miss that? No idea. Thanks a lot,works perfectly, Rainer > > Regards, -- Rainer M. Krug email: Rainerkrugsde PGP: 0x0F52F982 signature.asc Description: PGP signature
[O] PATCH: Add new output formats to plantuml
Hi attached please find a patch which adds additional output file types for plantuml. Cheers, Rainer From 839cb3194e6a40e577c5cab3b0a69961238924c9 Mon Sep 17 00:00:00 2001 From: "Rainer M. Krug"Date: Mon, 2 May 2016 11:00:23 +0200 Subject: [PATCH] lisp/op-plantuml.el: Add new output formats * lisp/ob-paltuml (org-babel-execute:plantuml): add new output formats of plantuml: - pdf : this needs extra java mudules to run which are mentioned on the plantml website (http://fr.plantuml.com/pdf.html) - vdx - xmi - scxml - html - txt (ascii art) - utxt (ascii art using unicode) The output format is based on the extension of the output file. --- lisp/ob-plantuml.el | 16 1 file changed, 16 insertions(+) diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el index 0e07f2d..6cc55a2 100644 --- a/lisp/ob-plantuml.el +++ b/lisp/ob-plantuml.el @@ -59,10 +59,26 @@ This function is called by `org-babel-execute-src-block'." (concat "java " java " -jar " (shell-quote-argument (expand-file-name org-plantuml-jar-path)) + (if (string= (file-name-extension out-file) "png") + " -tpng" "") (if (string= (file-name-extension out-file) "svg") " -tsvg" "") (if (string= (file-name-extension out-file) "eps") " -teps" "") + (if (string= (file-name-extension out-file) "pdf") + " -tpdf" "") + (if (string= (file-name-extension out-file) "vdx") + " -tvdx" "") + (if (string= (file-name-extension out-file) "xmi") + " -txmi" "") + (if (string= (file-name-extension out-file) "scxml") + " -tscxml" "") + (if (string= (file-name-extension out-file) "html") + " -thtml" "") + (if (string= (file-name-extension out-file) "txt") + " -ttxt" "") + (if (string= (file-name-extension out-file) "utxt") + " -utxt" "") " -p " cmdline " < " (org-babel-process-file-name in-file) " > " -- 2.8.2 -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D):+49 - (0)3 21 21 25 22 44 email: rai...@krugs.de Skype: RMkrug PGP: 0x0F52F982 signature.asc Description: PGP signature
[O] Bug: empty ob-stan.el when installed from ELPA [8.3.4 (8.3.4-47-gaf853d-elpaplus @ /home/tamas/.emacs.d/elpa/org-plus-contrib-20160502/)]
This is about the ELPA package org-plus-contrib, but I could not find a more specific place to report it. When installing org-plus-contrib from ELPA, the file ob-stan.el is empty (length 0). This has been the situation for a while (see [1]), but cloning from the master git repo [2] was a workaround, with the expectation that this would eventually be fixed. However, the ELPA version 20160502 has the same problem. [1] https://lists.gnu.org/archive/html/emacs-orgmode/2016-01/msg00487.html [2] git://orgmode.org/org-mode.git Emacs : GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9) of 2016-04-25 Package: Org-mode version 8.3.4 (8.3.4-47-gaf853d-elpaplus @ /home/tamas/.emacs.d/elpa/org-plus-contrib-20160502/)
Re: [O] New Beamer environment selection problem
Nicolas Goaziouwrites: Greetings. >> Debugger entered--Lisp error: (wrong-number-of-arguments max 0) >> max() >> apply(max nil) >> org-fast-tag-selection(nil nil nil nil) >> org-set-tags() >> org-beamer-select-environment() >> call-interactively(org-beamer-select-environment nil nil) >> command-execute(org-beamer-select-environment) > > Would the following patch solve the issue? Instead of applying the patch to my current org source, I just pulled the latest git version and the problem seems to have dissappeared. So assuming that you already applied the patch to the latest git version, yes this patch solved the issue. Thanks a lot, once again! Jarmo