[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] Scaling of image previews in org-mode
The following attribute worked for me to scale image: #+attr_html: :width 100px But I had to build emacs25 in OS X with ImageMagick support. On Thu, Aug 4, 2016 at 1:26 AM, Johannes Brauer <bra...@nordakademie.de> wrote: > I think my Aquamacs 3.2 GNU Emacs 24.4.51.2 has got ImageMagick support. > > Am 04.08.2016 um 00:09 schrieb Giri Prashanth <giri.prasha...@gmail.com>: > > I think you need to build emacs with ImageMagick support for image > scaling to work. > > > On Wed, Aug 3, 2016 at 12:20 PM, Johannes Brauer <bra...@nordakademie.de> > wrote: > >> Hi! >> >> If I insert a jpg in my org-mode document, I can preview it but not scale >> its width, like so: >> >> Add the following code to my init.el file: >> (setq org-image-actual-width nil) >> >> Then insert this code in my document, where I want the image to appear: >> #+ATTR_ORG: :width 20 >> [[./test.jpg]] >> >> No matter which value I give for the width argument the image appears in >> the buffer always in its original size. >> >> However, scaling for html export with #+attr_html works fine. >> >> What is going wrong? >> >> (Org-mode version 8.3.4 (8.3.4-99-ga8e4a3-elpa @ >> /Users/johannes/Library/Preferences/Aquamacs >> Emacs/Packages/elpa/org-20160704/) >> >> Johannes >> > > > > -- > -giri > > > -- -giri
Re: [O] Scaling of image previews in org-mode
I think you need to build emacs with ImageMagick support for image scaling to work. On Wed, Aug 3, 2016 at 12:20 PM, Johannes Brauerwrote: > Hi! > > If I insert a jpg in my org-mode document, I can preview it but not scale > its width, like so: > > Add the following code to my init.el file: > (setq org-image-actual-width nil) > > Then insert this code in my document, where I want the image to appear: > #+ATTR_ORG: :width 20 > [[./test.jpg]] > > No matter which value I give for the width argument the image appears in > the buffer always in its original size. > > However, scaling for html export with #+attr_html works fine. > > What is going wrong? > > (Org-mode version 8.3.4 (8.3.4-99-ga8e4a3-elpa @ > /Users/johannes/Library/Preferences/Aquamacs > Emacs/Packages/elpa/org-20160704/) > > Johannes > -- -giri
Re: [O] error on make
Thank you for your response. I have GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) . One possibility is that in OS X, there is a default emacs with version 22.1.1. I tried brew update but I think for some reason it is not updated and may cause for this problem. Is there a way to specify the location of emacs application and site-lisp folder in the config or Makefile ? I tried adding path manually in the prefix argument in local.mk but was not sucessful. Thank you again, On Tue, Jul 26, 2016 at 11:21 PM, Nicolas Goaziou <m...@nicolasgoaziou.fr> wrote: > Hello, > > Giri Prashanth <giri.prasha...@gmail.com> writes: > > > I got the following error while I ran make on latest org-mode code from > git > > got from git://orgmode.org/org-mode.git in OS X: > > > > rm -f > > /Applications/Xcode.app/Contents/Developer/usr/bin/make -C lisp clean > > rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc > > org-install.elc > > rm -f *.elc > > /Applications/Xcode.app/Contents/Developer/usr/bin/make -C lisp autoloads > > rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc > > org-install.elc > > org-version: 8.3.5 (release_8.3.5-1027-g04e0bc) > > Loading ~/.emacs.d/org-mode/lisp/org-compat.el (source)... > > Cannot open load file: cl-lib > > make[1]: *** [org-version.el] Error 255 > > make: *** [autoloads] Error 2 > > > > > > Any ideas on how to fix ? > > What is your Emacs version? Development branch requires at least Emacs > 24.3. > > > Regards, > > -- > Nicolas Goaziou >
[O] error on make
Hi, I got the following error while I ran make on latest org-mode code from git got from git://orgmode.org/org-mode.git in OS X: rm -f /Applications/Xcode.app/Contents/Developer/usr/bin/make -C lisp clean rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc rm -f *.elc /Applications/Xcode.app/Contents/Developer/usr/bin/make -C lisp autoloads rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc org-version: 8.3.5 (release_8.3.5-1027-g04e0bc) Loading ~/.emacs.d/org-mode/lisp/org-compat.el (source)... Cannot open load file: cl-lib make[1]: *** [org-version.el] Error 255 make: *** [autoloads] Error 2 Any ideas on how to fix ? Thank you in advance.
[O] Any existing function to copy the src block to clipboard
Hi, Is there a easy way to copy the entire contents of the current src block cursor is located to clipboard ? Thank you for your responses in advance. -GP
Re: [O] [0] Run org-babel src block periodically
Thank you. This works great. -GP On Sun, Jan 3, 2016 at 2:30 PM, John Kitchin <jkitc...@andrew.cmu.edu> wrote: > This is kind of close to what you want I think (at least it updates > every 5 seconds for me, 5 times before it stops). You might adapt it to > do what you want. > > This is the block to run periodically. > #+name: time-string > #+BEGIN_SRC sh > date > top -o "cpu" -ncols 4 -l 1| head -n 15 > #+END_SRC > > #+RESULTS: time-string > #+begin_example > Sun Jan 3 17:28:27 EST 2016 > Processes: 225 total, 2 running, 3 stuck, 220 sleeping, 1110 threads > 2016/01/03 17:28:27 > Load Avg: 1.20, 1.51, 1.55 > CPU usage: 5.0% user, 22.50% sys, 72.50% idle > SharedLibs: 14M resident, 12M data, 0B linkedit. > MemRegions: 57263 total, 3092M resident, 72M private, 450M shared. > PhysMem: 6508M used (1098M wired), 1246M unused. > VM: 588G vsize, 1067M framework vsize, 6471076(0) swapins, 6831574(0) > swapouts. > Networks: packets: 190809878/201G in, 277243826/231G out. > Disks: 11873268/180G read, 10075469/265G written. > > PIDCOMMAND %CPU TIME > 96378 com.apple.InputM 0.0 00:00.26 > 96376 AppleSpell 0.0 00:00.68 > 96015 head 0.0 00:00.00 > #+end_example > > This function will update that block. We increment a counter and cancel > the timer when it is exceeded. > #+BEGIN_SRC emacs-lisp > (defun update-src-block (fname src-name N) > "Update the src-block named SRC-NAME in the file FNAME upto N times." > (if (> *counter* N) > (progn (cancel-timer *timer*) > (message-box "Done with timer")) > (save-excursion > (with-current-buffer (find-file-noselect fname) > (org-babel-goto-named-src-block src-name) > (org-babel-execute-src-block) > (incf *counter*) > #+END_SRC > > #+RESULTS: > : update-src-block > > We use a global var for the counter and timer. > #+BEGIN_SRC emacs-lisp > (setq *counter* 0) > (setq *timer* (run-with-timer >nil 5 >'update-src-block >"/Users/jkitchin/ > blogofile-jkitchin.github.com/_blog/blog.org" > "time-string" >5)) > #+END_SRC > > #+RESULTS: > : [nil 22153 41074 708648 5 update-src-block ("/Users/jkitchin/ > blogofile-jkitchin.github.com/_blog/blog.org" "time-string" 5) nil 0] > > > Giri Prashanth writes: > > > Hi, > > > > I would like to run a org-src block code periodically, is there any > > property for org-blocks for such repeated execution. > > > > For example if I want to watch the tail of a file periodically every 1 > min > > for next 1 hour, I would like to set a property like repeat for times to > > repeat and keep the org file auto updated > > > > #+BEGIN_SRC shell :repeat 60 :repeat-every 60sec > > tail -n 10 file > > #+END_SRC > > > > Thank you, > > -GP > > -- > 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 > -- -giri
[O] [0] Run org-babel src block periodically
Hi, I would like to run a org-src block code periodically, is there any property for org-blocks for such repeated execution. For example if I want to watch the tail of a file periodically every 1 min for next 1 hour, I would like to set a property like repeat for times to repeat and keep the org file auto updated #+BEGIN_SRC shell :repeat 60 :repeat-every 60sec tail -n 10 file #+END_SRC Thank you, -GP
Re: [O] Org-babel shell evaluate with session does not return results
Thank you for testing, I have Org-mode version 8.3.2 (8.3.2-37-gd45217-elpa @ ~/.emacs.d/elpa/org-20151123/) with Emacs version GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org I am on MAC OS X with emacs from http://emacsforosx.com Thank you, -GP On Sat, Nov 28, 2015 at 11:17 AM, Grant Rettke <g...@wisdomandwonder.com> wrote: > On Thu, Nov 19, 2015 at 12:28 PM, Giri Prashanth > <giri.prasha...@gmail.com> wrote: > > Any reason why org babel execute for shell with session does not > terminate ? > > Thank you very much in advance for any response, > > Just ran this code and got the following results... > > #+NAME: 4AFF24E4-43CF-4FFF-A9E9-4896630C977D > #+BEGIN_SRC shell :session test > echo foo > #+END_SRC > > #+RESULTS: 4AFF24E4-43CF-4FFF-A9E9-4896630C977D > #+BEGIN_EXAMPLE > | foo | > #+END_EXAMPLE > > Org version from Git: “8.3.2” > > Emacs version: “24.5.1” > > What versions are you on? > -- -giri
[O] Org-babel shell evaluate with session does not return results
Hi, I am trying to run a shell commands from org-mode with using sessions. I would like to use the session property, so I could continue with the previous history. But when I execute the following, #+BEGIN_SRC shell :session test echo foo #+END_SRC nothing happens with emacs is unresponsive and the echo area says: executing Shell code block... I am able to quit with C-g and there is buffer with name test created which has bash prompt. I was also able to run the shell commands without session and it returns the output, like below #+BEGIN_SRC shell echo foo #+END_SRC #+RESULTS: : foo Any reason why org babel execute for shell with session does not terminate ? Thank you very much in advance for any response, -GP