raw replace not working

2020-03-11 Thread Roger Mason
Hello, I using Org mode version 9.2.3 (release_9.2.3-390-gfb5091 @ /home/rmason/.emacs.d/org-git/lisp/) in GNU Emacs 26.3 (build 1, amd64-portbld-freebsd11.3, X toolkit, Xaw3d scroll bars). Here is an ECM: #+begin_src shell :results raw replace #!/usr/bin/env zsh mkdir -p Supercell for i in 1

Re: [O] Output result of source block to a file

2019-06-08 Thread Roger Mason
Hello John, John Kitchin writes: > you probably figured out the "import io" and "f = io..." line are not > necessary here. Indeed. > I couldn't figure out a reasonable way to use :results graphics link > that didn't result in repeating the filename more than desired. These > also both work,

Re: [O] Output result of source block to a file

2019-06-07 Thread Roger Mason
Hello John, John Kitchin writes: > I think you can use something like this: > > #+BEGIN_SRC python :results output file :var fname="test.png" > import matplotlib.pyplot as plt > import io > > f = io.StringIO() > plt.plot([1, 2, 3, 17]) > plt.savefig(fname) > print(fname, end='') > #+END_SRC > >

Re: [O] Output result of source block to a file

2019-06-06 Thread Roger Mason
Hello again, stardiviner writes: > Roger Mason writes: > >> Hello, >> >> I want to output the result of the evaluation of a (python) source block >> to a (graphics) file and have a link to the file inserted in the buffer. > > For this, you should try upd

Re: [O] Output result of source block to a file

2019-06-06 Thread Roger Mason
Hello, Ken Mankoff writes: > > What about :var file="scaleplot02.pdf". That was my starting point, but the resulting link is prefixed by ':' Perhaps I should upgrade org. Cheers, Roger

Re: [O] Output result of source block to a file

2019-06-06 Thread Roger Mason
Hello, stardiviner writes: > Roger Mason writes: > >> Hello, >> >> I want to output the result of the evaluation of a (python) source block >> to a (graphics) file and have a link to the file inserted in the buffer. >> #+begin_src python :results value

[O] Output result of source block to a file

2019-06-05 Thread Roger Mason
Hello, I want to output the result of the evaluation of a (python) source block to a (graphics) file and have a link to the file inserted in the buffer. Here is the code: #+begin_src python :results value file :file scaleplot02.pdf :exports results :var data=test import matplotlib.pyplot as

Re: [O] Mean of a column in a remote table

2018-12-13 Thread Roger Mason
Hello Eric, Eric S Fraga writes: > Umm, I think you want to do the mean of the remote entries so try: > vmean(remote($1,@2..@>)) but I also wonder whether you need to specify > the column as well for remote references? At least, when I have done > this, I have specified both rows and columns,

Re: [O] Mean of a column in a remote table

2018-12-13 Thread Roger Mason
Hello Eric, Eric S Fraga writes: > That should have been @>, not @<. | Data | a | |---+| | mic_2_in_648_cell | #ERROR | #+tblfm: $2=remote($1,vmean(@2..@>)) and 'Cells in the region copied, use M-x org-table-paste-rectangle to paste them in a table.'

[O] Mean of a column in a remote table

2018-12-13 Thread Roger Mason
Hello, I _think_ this question has a simple answer, but I cannot find it. I need the mean of a column in a remote table. My current attempt looks like this: | Data | a | |---+---| | mic_2_in_648_cell | | #+tblfm: $2=remote($1,vmean(@2..@-1)) #+name:

Re: [O] Koma letter fails [SOLVED]

2018-07-16 Thread Roger Mason
Hello, Roger Mason writes: > I just attempted to use the koma-letter module but it fails: > > concat: Symbol’s function definition is void: org-latex--make-preamble > > I'm guessing some other symbol has replaced it, but what? > Found I was using version of ox-koma-letter.el

[O] Koma letter fails

2018-07-16 Thread Roger Mason
Hello, I just attempted to use the koma-letter module but it fails: concat: Symbol’s function definition is void: org-latex--make-preamble I'm guessing some other symbol has replaced it, but what? Cheers, Roger GNU Emacs 25.3.1 (amd64-portbld-freebsd11.1, GTK+ Version 3.22.29) of 2018-04-24

Re: [O] Symbol’s value as variable is void: haskell-prompt-regexp

2018-06-04 Thread Roger Mason
Hello, Nick Dokos writes: > Please provide a backtrace. This source block: #+begin_src haskell :exports results nanmol=[1,1,3,2,1,2,3] ncatmol=[2,1,2,1,2,1,2] #+end_src produces the error in the attached backtrace Steps to reproduce: 1. emacs -Q -l init with init being: Org-mode

Re: [O] Symbol’s value as variable is void: haskell-prompt-regexp

2018-06-04 Thread Roger Mason
Hello, Nick Dokos writes: > Try evaluating > > (require 'inf-haskell) > > and then try evaluating the source code block again. > > Untested. That seems to have helped, but now I'm getting: ‘org-babel-script-escape’ expects a string Many thanks, Roger

[O] Symbol’s value as variable is void: haskell-prompt-regexp

2018-06-04 Thread Roger Mason
Hello, GNU Emacs 25.3.1 (i386-portbld-freebsd11.1, GTK+ Version 3.22.29) of 2018-04-26 Org mode version 9.1.13 (release_9.1.13-784-ged7d1d @ /home/rmason/.emacs.d/org-git/lisp/) Attempting to run a haskell code block: #+begin_src haskell :exports results

[O] [OT] nobody (none)

2018-03-26 Thread Roger Mason
Hello, An off topic problem. I'm asking here because I noticed this problem first in this list, but it has spread. I read e-mail using gnus (v5.13) in emacs (25.3.1) on FreeBSD (10.3). Some months ago I noticed some messages in this list displaying with sender 'nobody' and subject '(none)' in

Re: [O] C++ code block not linked [SOLVED]

2017-11-29 Thread Roger Mason
Hello, Nick Dokos writes: > All very good info, but why did the OP not have a g++? Using a > non-linux operating system? Using a non-GNU tool chain? Inquiring > minds want to know... Running on FreeBSD 10.3, which uses clang/clang++ by default. That said, I _do_ have gcc

Re: [O] C++ code block not linked [SOLVED]

2017-11-28 Thread Roger Mason
Hello, Roger Mason <rma...@mun.ca> writes: > It compiles fine: > > c++ -std=c++11 -I/usr/local/include -L/usr/local/lib -lginac > C-src-1053hn1.cpp Solved by setting: (setq org-babel-C++-compiler "c++") I don't recall having had to do this before. Phew! Very gla

Re: [O] C++ code block not linked

2017-11-27 Thread Roger Mason
Hello Thierry, Thierry Banel writes: > You may try to mimic org-babel in a shell, and see what happens. > > cd /tmp/babel-29466ws7 > g++ -std=c++11 -I/usr/local/include C-src-29466moy.cpp -L/usr/local/lib > -lginac > > (of course you need to change the random names like

Re: [O] C++ code block not linked

2017-11-26 Thread Roger Mason
Hello, Thierry Banel <tbanelweb...@free.fr> writes: > On 25/11/2017 15:59, Roger Mason wrote: >> This code compiles fine on command line but org-babel can't link it. >> >> #+BEGIN_SRC C++ :flags "-std=c++11 -I/usr/local/include" :libs >> "-L

[O] C++ code block not linked

2017-11-25 Thread Roger Mason
Hello, This code compiles fine on command line but org-babel can't link it. #+BEGIN_SRC C++ :flags "-std=c++11 -I/usr/local/include" :libs "-L/usr/local/lib -lginac" #include #include using namespace std; using namespace GiNaC; int main () { symbol a("a"), b("b"), x("x"), y("y");

[O] Troublesome python block

2017-10-11 Thread Roger Mason
hello, This python block: #+BEGIN_SRC python :session true :results output import numpy as np from ase import Atoms from ase.calculators.gulp import GULP, Conditions quartz = Atoms(symbols='Si3O6', pbc=np.array([True,True,True], dtype=bool), cell=np.array([[4.916, 0.0, 0.0],

Re: [O] including an image in LaTeX export

2017-04-26 Thread Roger Mason
Hi Nicolas, Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Roger Mason <rma...@mun.ca> writes: >> >> I need to include an image in a document to be exported to LaTeX. > It should be: > > [[file:macstuff.jpg]] Many thanks. As I said earlier, been away from Org for a while. Cheers, Roger

Re: [O] including an image in LaTeX export

2017-04-26 Thread Roger Mason
John Kitchin writes: > You aren't using a path. Try [[./macstuff.jpg]] instead. > That was it. Must have been away from Org for too long. Thanks, Roger

[O] including an image in LaTeX export

2017-04-26 Thread Roger Mason
Hello, I need to include an image in a document to be exported to LaTeX. Minimal example: #+TITLE: test * test section [[macstuff.jpg]] When running the export I get "user-error: Unable to resolve link: nil". I've tried including the image as eps, to no avail. Can someone tell me what I'm

Re: [O] Table formula from code block

2017-01-24 Thread Roger Mason
Hello Roland and Michael, Thank you both for looking at this. Roland Everaert writes: > I will try to look at how I used org-sbe, but I do remind that I had to do > the following (exerpt from a post on > the list by me on the same subjet): > > "It works. But I had to set

[O] Table formula from code block

2017-01-22 Thread Roger Mason
Hello, I have these code blocks: #+BEGIN_SRC sh :tangle "skribilo_to_engine.sh" #!/usr/local/bin/bash infile=$3 engine=$2 skribilo=$1/skribilo rm -rf $engine; mkdir -p $engine result="Failed" $skribilo -t

Re: [O] editing scheme fragments

2017-01-04 Thread Roger Mason
Hello Nick, Nick Dokos writes: > Try with a minimal init file, avoiding all your customizations (other than > loadin > org and enabling scheme): > > emacs -q -l /path/to/minimal/init/file > > Does it still fail? Yes, but in trying this out I discovered that the keybinding I

Re: [O] editing scheme fragments

2017-01-04 Thread Roger Mason
Hi Eric, Eric S Fraga writes: > Works fine for me with later version of org (and emacs). Unfortunately, updating to Org mode version 9.0.3 (release_9.0.3-170-gfed1cf) did not make any difference. Cheers, Roger

Re: [O] editing scheme fragments

2017-01-04 Thread Roger Mason
Hello Marco, Marco Wahl writes: > Guess: You should add scheme to org-babel-load-languages. E.g. use M-x > customize-variable. Sorry, i should have mentioned that I tried that customisation without success. Cheers, Roger

Re: [O] editing scheme fragments

2017-01-04 Thread Roger Mason
Hello John, John Kitchin writes: > I can't reproduce that. I wonder if you should try running > org-element-cache-reset Sometimes I > have seen org get confused when the cache is out of date. this usually > happens when I have code > that generates parts of the file.

[O] editing scheme fragments

2017-01-04 Thread Roger Mason
Hello, When I try to edit a scheme fragment such this Header: #+BEGIN_SRC scheme :tangle "header.skb" (document :title [A First Skribilo Block] :author [Roger Mason] #+END_SRC using C-c ', org thinks it is an org table. I am using GNU Emacs 25.1.1 (i386-portbld-freebs

Re: [O] List restarts numbering at 1 after table

2016-11-25 Thread Roger Mason
hello, Roger Mason <rma...@mun.ca> writes: > On export, the list numbering after the table reverts to 1. Is there a > way to avoid this? Found it. Sorry for the noise. Roger

[O] List restarts numbering at 1 after table

2016-11-25 Thread Roger Mason
Hello, I have a table in a list, like this: 2. Write stuff in the empty table: # See http://orgmode.org/manual/LaTeX-specific-attributes.html to get # predetermined width on export. #+ATTR_LATEX: :align |p{2cm}|p{2cm}| |--+| | This | That | |--+| | ||

Re: [O] second line for author field in org-mode to latex?

2016-05-11 Thread Roger Mason
Hi Sharon, Sharon Kimble writes: > How can I have a second line for the author field in an org-mode export > to latex please? For example - > > #+AUTHOR: Sharon > #+AUTHOR2: Kimble > > But that doesn't work. I tried "#+AUTHOR: Sharon \n Kimble" but that > doesn't

Re: [O] Is there an easy way converting html -> orgmode?

2016-04-24 Thread Roger Mason
Hello, Martin Weigele writes: > Hi, the subject line says it all, is there an easy way converting html to > orgmode (not the other way round). I think pandoc (http://pandoc.org/) can do that. Cheers, Roger

Re: [O] How to add left superscripts

2016-02-29 Thread Roger Mason
童俊翔 writes: > How to add left superscripts without using additional packages in org-mode? I use \nbsp{}^{1}. Cheers, Roger

Re: [O] Preserve tabs in tangled babel output

2015-03-11 Thread Roger Mason
Thank you Charles Berry and John Kitchin for your replies. John Kitchin jkitc...@andrew.cmu.edu writes: I have org-src-preserve-indentation set to t. Charles C. Berry writes: On Wed, 11 Mar 2015, Roger Mason wrote: Hello, This code: #+BEGIN_SRC makefile :tangle Makefile hello

[O] Preserve tabs in tangled babel output

2015-03-11 Thread Roger Mason
Hello, This code: #+BEGIN_SRC makefile :tangle Makefile hello: hello.f90 gfortran hello.f90 execute: hello ./a.out clean: rm -f a.out *.o #+END_SRC (stolen from John Kitchin) produces a Makefile with spaces instead of tabs. I created the content in

[O] Capturing output from C/C++

2015-03-05 Thread Roger Mason
Hello, I have a short C++ program: #+BEGIN_SRC cpp :flags -lm :results output #include iostream #include fstream #include cmath// for ceil #include cstdlib // for atof double f (double fv, double o, int i) { return fv / 2.0 + (1.0 - o) * fv * i; } int num

Re: [O] Change default latex packages

2014-05-06 Thread Roger Mason
Hello again, On 05/05/14 12:31, John Kitchin wrote: (setq org-latex-default-packages-alist I thought I had this fixed, but apparently not. Here's what I have in my .emacs: (setq org-latex-default-packages-alist '((AUTO inputenc t) ( lmodern nil) (T1 fontenc nil) ( fixltx2e

Re: [O] Change default latex packages

2014-05-06 Thread Roger Mason
hello, On 05/06/14 11:48, John Kitchin wrote: no, I think nil means it is not needed to make latex fragments of equations. John OK, thanks. So, back to my original question: how do I control the list of packages exported into a LaTeX document? Thanks, Roger

Re: [O] Change default latex packages

2014-05-06 Thread Roger Mason
Thanks! Dunno why I was too stunned to try the obvious. Cheers, Roger On 05/06/14 13:53, John Kitchin wrote: just delete the packages you don't what from (setq org-latex-default-packages-ali st '((AUTO inputenc t) ( lmodern nil) (T1 fontenc nil) ( fixltx2e nil) ;(

[O] Change default latex packages

2014-05-05 Thread Roger Mason
Hello, How can I change the default packages that are used in LaTeX export? I'm running Org-mode version 8.2.6 (release_8.2.6-937-g60502a). Thanks, Roger

Re: [O] Change default latex packages

2014-05-05 Thread Roger Mason
Thanks John, I now have what I want. Roger

Re: [O] Change default latex packages

2014-05-05 Thread Roger Mason
Thanks Eric. Filed away for future reference. Roger

[O] enumerate in LaTeX export

2014-05-05 Thread Roger Mason
Hello, I don't understand why this text: === case. The University requests that all medical notes be on letterhead, be signed by the physician and include details on the following: 1. confirmation of the specific dates on which the student visited the

Re: [O] enumerate in LaTeX export

2014-05-05 Thread Roger Mason
Many thanks, Eric. That did indeed fix the problem. Roger

Re: [O] Italicise block of text

2014-01-19 Thread Roger Mason
Hello, On 01/15/2014 01:20 PM, Alexander Baier wrote: Hello Roger, when answering a mail/post from the list, please Cc the list in your response, so other members of the list can see your mail to. On 2014-01-15 14:30 Roger Mason wrote: But this does not: /Perhaps, but [...] to replacement

[O] Italicise block of text

2014-01-14 Thread Roger Mason
Hello, Is there a way to italicise a block of text rather that just single words? (org-mode 8.0.3). Thanks, Roger

Re: [O] Exams with Org?

2013-12-08 Thread Roger Mason
Hello, On 12/06/2013 03:53 PM, Roger Mason wrote: Hello, Has anyone used Org to create exams? It would be useful to have the value per question totalled to provide the total per section etc and to be able to embed the answers in the exam and expose them in the final document using some

[O] Exams with Org?

2013-12-06 Thread Roger Mason
Hello, Has anyone used Org to create exams? It would be useful to have the value per question totalled to provide the total per section etc and to be able to embed the answers in the exam and expose them in the final document using some kind of conditional processing. If anyone has done

Re: [O] Superscript before character

2013-09-06 Thread Roger Mason
Hello, On 09/06/2013 03:33 PM, Charles Berry wrote: Roger Mason rmason at mun.ca writes: Hello, I'd like to create a superscript that preceeds a letter. I tried ^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail. Can this be done in org (8.0.3)? If so how? [snip] \nbsp{}^{1}Fred

[O] Superscript before character

2013-09-06 Thread Roger Mason
Hello, I'd like to create a superscript that preceeds a letter. I tried ^1Fred, ^1 Fred, ^{1}Fred and ^{1} Fred, to no avail. Can this be done in org (8.0.3)? If so how? Thanks, Roger This electronic communication is governed by the terms and conditions at

Re: [O] Filter not working (org 8.0.3)

2013-09-05 Thread Roger Mason
Hello again, On 09/05/2013 01:48 PM, Nicolas Goaziou wrote: Hello, Roger Mason rma...@mun.ca writes: I have this at the top of an org file in order to put graphics in the margin: #+LATEX_HEADER: \usepackage[right=2in,left=0.5in]{geometry} \usepackage{parskip} #+BEGIN_SRC emacs-lisp (defun

Re: [O] Filter not working (org 8.0.3)

2013-09-05 Thread Roger Mason
Hello, On 09/05/2013 04:39 PM, Nicolas Goaziou wrote: In this case, you need to remove \\` from your regexp. Regards, That fixed it. Many thanks. Roger This electronic communication is governed by the terms and conditions at

[O] Filter not working (org 8.0.3)

2013-09-05 Thread Roger Mason
Hello, I have this at the top of an org file in order to put graphics in the margin: #+LATEX_HEADER: \usepackage[right=2in,left=0.5in]{geometry} \usepackage{parskip} #+BEGIN_SRC emacs-lisp (defun margin-graphics (contents backend info) (when (eq backend 'latex)

Re: [O] Filter not working (org 8.0.3)

2013-09-05 Thread Roger Mason
Hello, On 09/05/2013 04:15 PM, Nicolas Goaziou wrote: #+LATEX_HEADER: \usepackage[right=2in,left=0.5in]{geometry} #+LATEX_HEADER: \usepackage{parskip} * Setup :noexport: #+BEGIN_SRC emacs-lisp :exports both (defun

[O] LaTeX export: images in margin

2013-08-16 Thread Roger Mason
Hello, I'd like to have images in the margin when exporting to LaTeX (or creating a pdf via LaTeX). I see from a message on one of the TeX mailing lists that this can be done like this: \marginpar{\includegraphics[]{../images/Walkthrough_1-001.jpg}} How can I get org (8.0.3 on linux) to

Re: [O] LaTeX export: images in margin

2013-08-16 Thread Roger Mason
Hello again, On 08/16/2013 10:45 AM, Suvayu Ali wrote: You can adapt this to your needs: http://article.gmane.org/gmane.emacs.orgmode/74876 It's in the FAQ now: http://orgmode.org/worg/org-faq.html#filter Cheers, Thanks for your response. I have it working somewhat: (defun

Re: [O] LaTeX export: images in margin

2013-08-16 Thread Roger Mason
Hello once more, On 08/16/2013 11:34 AM, Roger Mason wrote: (defun margin-graphics (contents backend info) (when (eq backend 'latex) (replace-regexp-in-string \\`includegraphics.+\\({.+}\\) marginpar{includegraphics\1} contents))) (add-to-list 'org-export-filter-link

[O] LaTeX figure export - no \begin{figure} \end{figure}

2013-07-15 Thread Roger Mason
Hello, This: #+CAPTION: Microstructures of contact-metamorphism related melting and crystallisation in K-feldspar-quartz domains #+NAME: fig:microstructure-montage [[./microstructure-montage.eps]] produces this on export to LaTeX (org 8.0.3): Microstructures of contact-metamorphism related

Re: [O] LaTeX figure export - no \begin{figure} \end{figure}

2013-07-15 Thread Roger Mason
Hello Nicolas, On 07/15/2013 07:52 AM, Nicolas Goaziou wrote: Hello, You need to put your caption on the same line as the #+CAPTION keyword. You may also use multiple CAPTION keywords for better readability: #+CAPTION: Microstructures of contact-metamorphism related melting

[O] Bibliography and ODT

2013-07-14 Thread Roger Mason
Hello, I'm finishing a paper that will need to be submitted to the publisher as MS Word. I use neither Word nor Libre/OpenOffice. I need to have a bibliography with cross-references from the text and intended to export from org to ODT then Word. My bibliography file is in bibtex format.

Re: [O] Bibliography and ODT

2013-07-14 Thread Roger Mason
hello Christian, On 07/14/2013 05:07 PM, Christian Moe wrote: Hi, What seems to work for most people is exporting to latex, running bibtex, and using one of these tools to convert to ODT: - TeX4ht (the usual recommendation) - Pandoc or to convert to a format that ODT imports reasonably well:

[O] C code block: no return values

2013-04-16 Thread Roger Mason
Hello, I'm working through examples in A Multi-Language Computing Environment for Literate Programming and Reproducible Research by Shulte et al. J. Stat. Software, 46/3, 2012. This example compiles but results are not returned to the Org-mode buffer:

Re: [O] C code block: no return values

2013-04-16 Thread Roger Mason
Hello Eric, On 04/16/2013 04:15 PM, Eric Schulte wrote: Roger Mason rma...@mun.ca writes: Hello, I'm working through examples in A Multi-Language Computing Environment for Literate Programming and Reproducible Research by Shulte et al. J. Stat. Software, 46/3, 2012. This example compiles