Re: [O] working on cloud

2014-01-09 Thread David Belohrad
I use for all emacs files git with server repository. Then on each
computer I'm using emacs with, I just clone that repository. The
positive side-effect of this is, that when you need to modify sources
for a particular computer, you just create new local branch. Then all
'common' init file tweaks can be done in master branch and it is very
easy to merge them into local one if needed

.d.



Paul Rudin p...@rudin.co.uk writes:

 Renato renato.pontef...@gmail.com writes:

 Hi,
 I'm learning emacs (as you probabily know :-)).
 I have:
 - one pc at home (linux Debian)
 - one at work (windows)

 I would like to use the same configuration.
 Now, I have my .org file on the cloud (so I can access it from anywhere)
 But I'm  starting to edit also the config file:
 on Win it is:
 init.el

 on linux is
 emacs


 I have a file myinit.el in a dropbox folder. On each machine the local
 init file loads that file. It might also have some machine specific
 initialisation. myinit.el also has some parts that are conditionally
 executed according to operating system.



Re: [O] working on cloud

2014-01-09 Thread Paul Rudin
David Belohrad da...@belohrad.ch writes:

 I use for all emacs files git with server repository. Then on each
 computer I'm using emacs with, I just clone that repository. The
 positive side-effect of this is, that when you need to modify sources
 for a particular computer, you just create new local branch. Then all
 'common' init file tweaks can be done in master branch and it is very
 easy to merge them into local one if needed

Yes, I have done that sort of thing in the past, but I find the need to
check stuff in and push/pull and merge unnecessary overheads for this
kind of thing. Just leaving the file on Dropbox (or whatever) means that
things are synced automagically when edited which, nearly all the time,
is what I want. Dropbox keeps a limited revision history for the free
version (which I use) or you can pay and get an unlimited revision
history. Of course that's not as useful as using git in terms of merging
and so on, but it does provide some protection against erroneous
changes.


For added fun keep the git (or whatever) repository on a Dropbox folder
- this means that you get the automatic updating for things in progress,
but you can also use the proper version control features too.





Re: [O] working on cloud

2014-01-09 Thread David Belohrad
I was using before Dropbox for all sort of syncing, especially my org
mode files, which change quite often. Dropbox is generally very fine (as
well e.g. for sharing screenshots between windows and linux
machines). At certain moment I started to have two issues with this:

1) privacy: you're basically giving your data to somebody else. In case
   of emacs init there is no danger. In case of your org data, which
   might contain sensitive information you want to encrypt it, what
   complicates matter when switching between two win/lin machines
2) deadlocks on files. When working in agenda, quite often happened to
   me, that files started to exist in multiple versions. When I took my
   laptop somewhere without wifi signal and edited files, dropbox
   created local copy of this. When in between I have changed that file
   on some other computer with wifi, this file was correctly synced with
   dropbox. At the time, when my laptop appeared again on wifi, it tried
   to sync the file, but as it was in-between edited, it resulted quite
   often in having two files containing almost the same things, which i
   had to manually merge. what a pain. this was the main reason I went
   away from dropbox.

   Unfortunately there is no easy solution for this. I tried to use AFS
   as well, with the same results. The only 'reasonable' way I found for
   this was to use local git copies and do merging, which most of the
   time passes completely automatically without a need for intervention
   (as far as you don't use mobileorg, which adds unique IDs for items
   -- this must be disabled for proper git functionality)

As I said, imho Dropbox is fine for emacs init files (not containing
passwords :). For general stuff it seems to me less obvious.

.d.



Paul Rudin p...@rudin.co.uk writes:

 David Belohrad da...@belohrad.ch writes:

 I use for all emacs files git with server repository. Then on each
 computer I'm using emacs with, I just clone that repository. The
 positive side-effect of this is, that when you need to modify sources
 for a particular computer, you just create new local branch. Then all
 'common' init file tweaks can be done in master branch and it is very
 easy to merge them into local one if needed

 Yes, I have done that sort of thing in the past, but I find the need to
 check stuff in and push/pull and merge unnecessary overheads for this
 kind of thing. Just leaving the file on Dropbox (or whatever) means that
 things are synced automagically when edited which, nearly all the time,
 is what I want. Dropbox keeps a limited revision history for the free
 version (which I use) or you can pay and get an unlimited revision
 history. Of course that's not as useful as using git in terms of merging
 and so on, but it does provide some protection against erroneous
 changes.


 For added fun keep the git (or whatever) repository on a Dropbox folder
 - this means that you get the automatic updating for things in progress,
 but you can also use the proper version control features too.



Re: [O] working on cloud

2014-01-09 Thread Ian Barton

On 09/01/14 08:36, David Belohrad wrote:

I was using before Dropbox for all sort of syncing, especially my org
mode files, which change quite often. Dropbox is generally very fine (as
well e.g. for sharing screenshots between windows and linux
machines). At certain moment I started to have two issues with this:


I have had problems with Dropbox generating Conflicting files. I think 
this is because some of my computers are only intermittently connected 
to Dropbox. Sorting this out can be very time consuming, especially if 
it happens inside a .git directory.


I have now gone down the git route for emacs init files and all my .org 
files. I keep a separate branch for each computer and do a git pull and 
git merge when I move to a different computer. This does have some 
disadvantages - you need to remember to commit and push your changes on 
each computer. However, sorting out mistakes is generally much easier.


Regarding your .emacs you can use elisp to distinguish various bits of 
your configuration on an OS and computer name basis. Have a look at 
http://sigquit.wordpress.com/2008/09/28/single-dot-emacs-file/ for a 
good guide.


Ian.





Re: [O] Long lines prevent Org mode!

2014-01-09 Thread Sebastien Vauban
Hi François,

François Pinard wrote:
 Sebastien Vauban writes:

 Using `C-c C-v C-d' to demarcate your region as code, and give the
 language, you'll get a nice highlighting of the code inside Gnus

 You mean that demarcated code

 #+BEGIN_SRC elisp
 ((lambda (x y) (+ x y))(length abc) 2)
 #+END_SRC

 will be automatically shown nicely by Gnus?

Yes, I do!

 Trying it right in this message! :-)

Yep: see http://screencast.com/t/cgkg1gg24Wpg...

 (for the readers): that was on my first real patch for Org (in fact,
 for Gnus), back in November 2010 or so.

 A nice one then!  Thanks!

Thanks.

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Fwd: puzzling org-mime-htmlize

2014-01-09 Thread Joseph Vidal-Rosset

#multipart type=alternative#part type=text/plain#+OPTIONS: latex:t
#multipart type=alternative#part type=text/plain#+OPTIONS: latex:t
#multipart type=alternative#part type=text/plain#+OPTIONS: latex:t
Le jeu.  09 janv. 2014  à 12:41:48 ,  Bastien b...@gnu.org a  envoyé ce
message:
 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 My gnus works now. But I'm still using Gmail at the moment.

 As Nick wisely said: one thing at a time!

 The good new is that you'll get good support
 for both Gnus and Org.



Yes, you are right Bastien.



Good news: I have finally the explanation  of the "bug". Here is, and it
could be a lesson for all Debian users.



All the problems that I had theses times came from the same cause: I had
decided to  install some  very useful packages  not via  Debian aptitude
system, but  via direct sources  in usr/local  just in order  to avoid
boring and long re-installation of texlive-full for example.



But it has certainly created some  confusion, probably my .bashrc is not
correctly written, I do not know.



This morning I have removed and purge all what could be in relation with
latex and re-installed bibtex2html, texlive, and so on. And now it works
fine.



Here is Peirce formula:









End of this thread. I am going to  open another one about Gnus - Org and
$ $



Best wishes,



Jo.



Re: [O] Corrupted TBLFM after table edit

2014-01-09 Thread Bastien
Hi Michael,

Michael Brand michael.ch.br...@gmail.com writes:

 If you use release_8.2.4-14-geb28fe4 or newer and are using Org table
 spreadsheet #+TBLFM then downgrade your Org version before editing
 tables. In the files where you already edited a table with such an Org
 release check all #+TBLFM in that file for corruption as shown
 below.

This is now fixed, thanks.

-- 
 Bastien



[O] Texlive packages in Gnus via Org

2014-01-09 Thread Joseph Vidal-Rosset

Hello Nick, Bastien, Eric, Uwe, and the list,



I know that I am obstinate, but  I am obstinate about this topic because
I   feelthat   what   I   wouldbe   happy   to   getis   not
impossible. Unfortunately, I am an amateur, bad in programming languages
and I am unable to reach by myself this goal.



Now I am  finally able to write  a formula in a Gnus  article, like this
simple one for example $ p  p $ .



But I need more. If I write



#+begin{equation}
A m   A
#+end{equation}



I am not sure that it will work. It would be already very nice.



I know that the latex code



\begin{equation}
A \vdash_{m} \neg \neg A
\end{equation}



will  not work,  neither for  example if  I try  to use  another texlive
package like bussproofs.



I wonder  how it is  possible to get png  images in Gnus  for everything
that is created by  latex, as it is possible already to  get it for html
via org export.



It could be  very nice for the  scientific community to get  such a tool
thanks to Gnus + Org.



Best wishes,



Jo. 


Re: [O] Org Export to ODT Problem Files

2014-01-09 Thread Bastien
Hi Aric,

Aric aorc...@mac.com writes:

 There are pluses and minuses it seems between pandoc and 
 org export.

(Better to list possible improvements to org-odt separately,
one improvement per thread, so that people can keep this in
their TODO lists.)

 I can cut and paste the heavy math latex portions from a pandoc export, but 
 is there a setting that I am missing about latex code being interpreted on 
 export to odt?

No, I don't think you miss anything here, sorry.

-- 
 Bastien



[O] worg questions

2014-01-09 Thread Ian Kelling
I pushed some formatting changes to worg, in contrib/org-drill.org. I got messages 
when I did, remote: worg publish process 5487. And it mentioned many files, but 
not the file I edited. Its been a few hours, when will this change propogate on 
the site?


why the emacs.el is in worg/sources/, but not the worg git sources? I'd think it 
should be there so I could track any changes.


What version of orgmode is being used on the worg server?
It is not listed with the other software versions on 
http://orgmode.org/worg/worg-setup.html, but there is one external to emacs 
included in the emacs.el file.


Also on worg-setup.html, it says the server is using emacs23. However, when i 
pushed to worg, I got a message saying remote: Emacs 24.2.50.1. Which is correct?


Before I pushed to worg, I wanted to publish locally, but I ran into an error.
In the emacs.el for publishing worg, there is a orgwebpages project with a base 
directory of ~/git/orgweb/. This is a different than the worg repo, and I'm not 
sure where to get it.


I disabled the orgweb project, it finished the publish process but there was some 
differences between my output and the website, but before I investigate, I'm 
wondering about these questions.



Thank you,
Ian Kelling



[O] Babel language support for Mathematica

2014-01-09 Thread Yi Wang
Hello,

As far as I can find, there is no babel support for Mathematica. So I wrote
one and share it in case other people are interested:

https://github.com/tririver/wy-els/blob/master/ob-mathematica.el

It is also discussed in this blog
http://cosmosimple.blogspot.co.uk/2014/01/evaluate-mathematica-code-in-emacs-org.html


While writing this extension, I have a question: How to add font-lock mode
in org code blocks? I had a read of ob-C and ob-python code and didn't find
out how they do font-lock.

Note that the font lock support for Mathematica is available as mma-mode at
https://github.com/skaslev/emacs.d/blob/master/progmodes/mma.el

For my case in a .m file I have font lock from mma.el, but not src code
blocks.

Best wishes,
Yi


[O] Basic question re. spreadsheet function

2014-01-09 Thread Steve Dowe
Hi all,

I'm testing out whether I can use a table in org as a project status
tracker.  In col 6, I have the value of the project (e.g. 162.50) and in
col 9, the status (e.g. quoted, approved, invoiced, closed, etc.)

I would like to see, at a glance, what the value of quoted work is, so I'm
currently doing this in col 12 (pasted from formula editor):

# Column Formulas
$12 = if($9=quoted,$6,0)

( Col 9 in this instance contains closed and Col 6 contains 162.50. )

This formula results in the text

 closed = quoted ? 162.5 : 0

being displayed in col 12.  However, in another row where the col 9 does
have the text quoted, I get pretty much the result I'm looking for, e.g.
400. will appear in col 12 where I have 400.00 in col 6.

In the instance where the if test proves false, I would like a zero or
nothing appearing.  The intention is to sum this column in a footer row.

I have consulted
http://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calcbut
it contains a dead link (
http://orgmode.org/calc/Logical-Operations.html#Logical-Operations) -
making it harder to RTFM :-)

Thanks,
-- 
  Steve


Re: [O] Babel language support for Mathematica

2014-01-09 Thread Bastien
Hi Yi,

Yi Wang tririverwan...@gmail.com writes:

 As far as I can find, there is no babel support for Mathematica. So I
 wrote one and share it in case other people are interested:

 https://github.com/tririver/wy-els/blob/master/ob-mathematica.el

Nice, thanks for sharing!

(By the way, you should fix the .el header, it says that the file is
part of Emacs while it's not.)

 While writing this extension, I have a question: How to add font-lock
 mode in org code blocks?

(setq org-src-fontify-natively t)

HTH,

-- 
 Bastien



Re: [O] Babel language support for Mathematica

2014-01-09 Thread Sebastien Vauban
Hi Bastien,

Bastien wrote:
 While writing this extension, I have a question: How to add font-lock
 mode in org code blocks?

 (setq org-src-fontify-natively t)

Shouldn't that be enabled by default, now, as there so many users who
seems to be unaware of that?

Or is there a fear of impacts on overall performance?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Babel language support for Mathematica

2014-01-09 Thread Bastien


Hi Sébastien,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 (setq org-src-fontify-natively t)

 Shouldn't that be enabled by default, now, as there so many users who
 seems to be unaware of that?

Well, I'm all for it.

 Or is there a fear of impacts on overall performance?

No, I don't think so.

Can you create a separate thread and poll the user for whether they
want this to be the default for the next major release?

Thanks!

-- 
 Bastien




Re: [O] Texlive packages in Gnus via Org

2014-01-09 Thread Bastien
Hi Joseph,

Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 I wonder how it is possible to get png images in Gnus for everything
 that is created by latex, as it is possible already to get it for
 html
 via org export.

One indirect way is to run M-x org-preview-latex-fragment RET in a
buffer containing the equations, then inlining the .png files from
the ltxpng/ directory.

I can't think of something more direct right now.

 It could be very nice for the scientific community to get such a tool
 thanks to Gnus + Org.

By reading Cedric Villani last book, I was under the impression
that the whole scientific community was able to read TeX equations
directly, with no need of visual feedback ;)  But agreed, this
would be nice.

-- 
 Bastien



Re: [O] Babel language support for Mathematica

2014-01-09 Thread Yi Wang
Hi, Bastien,

 (By the way, you should fix the .el header, it says that the file is
 part of Emacs while it's not.)

Sorry I thought it was general GPL... Now it is updated. Thank you for
pointing that out!

 (setq org-src-fontify-natively t)

Yes, I already set this. But curiously the Mathematica code is still not
highlighted like other codes. I wonder there may be some non-standard
things inside mma.el (the Mathematica package file major mode) then?

Best,
Yi


On Thu, Jan 9, 2014 at 10:28 AM, Bastien b...@gnu.org wrote:

 Hi Yi,

 Yi Wang tririverwan...@gmail.com writes:

  As far as I can find, there is no babel support for Mathematica. So I
  wrote one and share it in case other people are interested:
 
  https://github.com/tririver/wy-els/blob/master/ob-mathematica.el

 Nice, thanks for sharing!

 (By the way, you should fix the .el header, it says that the file is
 part of Emacs while it's not.)

  While writing this extension, I have a question: How to add font-lock
  mode in org code blocks?

 (setq org-src-fontify-natively t)

 HTH,

 --
  Bastien



Re: [O] Question about the math mode table exporting for latex and html

2014-01-09 Thread Nicolas Goaziou
Hello,

Rick Frankel r...@rickster.com writes:

 On Tue, Jan 07, 2014 at 05:39:06PM +0100, Nicolas Goaziou wrote:
 Rasmus ras...@gmx.us writes:
 
  AFAIK, mathjax supports amsmath matrices, e.g. the third example here¹ .
  Thus, we'd really just want to insert the output of org-latex-table in
  the html-file.
 
  Perhaps something like the following would be OK?  Nicholas?
 
  #+ATTR_HTML: :mode latex
  #+ATTR_LATEX: :mode math :environment pmatrix :math-prefix \mathbf{H}=
  | \vdots | 0 | \vdots |
  | \vdots | H | \vdots |
  | \vdots | 0 | \vdots |
 
  This would tell ox-html.el to transcode the table via ox-latex-tabel
  and feed the string via org-html-format-latex (assuming latex-frag is
  a string).  
 
 FWIW, I think it's worth trying. I'm Cc'ing Rick Frankel for his
 opinion.
 

 I have no opinion on this one. Nicolas, if you think this is the
 correct approach syntactically, then it works for me.

OK. Thank you.


Regards,

-- 
Nicolas Goaziou



Re: [O] Babel language support for Mathematica

2014-01-09 Thread Bastien
Yi Wang tririverwan...@gmail.com writes:

 Yes, I already set this. But curiously the Mathematica code is still
 not highlighted like other codes. I wonder there may be some
 non-standard things inside mma.el (the Mathematica package file major
 mode) then?

I don't think so, you may just have to check that the mode defined in
mma.el is automatically boundled with .m files -- which is not the case
with a default Emacs installation, where .m files are open with
objc-mode.

-- 
 Bastien



Re: [O] Babel language support for Mathematica

2014-01-09 Thread Yi Wang
 I don't think so, you may just have to check that the mode defined in
 mma.el is automatically boundled with .m files -- which is not the case
 with a default Emacs installation, where .m files are open with
 objc-mode.

I already have this line in my configuration file:

(add-to-list 'auto-mode-alist '(\\.m\\' . mma-mode))

Now I have

(1) If I open a .m file, there is font lock. Thus the problem shouldn't be
binding between mma.el and .m files.
(2) If I insert a src block of C or python code in org mode, there is font
lock. Thus the problem shouldn't be org-src-fontify-natively (and I checked
it is indeed t).

This is why I am confused. Actually I don't badly need this feature. Just
it would be a little better to have things work properly.

Best,
Yi


On Thu, Jan 9, 2014 at 10:55 AM, Bastien b...@altern.org wrote:

 Yi Wang tririverwan...@gmail.com writes:

  Yes, I already set this. But curiously the Mathematica code is still
  not highlighted like other codes. I wonder there may be some
  non-standard things inside mma.el (the Mathematica package file major
  mode) then?

 I don't think so, you may just have to check that the mode defined in
 mma.el is automatically boundled with .m files -- which is not the case
 with a default Emacs installation, where .m files are open with
 objc-mode.

 --
  Bastien



Re: [O] Corrupted TBLFM after table edit

2014-01-09 Thread Michael Brand
Hi Bastien

On Thu, Jan 9, 2014 at 11:03 AM, Bastien b...@gnu.org wrote:
 This is now fixed, thanks.

The release_8.2.5c-8-ga2619b7 this refers to solves only a part of the
bugs introduced with the greedy (re-search-forward ^\\S-*$\\|\\' nil
t). It does not work before the first headline, does not cover #+TBLFM
in list items etc. without end.

I suggest to solve this completely differently by replacing the greedy
(re-search-forward ^\\S-*$\\|\\' nil t) and not using s-end any
more. I would change the while to

(while (let ((case-fold-search t)) (looking-at [ \t]*#\\+tblfm:))
  [...]
  (forward-line))

which is simple and water-proof.

Michael



Re: [O] HTML export doesn't convert quote before footnote

2014-01-09 Thread Nicolas Goaziou
Hello,

James Harkins jamshar...@gmail.com writes:

 On Thursday, January 9, 2014 10:13:32 AM HKT, James Harkins wrote:
 OK, I'll work around it on my side.

 Continuing... I've tried to write a filter for this, but I'm stuck on
 choosing strings based on the backend name.

 (cdr (assoc
 (org-export-backend-name backend)
 '((latex . \\\footnote) (html . \supa

 Apparently org-export-backend-name returns neither a symbol nor
 a string.

That's because BACKEND is already a symbol, not a real back-end (i.e.
a defstruct).  Thus, you can use:

  (cdr (assq backend ...) ...)



Regards,

-- 
Nicolas Goaziou



Re: [O] Corrupted TBLFM after table edit

2014-01-09 Thread Bastien
Hi Michael,

Michael Brand michael.ch.br...@gmail.com writes:

 I suggest to solve this completely differently by replacing the greedy
 (re-search-forward ^\\S-*$\\|\\' nil t) and not using s-end any
 more. I would change the while to

 (while (let ((case-fold-search t)) (looking-at [ \t]*#\\+tblfm:))
   [...]
   (forward-line))

 which is simple and water-proof.

Yes, sure, please go ahead -- thanks in advance,

-- 
 Bastien



Re: [O] Babel language support for Mathematica

2014-01-09 Thread Bastien
Yi Wang tririverwan...@gmail.com writes:

 (1) If I open a .m file, there is font lock. Thus the problem
 shouldn't be binding between mma.el and .m files.
 (2) If I insert a src block of C or python code in org mode, there is
 font lock. Thus the problem shouldn't be org-src-fontify-natively
 (and I checked it is indeed t).

What happen if you C-c ' on a .m block?

-- 
 Bastien



Re: [O] Texlive packages in Gnus via Org

2014-01-09 Thread Joseph Vidal-Rosset

Le jeu.  09 janv. 2014  à 11:49:14 ,  Bastien b...@gnu.org a  envoyé ce
message:
 Hi Joseph,

 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 I wonder how it is possible to get png images in Gnus for everything
 that is created by latex, as it is possible already to get it for
 html
 via org export.

 One indirect way is to run M-x org-preview-latex-fragment RET in a
 buffer containing the equations, then inlining1 the .png files from
 the ltxpng/ directory.

 I can't think of something more direct right now.



I try:










It seems  that it will  work for the equation  package, but it  does not
work with  for example  other packages: the  prooftree command  given by
bussproofs package does not work,









neither fitch proofs:












 It could be very nice for the scientific community to get such a tool
 thanks to Gnus + Org.

 By reading Cedric Villani last book, I was under the impression
 that the whole scientific community was able to read TeX equations
 directly, with no need of visual feedback ;)  But agreed, this
 would be nice.



The scientific community  can live without this tool, of  course, but it
would be nice if Org + Gnus  could be the email client par excellence of
this community. I am happy to see that you agree.



Best wishes,



Jo.


Footnotes: 


1 
I guess  that  by "inlining"  you mean  making  the command  M-x
org-mime-htmlize  . But  I am  not sur  that is  what you  meant. It  is
nevertheless already  a great pleasure of  making Org working in  Gnus !
What a terrific tool !







[O] [BABEL] How to pass vector to R as variable?

2014-01-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I want to pass a vector to R, defined in org as a variable. At the
moment I am doing the following,


#+NAME: COLSTOEVAL
   | NPPyCcc |
   | test|

#+PROPERTY: var COLs_TO_EVAL=COLSTOEVAL

#+begin_src R :exports both :results output
COLS_TO_EVAL[,1]
class(COLS_TO_EVAL[1,])
#+end_src

#+RESULTS:
: [1] NPPyCcc, test
: [1] character

which works, but I assume there is a way of defining COLS_TO_EVAL as a
vector?

If not, is there an easier way of doing it then I do?

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
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSzoY2AAoJENvXNx4PUvmCqfgH/j2Bu/b/s//igUEkuNMmehuh
ie+vQAo230PUnsz2QGtJ4Pl2iP4ZhKTBvbpujEqk58fUbhKFyXQ98UxaGAvChevE
Sc+jnLktWlgTgS9f+zr1jarJDVtgChEy1AM7n0CPKQ90G0a//d+oC2TWPEAL2xxq
HAHDY5DeyhOlHPV39CHlGHmMy5n1tSKsccoVfLq7rIqwg0fI1KfYyonQDJU1BxPL
sep++c7yyTTj31NcKUK9jg6TafaDfsi1FYBGe2z6JngeJvS/fqVLN29orIJOspiK
nJD896pTDMerfl/VJk0KHTykYA1nNm7+Ozrvp+Mk/9Xqa1LhG4ODPWeG1AQ1R48=
=J8PT
-END PGP SIGNATURE-



Re: [O] Texlive packages in Gnus via Org

2014-01-09 Thread Joseph Vidal-Rosset
Le   jeu.   09   janv.   2014   à   12:18:48   ,   Joseph   Vidal-Rosset
joseph.vidal.ros...@gmail.com a envoyé ce message:
 Le jeu. 09 janv. 2014 à 11:49:14 , Bastien b...@gnu.org a envoyé ce
 message:
 Hi Joseph,

 Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes:

 I wonder how it is possible to get png images in Gnus for everything
 that is created by latex, as it is possible already to get it for
 html
 via org export.

 One indirect way is to run M-x org-preview-latex-fragment RET in a
 buffer containing the equations, then inlining^1 the .png files from
 the ltxpng/ directory.

 I can't think of something more direct right now.

 I try:

 \begin{e

 It seems that it will work for the equation package, but it does not
 work with for example other packages: the prooftree command given by
 bussproofs package does not work,

Errata: read the index m in this formula as c. It is a formula valid
in classical logic of  course, and not in minimal logic.  But it was not
the point of my email. 

:)

Jo. 



Re: [O] Babel language support for Mathematica

2014-01-09 Thread Yi Wang
Ah, now the problem appears. It says No such language mode:
mathematica-mode.

So there is a mismatch between the name mathematica (which I used as name
in org-babel extension) and the name mma-mode (which is provided by
mma.el).

However, as auto-mode-alist suggests (where there is (\\.m\\' .
mma-mode), and no entry with mathematica-mode), I still have no idea
why org-edit-special looks for mathematica-mode instead of mma-mode.


On Thu, Jan 9, 2014 at 11:15 AM, Bastien b...@altern.org wrote:

 Yi Wang tririverwan...@gmail.com writes:

  (1) If I open a .m file, there is font lock. Thus the problem
  shouldn't be binding between mma.el and .m files.
  (2) If I insert a src block of C or python code in org mode, there is
  font lock. Thus the problem shouldn't be org-src-fontify-natively
  (and I checked it is indeed t).

 What happen if you C-c ' on a .m block?

 --
  Bastien



[O] [BABEL] Define tables with names in org?

2014-01-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi

I would like to define a table with named columns and rows, so that
the table is passed to R including the column and row names - is this
possible?

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
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSzompAAoJENvXNx4PUvmC+oAIAM164A5/ctr7WSkpPCyjpFxs
n/Vh/N7lN5ElJA2LAQHJN3yD1ZedLAPQnyOXZEGEIbNQW5y+fBXjM7friLGyueWk
KN2B3+2NfiY3e6JfsoqnfLKKz0yFgEBIpJATa4vvRvuvs4XnBAl50ODYSWWTd1tw
SLk6hJOteRbrDWLY6S6YVXn75+Bi7KSJfXspvdKv+nt1oU4owPWBBhLsLhukzV6o
JIiDVBiAbn5Sb/lhjVt79qw7+2C0KlyT7D1Hijh2efCNKiFbMOf1bs5QSW6NjTs3
mfCzFGYY6KaG7MCTJDSNQWrQB1h7Ge6JU0qedwZg1r9OnuZ0CA9Adb+vImoBKic=
=eCtM
-END PGP SIGNATURE-



Re: [O] Babel language support for Mathematica

2014-01-09 Thread Yi Wang
Now it worked. I added (add-to-list 'org-src-lang-modes '(mathematica .
mma)). After that font lock and edit source works. Thank @Bastien for the
help!


On Thu, Jan 9, 2014 at 11:31 AM, Yi Wang tririverwan...@gmail.com wrote:

 Ah, now the problem appears. It says No such language mode:
 mathematica-mode.

 So there is a mismatch between the name mathematica (which I used as name
 in org-babel extension) and the name mma-mode (which is provided by
 mma.el).

 However, as auto-mode-alist suggests (where there is (\\.m\\' .
 mma-mode), and no entry with mathematica-mode), I still have no idea
 why org-edit-special looks for mathematica-mode instead of mma-mode.


 On Thu, Jan 9, 2014 at 11:15 AM, Bastien b...@altern.org wrote:

 Yi Wang tririverwan...@gmail.com writes:

  (1) If I open a .m file, there is font lock. Thus the problem
  shouldn't be binding between mma.el and .m files.
  (2) If I insert a src block of C or python code in org mode, there is
  font lock. Thus the problem shouldn't be org-src-fontify-natively
  (and I checked it is indeed t).

 What happen if you C-c ' on a .m block?

 --
  Bastien





Re: [O] Texlive packages in Gnus via Org

2014-01-09 Thread Joseph Vidal-Rosset

Maybe by adding  in headers LaTex Header  in the style of a  org file it
could work









it works !!!



Thanks a lot Bastien, you are a genius !



Best wishes,



Jo. 


[O] [poll] Fontify code in code blocks

2014-01-09 Thread Sebastien Vauban
Hello,

Currently, to get code highlighting (which is contextual to the
language of the code block) enabled within your Org buffers, you need to
add the following line to your Emacs config file:

  (setq org-src-fontify-natively t)

as the default value of `org-src-fontify-natively' is `nil'.

WDYT if we turn it on by default?

Are there users explicitly wanting to keep that variable turned off. If
yes, can you explain why: performance reasons, others?

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] [BABEL] Define tables with names in org?

2014-01-09 Thread Christian Moe

Rainer M Krug writes:

 I would like to define a table with named columns and rows, so that
 the table is passed to R including the column and row names - is this
 possible?

Yes, just use the leftmost column for row names and include the header
argument :rownames yes.

By default, the first row will be used for column names if followed by a
hline. Without a hline, use :colnames yes.

E.g.:

#+name: colrownamestbl 
|| Alpha | Beta | Gamma |
|+---+--+---|
| First  | A1| B1   | C1|
| Second | A2| B2   | C2|
| Third  | A3| B3   | C3|

#+begin_src R :var data=colrownamestbl :rownames yes :results output
 colnames(data)
 rownames(data)
#+end_src

#+RESULTS:
: [1] Alpha Beta  Gamma
: [1] First  Second Third 

Yours,
Christian



Re: [O] Texlive packages in Gnus via Org

2014-01-09 Thread Joseph Vidal-Rosset
Hello the list, 

The good news is that it is therefore of course already possible NOW to use Org
inside Gnus and  that everyone can use  the export into html  for a very
clean scientific correspondence. 

Many thanks to  Carsten Dominik, to Bastien Guerry, to  Eric Schulte and
Dan Davidson, and to all this great  team of Org. Forgive me if I cannot
quote all the names. 


Best wishes, and happy new year again !

Jo.



Re: [O] [BABEL] How to pass vector to R as variable?

2014-01-09 Thread Christian Moe

Rainer M Krug writes:

 I assume there is a way of defining COLS_TO_EVAL as a
 vector?

I don't think so.

 If not, is there an easier way of doing it then I do?

Well, COLS_TO_EVAL$V1 is one character less to type than
COLS_TO_EVAL[,1] ...

Yours,
Christian



Re: [O] [poll] Fontify code in code blocks

2014-01-09 Thread Thierry Banel
Sebastien Vauban sva-news@... writes:

...
   (setq org-src-fontify-natively t)
 
 as the default value of `org-src-fontify-natively' is `nil'.
 
 WDYT if we turn it on by default?
...

I vote: YES, true by default






Re: [O] [poll] Fontify code in code blocks

2014-01-09 Thread Joseph Vidal-Rosset
Le   jeu.   09   janv.   2014à   01:22:31   ,   Sebastien   Vauban
sva-n...@mygooglest.com a envoyé ce message:
 Hello,

 Currently, to get code highlighting (which is contextual to the
 language of the code block) enabled within your Org buffers, you need to
 add the following line to your Emacs config file:

   (setq org-src-fontify-natively t)

 as the default value of `org-src-fontify-natively' is `nil'.

 WDYT if we turn it on by default?

 Are there users explicitly wanting to keep that variable turned off. If
 yes, can you explain why: performance reasons, others?

 Best regards,
   Seb

Hello,

I must  add that  the highlighting  works only  in code  with begin_src-
... end_src à la org. But then,  at least in my configuration, it blocks
the export in LaTeX or in HTML. 

I have not succeeded to get the same highlighting of the latex syntax at
the moment in an org file with all the correct export functions. 

But in comparison of the advantages of org-mode, it is a very small problem. 

Best wishes,

Jo. 



Re: [O] bug in org-element-footnote-definition-parser?

2014-01-09 Thread Nick Dokos
Mark Edgington edgi...@gmail.com writes:

 Nick Dokos ndokos at gmail.com writes:

 
 Nicolas Goaziou n.goaziou at gmail.com writes:
 
  Hello,
 
  Mark Edgington edgimar at gmail.com writes:
 
  I have encountered the following error message when trying to export
  to latex the attached example org file:
 
  org-element-footnote-definition-parser: Invalid search bound (wrong
  side of point)
 
 
 I 'm not sure but I believe this was a bug in emacs that Eli Zaretskii
 fixed recently.  You will need to update your emacs. In the git mirror I
 use, the commit appears like this:
 
 commit b2b5f414358a7835b56613f67d2b0278ee804290
 Author: Eli Zaretskii eliz at gnu.org
 Date:   Wed Jan 1 19:44:48 2014 +0200

 Hi Nick,

 I can confirm that updating emacs to 24.3.1 does eliminate the problem. 
 But, what this means is that the problem will exist for any users who are
 still using Emacs 23 -- and maybe this shouldn't concern anyone since
 normally using bleeding-edge org-mode code would coincide with using newer
 versions of emacs...


No, I don't think so: this was a bug in a caching mechanism that was
introduced (disabled) in emacs 24 - it was enabled a couple of months
ago. It should not affect any emacs 23 users.

-- 
Nick




Re: [O] [BABEL] Define tables with names in org?

2014-01-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On 01/09/14, 13:30 , Christian Moe wrote:
 
 Rainer M Krug writes:
 
 I would like to define a table with named columns and rows, so
 that the table is passed to R including the column and row names
 - is this possible?
 
 Yes, just use the leftmost column for row names and include the
 header argument :rownames yes.
 
 By default, the first row will be used for column names if followed
 by a hline. Without a hline, use :colnames yes.
 
 E.g.:
 
 #+name: colrownamestbl || Alpha | Beta | Gamma | 
 |+---+--+---| | First  | A1| B1   | C1
 | | Second | A2| B2   | C2| | Third  | A3| B3   | C3
 |
 
 #+begin_src R :var data=colrownamestbl :rownames yes :results
 output colnames(data) rownames(data) #+end_src
 
 #+RESULTS: : [1] Alpha Beta  Gamma : [1] First  Second
 Third

Ah - I see. Nice. Thanks.

One problem though:

I define my variables in the beginning of the document, in a not
exported heading so that they don't show in the report, and I want to
have some variables with rownames and some without. Is this possible?

* INTERNAL VARIABLES :noexport:

** Without column names
#+NAME: WITHCOLNAMES
| name  |
|---|
| NPPyC |
| DBBVy |
| DBRFy |
| DBSSy |
| levelstress_2 |
#+PROPERTY: var+ WITHCOLNAMES=WITHCOLNAMES

** Without column names
#+NAME: COLS_TO_EVAL
| name  |
|---|
| NPPyC |
| DBBVy |
| DBRFy |
| DBSSy |
| levelstress_2 |
#+PROPERTY: var+ COLS_TO_EVAL=COLS_TO_EVAL

And this should be valid everywhere where I use WITHCOLNAMES and
WITHOUTCOLNAMES in R without having to specify :rownames true each time?

Rainer


 
 Yours, Christian
 

- -- 
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
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSzqp2AAoJENvXNx4PUvmCHqIH/jleiTYI2JhkMRW4d6B7jepF
WzbGM4kdCasUPuK7KPKf5eqF/l03SMzvscH7tR3nfDxw9BO7J+r8BwO3U9U2h7+E
vu/bTyevqNdLmT1RZGj2fXET6vSM3iLp2uTnC21oqc0AX769HknxoRAycTbD2I3a
IKY2S0DHiJfc+wKfzcnRZja7zwIVY6FgyYuD2L3+HYqBDuff0KG+LK3xWh0xAll2
8ldeaQZEB77rzBkehuazDtrAAkuF+r8kfu3d78eY1C5mZ0Vfu5N18QqyHN+UDqtW
fpvJbZVPZQdIiIMrNqsfaJvXRkGZUaX9+LW2FdTE92dW3L4mQxcu47O3WMPpNUs=
=/iwa
-END PGP SIGNATURE-



Re: [O] Basic question re. spreadsheet function

2014-01-09 Thread Nick Dokos
Steve Dowe stephen.d...@gmail.com writes:



 I have consulted
 http://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc
 but it contains a dead link
 (http://orgmode.org/calc/Logical-Operations.html# Logical-Operations)
 - making it harder to RTFM :-)


Until those are fixed, you can consult the org-mode manual on your own
machine using emacs Info: C-h i should get you to the initial page and
you can drill down. But Info offers search as well and it's integrated
with emacs so e.g. if you evaluate this form in emacs, you'll get to
the appropriate section:

(info (org) Formula syntax for Calc)

You can then follow the links to the calc documentation.

-- 
Nick




Re: [O] Parsing Org-mode in Python

2014-01-09 Thread Brett Viren
Hi Daniel,

Daniel Clemente n142...@gmail.com writes:

   Are there already Python parsers for it?

Parsing generic JSON is fairly trivial in Python.

  import json
  data = json.dumps(open('file.json').read())

The resulting data is then a bunch of Python lists and/or dicts
matching whatever structure was output from org and is in the .json
file.  The schema in these three contexts are (will be) identical.

At this point, Pythonistas can do what they want with data.  Although,
as I mentioned, I'd like to put another layer on this raw data
structure which expresses/enforces the org schema as understood by the
org-exporter.  If I can figure out how to dump a representation of this
schema from org I'll express it as a set of generated
collections.namedtuple instances.  We'll see.

   Should ox-json's output be as raw as possible (e.g. what your code
 produces now) or transformed to simpler JSON?
   (I think both formats should coexist).

I suppose there may be a usefulness to winnow down the structure.  One
thing I'm thinking about here is the narrowing done to support the blog
From anywhere feature of Karl's lazyblorg mentioned in this thread.

That can be done either on the emacs side or Python side (or both, in
principle).  However, my intention is to do as little modification of
the org document structure on the emacs-side in order to preserve
details that may possibly be interesting on the Python-side in the
future.  Also, I'm still learning LISP but know Python fairly well so
would rather do as much processing as possible on the Python side. :)

So far the only thing I see that needs to be stripped is the :parent
property (and the :structure, which really should be resolved as a copy
instead of being stripped) which cause the emacs-side data structure to
become a Circular Object and thus break the emacs JSON dumper.  

I just noticed that Python's JSON dumper can do this kind of stripping
implicitly and in general.  It might be nice if someone were to add such
a feature to the emacs JSON dumper but I don't plan to try this.

-Brett.



pgp9M9SeqaAZM.pgp
Description: PGP signature


Re: [O] [BABEL] How to pass vector to R as variable?

2014-01-09 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1



On 01/09/14, 13:40 , Christian Moe wrote:
 
 Rainer M Krug writes:
 
 I assume there is a way of defining COLS_TO_EVAL as a vector?
 
 I don't think so.

Pity - but I should be able to live with it as it is.

Thanks,

Rainer

 
 If not, is there an easier way of doing it then I do?
 
 Well, COLS_TO_EVAL$V1 is one character less to type than 
 COLS_TO_EVAL[,1] ...
 
 Yours, Christian
 

- -- 
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
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.22 (Darwin)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSzrqcAAoJENvXNx4PUvmCa0MIALNt0MkXefrCRlWirzdh5l67
DOnAD4iALRcxWe/qfA1MrlGMDHPW+VaJ4noUazBsqTBrRNl/Z7z0wCZOFB/VZ/nJ
MOMtVbQQyGv/J6pUfL3k7QqXqLA4qE14MAFOFDrmZX0QIX3Sj2hrY1r8IGha2FBg
AVAy0efz+YQ9cRraUYfyEJ1Q7vvFqSkICznbfvV9RlWNm2nY8C5VZp1H8MsQrMW9
UOzPqZsqSYi7pf9stV0aH0P/Gm79Rt+QnlfegklF9YLLQOeCgUkbwz1BktDcebyM
G10btHq7p6YaR2u8TFihNYy29R6Vg0YYZzPIKqv4iL2emgOdEBK1EtmZ+PkGCRY=
=ZeZU
-END PGP SIGNATURE-



[O] Local variables in org files

2014-01-09 Thread Michael Albinus
Hi,

I'm trying to save the result of M-x debbugs-org into a file (this is
a TODO list). For further handling, also some buffer local variables
must survive. Therefore, I append at the very end of that file something
like this:

* Local Variables
** Local Variables:
** eval: (debbugs-org-mode 1)
** debbugs-org-ids: (1 2 3)
** End:

This has the nice effect, that those variables do not disturb in
overview mode, because they look like

* Local Variables...

Being invisible would be even better, but so what.

Unfortunately, the value of debbugs-org-ids could be very lng,
exceeding the 3000 chars limit the Local Variables: section size is
allowed to be in Emacs. So I must rearrange things like this:

* Local Variables
** debbugs-org-ids: (1 2 3)
** Local Variables:
** eval: (debbugs-org-mode 1)
** debbugs-org-ids: (access-the-value-above)
** End:

Is there some functionality in org I could use implementing
`access-the-value-above'? It is org structure, so I'm hoping there is an
easy way to access a given node with a well defined position.

Or maybe there is already a clever way storing local variables in an org
file, which I'm not aware of.

Thanks, and best regards, Michael.



Re: [O] working on cloud

2014-01-09 Thread Ted Wiles

I used to use dropbox, but then I just went all-in, got some server
space from linode, and now I just SSH into a running emacs daemon. The
really cool thing is that I can also SSH in with my Droid 3 phone
(physical keyboard droids are the only ones I've found with the
requisite ctrl and meta keys).

Now, I never have to worry about versioning or maintaining multiple
.emacs, and org-mode is available wherever there is cell service
(grocery store, bus, etc.).

-Original Message-
From: Ian Barton
To: emacs-orgmode@gnu.org
Date: Thu 09 Jan 2014 03:48:34 AM EST

On 09/01/14 08:36, David Belohrad wrote:
 I was using before Dropbox for all sort of syncing, especially my org
 mode files, which change quite often. Dropbox is generally very fine (as
 well e.g. for sharing screenshots between windows and linux
 machines). At certain moment I started to have two issues with this:

I have had problems with Dropbox generating Conflicting files. I think 
this is because some of my computers are only intermittently connected 
to Dropbox. Sorting this out can be very time consuming, especially if 
it happens inside a .git directory.

I have now gone down the git route for emacs init files and all my .org 
files. I keep a separate branch for each computer and do a git pull and 
git merge when I move to a different computer. This does have some 
disadvantages - you need to remember to commit and push your changes on 
each computer. However, sorting out mistakes is generally much easier.

Regarding your .emacs you can use elisp to distinguish various bits of 
your configuration on an OS and computer name basis. Have a look at 
http://sigquit.wordpress.com/2008/09/28/single-dot-emacs-file/ for a 
good guide.

Ian.




Re: [O] Basic question re. spreadsheet function

2014-01-09 Thread Michael Brand
Hi Steve

On Thu, Jan 9, 2014 at 11:13 AM, Steve Dowe stephen.d...@gmail.com wrote:
 $12 = if($9=quoted,$6,0)

Follow this path: http://orgmode.org/worg  Tutorials  Tutorials on
specific features  Tables, Spreadsheet, Plotting  The following are
[...]  most of the automated Emacs Regression Tests (ERT) for Org
tables

There you will find test-org-table/compare and there if($1 == (z),
x, y) which hopefully answers your question. The additional
parentheses are Org specific, not Calc specific.

Michael



Re: [O] working on cloud

2014-01-09 Thread Brett Viren
David Belohrad da...@belohrad.ch writes:

 1) privacy: you're basically giving your data to somebody else. In case
of emacs init there is no danger. In case of your org data, which
might contain sensitive information you want to encrypt it, what
complicates matter when switching between two win/lin machines

An alternative to consider is btsync.  It will provide you similar
functionality as Dropbox but removes reliance on a central server which
is outside your control.  All storage endpoints are peers.  Peers are
authorized by a shared key so only your machines, or maybe your friends
get access - it's not an anonymous p2p system despite the bt in its
name.  You can also allow read-only access.  Even with no well known
server involved I've yet to find a case where peers can not be located
behind firewalls or NAT'ed routers.

Of course, btsync brings it's own issues.  The main one for me is that
it's not Free Software (it is a free-of-charge binary) but then the
server side of Dropbox is even more restricted.  I guess let your own
conscience be the guide here.

Personally, I go the git/github route for .emacs files and a private git
repo for org files.  I would like to not have the (explicit)
commit/push/pull steps for org files and so have been testing btsync.
Ideally there would be some way to marry the benefits of both, but I've
yet to come up with one.

-Brett.


pgpfsIHSXtMGE.pgp
Description: PGP signature


Re: [O] Local variables in org files

2014-01-09 Thread Nick Dokos
Michael Albinus michael.albi...@gmx.de writes:

 Hi,

 I'm trying to save the result of M-x debbugs-org into a file (this is
 a TODO list). For further handling, also some buffer local variables
 must survive. Therefore, I append at the very end of that file something
 like this:

 * Local Variables
 ** Local Variables:
 ** eval: (debbugs-org-mode 1)
 ** debbugs-org-ids: (1 2 3)
 ** End:

 This has the nice effect, that those variables do not disturb in
 overview mode, because they look like

 * Local Variables...

 Being invisible would be even better, but so what.

 Unfortunately, the value of debbugs-org-ids could be very lng,
 exceeding the 3000 chars limit the Local Variables: section size is
 allowed to be in Emacs. So I must rearrange things like this:

 * Local Variables
 ** debbugs-org-ids: (1 2 3)
 ** Local Variables:
 ** eval: (debbugs-org-mode 1)
 ** debbugs-org-ids: (access-the-value-above)
 ** End:

 Is there some functionality in org I could use implementing
 `access-the-value-above'? It is org structure, so I'm hoping there is an
 easy way to access a given node with a well defined position.

 Or maybe there is already a clever way storing local variables in an org
 file, which I'm not aware of.

 Thanks, and best regards, Michael.

Not sure if there are any limits for the top style but maybe you could
combine the two styles of local variables - maybe:

--8---cut here---start-8---
# -*- foo: (1 2 3 4) -*-
* foo

#+BEGIN_SRC elisp
debbugs-org-ids
#+END_SRC

#+RESULTS:
| 1 | 2 | 3 | 4 |

* COMMENT Local variables

** Local Variables:
** eval: (setq debbugs-org-ids foo)
** End:
--8---cut here---end---8---

Nick





Re: [O] working mathjax example

2014-01-09 Thread Nick Dokos
Russell L. Carter rcar...@pinyon.org writes:

 Hi,

 I'm trying to bring up a simple mathjax example.  Org-mode is git
 current and otherwise works fine.  MathJax is git current and lives in
 /opt/mathjax/git/MathJax.js.  Both firefox 26 and chromium 31 display
 the MathJax tests perfectly from my org-html test directory.

 I've copied the example code from the org manual into a file
 containing:

 --cut-herecut-herecut-herecut-herecut-here--

 #+HTML_MATHJAX: align:left mathml:t path:/opt/mathjax/git/MathJax.js
 #+options: latex:verbatim

 \begin{equation}
 x=\sqrt{b}
 \end{equation}

 If $a^2=b$ and \( b=2 \), then the solution must be
 either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].

 --cut-herecut-herecut-herecut-herecut-here--

 I exported per the instructions using org-export-to-html.  The
 exported html file has lots of good stuff suggesting that the export
 seems to be working.  But both firefox and chrome display the math
 bits replaced by [Math Processing Error].  Does anyone have an idea
 what I am doing wrong?

 The actual exported body is (stuff before elided):

 body
 div id=content
 h1 class=titlejson/h1
 \begin{equation}
 x=\sqrt{b}
 \end{equation}

 p
 If \(a^2=b\) and \( b=2 \), then the solution must be
 either $$ a=+\sqrt{2} $$ or \[ a=-\sqrt{2} \].
 /p
 /div
 div id=postamble class=status
 p class=authorAuthor: Russell L. Carter/p
 p class=dateCreated: 2013-11-27 Wed 16:17/p
 p class=creatora href=http://www.gnu.org/software/emacs/;Emacs/a 
 24.3.1
 (a href=http://orgmode.org;Org/a mode 8.2.3c)/p
 p class=validationa
 href=http://validator.w3.org/check?uri=referer;Validate/a/p
 /div
 /body


[This goes in the Better late than never? drawer...]

This works fine for me if I delete the path spec in your HTML_MATHJAX
line, so my guess would be that there's some problem with your local
mathjax setup. Are you sure that your other tests use your local setup?
Maybe they go offsite?

BTW, with mathjax providing a proper CDN, is there any point of having a
local setup[fn:1] or even the default setup at orgmode.org? Maybe the
out-of-the-box default in org should be let the mathjax CDN handle it.

Footnotes:

[fn:1] ... assuming that you want to *use* mathjax, not hack it.

Nick




Re: [O] org-src-fontify-natively Was:Babel language support for Mathematica

2014-01-09 Thread Dov Grobgeld



On Thu, Jan 9, 2014 at 12:39 PM, Bastien b...@gnu.org wrote:

  (setq org-src-fontify-natively t)
 


Just to note that I have the flag turned off because of the bad
interaction between my use of variable-pitch mode in org-mode which is
picked up by the source fontifying. Unfortunately the source codes
fontifiers (at least python) do not cover all the source code
elements, but leave some elements to use the default font. And
non-aligned source code isn't pretty.

Regards,
Dov





Re: [O] Org Table Export to Markdown Table Question

2014-01-09 Thread Rick Frankel

On 2014-01-08 15:41, Aric wrote:
I am trying to use org-mode now with R code in it to write manuscripts. 
That

does unfortunately mean that it must be eventually exported to some doc
format. I have been able to export to markdown and everything looks 
good in
markdown (even previewed on github) with the exception of latex code 
which is
not converted. However, using pandoc to convert the markdown to docx, 
the

tables are not converted properly (all a single column).


I'm not sure why you are using markdown as an intermediate file
format. Org will export to latex, pdf (via latex) and openoffice odt
(which can be exported from open/libre office to doc/docx.).

Both the above exporters are much more mature that the markdown
exporter.

rick



Re: [O] [poll] Fontify code in code blocks

2014-01-09 Thread Rick Frankel

On 2014-01-09 07:22, Sebastien Vauban wrote:

Hello,
(setq org-src-fontify-natively t)

as the default value of `org-src-fontify-natively' is `nil'.

WDYT if we turn it on by default?


+1.



Re: [O] Org Table Export to Markdown Table Question

2014-01-09 Thread Nicolas Goaziou
Hello,

Rick Frankel r...@rickster.com writes:

 On 2014-01-08 15:41, Aric wrote:
 I am trying to use org-mode now with R code in it to write
 manuscripts. That
 does unfortunately mean that it must be eventually exported to some doc
 format. I have been able to export to markdown and everything looks
 good in
 markdown (even previewed on github) with the exception of latex code
 which is
 not converted. However, using pandoc to convert the markdown to
 docx, the
 tables are not converted properly (all a single column).

 I'm not sure why you are using markdown as an intermediate file
 format. Org will export to latex, pdf (via latex) and openoffice odt
 (which can be exported from open/libre office to doc/docx.).

 Both the above exporters are much more mature that the markdown
 exporter.

BTW, Markdown export back-end turns tables into raw HTML code, which,
AFAIK, is allowed in Markdown.


Regards,

-- 
Nicolas Goaziou



Re: [O] Using org-diary

2014-01-09 Thread Eric S Fraga
Nick Dokos ndo...@gmail.com writes:

 Stephen J. Barr stev...@uw.edu writes:

 What I am now seeing is that the particular date gets picked up, but
 not the time. Am I doing something incorrect with the
 syntax?


 No, I believe that's a limitation of what you can do with these
 diary-sexps.

 You can always add the time to the headline: that way it'll appear in
 the agenda (but not in the grid, if you use that, and not sorted
 correctly - the time is just a label):

 *** Teaching 7:00pm-8:30pm
%%(org-class 2014 1 6 2014 3 10 1 1)

 Nick

Does it work if you put the time before the healine text, as the manual
implies (section on time stamps)?  As in

*** 7:00pm-8:30pm Teaching 
%%(org-class 2014 1 6 2014 3 10 1 1)
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




Re: [O] org-cycle-hook from org-mode hook

2014-01-09 Thread Eric S Fraga
François Pinard pin...@iro.umontreal.ca writes:

[...]

 P.S. anal in the Piagetian meaning of the word, of course!  People
 suffering from anal disorder are either ultra-meticulous, or completely
 disorganized.  Most of the time, I see myself as being from the former
 species, yet some days, I confess, I feel like I am from the later.

:)

In my case, I find myself exhibiting the former trait due to the latter
reality... luckily org is here to not only help me be less disorganised
but also more meticulous!
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




Re: [O] Using org-diary

2014-01-09 Thread Eric S Fraga
Nick Dokos ndo...@gmail.com writes:

 Stephen J. Barr stev...@uw.edu writes:

 What I am now seeing is that the particular date gets picked up, but
 not the time. Am I doing something incorrect with the
 syntax?


 No, I believe that's a limitation of what you can do with these
 diary-sexps.

 You can always add the time to the headline: that way it'll appear in
 the agenda (but not in the grid, if you use that, and not sorted
 correctly - the time is just a label):

 *** Teaching 7:00pm-8:30pm
%%(org-class 2014 1 6 2014 3 10 1 1)

 Nick

Actually, this does get inserted correctly, i.e. time sorted.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




Re: [O] Performance issues after upgrading from Emacs 23.3 to 24.3+prelude

2014-01-09 Thread Eric S Fraga
Hi,

Just to add that I have experienced some severe performance hits in a
recent snapshot, particularly noticeable when yanking from the X
clipboard.  I haven't tracked it down yet nor looked on the emacs dev
groups and lists.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.1, Org release_8.2.4-322-gece429




Re: [O] Basic question re. spreadsheet function

2014-01-09 Thread Steve Dowe
On Thu, 2014-01-09 at 16:36 +0100, Michael Brand wrote:

 Follow this path: http://orgmode.org/worg  Tutorials  Tutorials on
 specific features  Tables, Spreadsheet, Plotting  The following are
 [...]  most of the automated Emacs Regression Tests (ERT) for Org
 tables

Wow.. it would have taken a long while for me to find this!

 There you will find test-org-table/compare and there if($1 == (z),
 x, y) which hopefully answers your question. The additional
 parentheses are Org specific, not Calc specific.

It perfectly answers the question.  Thank you.

Lots to discover on worg, evidently!

-- 
  Steve




Re: [O] Basic question re. spreadsheet function

2014-01-09 Thread Steve Dowe
On Thu, 2014-01-09 at 09:04 -0500, Nick Dokos wrote:
 Until those are fixed, you can consult the org-mode manual on your own
 machine using emacs Info: C-h i should get you to the initial page and
 you can drill down. But Info offers search as well and it's integrated
 with emacs so e.g. if you evaluate this form in emacs, you'll get to
 the appropriate section:
 
 (info (org) Formula syntax for Calc)
 
 You can then follow the links to the calc documentation.

Thanks for this.  It appears I don't have an org info page installed,
which will be my next challenge :)

I must admit, I need to get more into the habit of consulting Emacs' own
help system.  Thanks for reminding me of it.

-- 
  Steve




Re: [O] Corrupted TBLFM after table edit

2014-01-09 Thread Michael Brand
Hi Bastien

On Thu, Jan 9, 2014 at 12:14 PM, Bastien b...@altern.org wrote:
 Michael Brand michael.ch.br...@gmail.com writes:
 I suggest to solve this completely differently by replacing the greedy
 (re-search-forward ^\\S-*$\\|\\' nil t) and not using s-end any
 more. I would change the while to

 (while (let ((case-fold-search t)) (looking-at [ \t]*#\\+tblfm:))
   [...]
   (forward-line))

 which is simple and water-proof.

 Yes, sure, please go ahead -- thanks in advance,

Done.

Michael



Re: [O] Performance issues after upgrading from Emacs 23.3 to 24.3+prelude

2014-01-09 Thread Karl Voit
* Bastien b...@gnu.org wrote:
 Karl Voit devn...@karl-voit.at writes:

 I guess that with Emacs prelude, I got some functionality which is
 causing these issues. So this might be of interest of other
 Emacs/prelude users as well.

 Yes, probably, since the Org version is the same :)
 Better ping the Emacs prelude devs directly IMHO.

Today, I did another test. I converted my config to Emacs24 with the
most current Org-mode from git and without prelude at all.

Unfortunately, the performance issue stayed :-(

IMHO, the profiler reports showed a common pattern: a reasonable
amount of CPU got into line-number-at-pos if I read the profiler
report correctly. (see below)

I also turned off all visible minor modes from the mode line. No
change.

Since prelude is out of this game, what can I check to find the
source of this poor performance?


profiler report (CPU) of ~M-up~ of a simple list item without prelude:
#+BEGIN_EXAMPLE
- command-execute1280  98%
 - call-interactively1280  98%
  - org-metadown 1004  77%
   - run-hook-with-args-until-success1004  77%
- org-babel-pop-to-session-maybe 1004  77%
 - org-babel-get-inline-src-block-matches1000  76%
line-number-at-pos   1000  76%
  - byte-code 265  20%
   - read-extended-command265  20%
- completing-read 265  20%
 - completing-read-default265  20%
  - read-from-minibuffer  253  19%
   + command-execute   43   3%
   + redisplay_internal (C function)3   0%
  + execute-extended-command   11   0%
+ ...  15   1%
+ redisplay_internal (C function)   4   0%
#+END_EXAMPLE

profiler-report (CPU) of ~C-c C-c~ in a simple table without prelude:
#+BEGIN_EXAMPLE
 command-execute   17492  94%
 - call-interactively   17492  94%
  - org-ctrl-c-ctrl-c   16137  86%
   - org-table-align 5844  31%
+ org-indent-refresh-maybe  8   0%
  org-table-goto-column 4   0%
   - run-hook-with-args-until-success4469  24%
- org-babel-execute-safely-maybe 4469  24%
 - org-babel-execute-maybe   4469  24%
  - org-babel-execute-src-block-maybe4469  24%
   - org-babel-get-inline-src-block-matches  4449  23%
  line-number-at-pos 4449  23%
 org-babel-where-is-src-block-head 16   0%
  + byte-code1311   7%
  + minibuffer-complete33   0%
  + execute-extended-command7   0%
+ timer-event-handler1076   5%
+ ...  24   0%
+ redisplay_internal (C function)  14   0%
#+END_EXAMPLE

profiler-report (CPU) of ~M-down~ of a heading containing
approx. 2 lines of appointments and notes without prelude:
#+BEGIN_EXAMPLE
- command-execute  123676  83%
 - call-interactively  123676  83%
  - org-metaup 115952  77%
   - call-interactively 87337  58%
- org-move-subtree-up   87337  58%
 - org-move-subtree-down87225  58%
  - insert-before-markers   86598  58%
   - org-indent-refresh-maybe   86594  58%
- org-indent-add-properties 82086  55%
 - org-at-item-p72884  48%
  - org-list-in-valid-context-p 69497  46%
   - org-in-block-p 69493  46%
- byte-code 69421  46%
 - mapc 63094  42%
  - #compiled 0xf1d27b

Re: [O] [BABEL] Define tables with names in org?

2014-01-09 Thread Eric Schulte
Rainer M Krug rai...@krugs.de writes:

 On 01/09/14, 13:30 , Christian Moe wrote:

 Rainer M Krug writes:

 I would like to define a table with named columns and rows, so
 that the table is passed to R including the column and row names
 - is this possible?

 Yes, just use the leftmost column for row names and include the
 header argument :rownames yes.

 By default, the first row will be used for column names if followed
 by a hline. Without a hline, use :colnames yes.

 E.g.:

 #+name: colrownamestbl || Alpha | Beta | Gamma |
 |+---+--+---| | First  | A1| B1   | C1
 | | Second | A2| B2   | C2| | Third  | A3| B3   | C3
 |

 #+begin_src R :var data=colrownamestbl :rownames yes :results
 output colnames(data) rownames(data) #+end_src

 #+RESULTS: : [1] Alpha Beta  Gamma : [1] First  Second
 Third

 Ah - I see. Nice. Thanks.

 One problem though:

 I define my variables in the beginning of the document, in a not
 exported heading so that they don't show in the report, and I want to
 have some variables with rownames and some without. Is this possible?


See Indexable variable values under (info (org)var), it may help.


 * INTERNAL VARIABLES :noexport:

 ** Without column names
 #+NAME: WITHCOLNAMES
 | name  |
 |---|
 | NPPyC |
 | DBBVy |
 | DBRFy |
 | DBSSy |
 | levelstress_2 |
 #+PROPERTY: var+ WITHCOLNAMES=WITHCOLNAMES

 ** Without column names
 #+NAME: COLS_TO_EVAL
 | name  |
 |---|
 | NPPyC |
 | DBBVy |
 | DBRFy |
 | DBSSy |
 | levelstress_2 |
 #+PROPERTY: var+ COLS_TO_EVAL=COLS_TO_EVAL

 And this should be valid everywhere where I use WITHCOLNAMES and
 WITHOUTCOLNAMES in R without having to specify :rownames true each time?

 Rainer



 Yours, Christian


 --
 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

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] Performance issues after upgrading from Emacs 23.3 to 24.3+prelude

2014-01-09 Thread Nicolas Goaziou
Hello,

Karl Voit devn...@karl-voit.at writes:

 IMHO, the profiler reports showed a common pattern: a reasonable
 amount of CPU got into line-number-at-pos if I read the profiler
 report correctly. (see below)

Does the following patch improve the situation?


Regards,

-- 
Nicolas Goaziou
From 54b8e7466d4689be3c34f7041244563771e2178a Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Thu, 9 Jan 2014 20:36:23 +0100
Subject: [PATCH] ob-core: Speed improvement

* lisp/ob-core.el (org-babel-get-inline-src-block-matches): Do not
  compute line number if all is needed is to know if we're on the
  first one.
---
 lisp/ob-core.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index f06cdaf..e8943c6 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -217,7 +217,7 @@ Returns non-nil if match-data set
   (let ((src-at-0-p (save-excursion
 		  (beginning-of-line 1)
 		  (string= src (thing-at-point 'word
-	(first-line-p (= 1 (line-number-at-pos)))
+	(first-line-p (= (line-beginning-position) (point-min)))
 	(orig (point)))
 (let ((search-for (cond ((and src-at-0-p first-line-p  src_))
 			(first-line-p [[:punct:] \t]src_)
-- 
1.8.5.2



[O] Note/hint on latex export of listings w/ lstlistings

2014-01-09 Thread Robert Klein
Hi,

if you want to export e.g. config file snippets using src blocks,
you can

(add-to-list 'org-latex-listings-langs
 '(text  ))

in your configuration.


You have to take care to put a blank between the double quotes ( 
instead of ) or you can't run the export through (pdf)latex.


The reason is, the function org-latex--make-option-string returns
language for empty double quotes, resulting in e.g.:

\lstset{language,numbers=none}


A blank between the double quotes causes org-latex--make-option-string
to return language=  and results in a latex-compilable:

\lstset{language= ,numbers=none}


This is nice to know, when you're documenting configurations or
configuration files.

Best regards
Robert






Re: [O] Performance issues after upgrading from Emacs 23.3 to 24.3

2014-01-09 Thread Karl Voit
Hi Nicolas!

* Nicolas Goaziou n.goaz...@gmail.com wrote:

 Hello,

 Karl Voit devn...@karl-voit.at writes:

 IMHO, the profiler reports showed a common pattern: a reasonable
 amount of CPU got into line-number-at-pos if I read the profiler
 report correctly. (see below)

 Does the following patch improve the situation?

Yes!

M-up/down of list item is fast again.

Re-calculate table is fast again.

Wohoo! :-) Thanks!


However, M-up/down of a big heading is still slow (see profile
below). Probably, I am able to find other examples of slow behavior
on the weekend, where I am using the Linux-machine that has the
issue.

profiler-report (CPU) of ~M-down~ of a heading containing
approx. 2 lines of appointments and notes without prelude and
with patch:
#+BEGIN_EXAMPLE
- command-execute   84760  70%
 - call-interactively   84760  70%
  - org-metaup  83960  69%
   - call-interactively 83960  69%
- org-move-subtree-up   83960  69%
 - org-move-subtree-down83924  69%
  - insert-before-markers   83308  69%
   - org-indent-refresh-maybe   83300  69%
- org-indent-add-properties 82729  68%
 - org-at-item-p73452  61%
  - org-list-in-valid-context-p 69849  58%
   - org-in-block-p 69841  58%
- byte-code 69781  58%
 - mapc 63655  53%
  - #compiled 0x8ce3c363595  52%
   - org-between-regexps-p  63467  52%
- org-at-regexp-p   32900  27%
   byte-code32817  27%
  byte-code12   0%
   outline-previous-heading  2885   2%
   outline-next-heading  2785   2%
   org-list-item-body-column  857   0%
   org-get-indentation  8   0%
 org-element--cache-before-change   4   0%
 jit-lock-after-change  4   0%
  + org-clean-visibility-after-subtree-move   572   0%
  + outline-end-of-subtree 12   0%
  + hide-subtree   12   0%
  + byte-code 784   0%
  + minibuffer-complete 8   0%
  + execute-extended-command8   0%
- timer-event-handler   34748  28%
 - byte-code34748  28%
  - apply   34748  28%
   - org-indent-initialize-agent34748  28%
- org-indent-initialize-buffer  34748  28%
 - byte-code34748  28%
  - org-indent-add-properties   30627  25%
   - org-at-item-p  22699  18%
- org-list-in-valid-context-p   20136  16%
 - org-in-block-p   20136  16%
  - byte-code   20040  16%
   - mapc   17820  14%
- #compiled 0x8ce3c3  17772  14%
 - org-between-regexps-p17705  14%
  - org-at-regexp-p  9070   7%
 byte-code   9040   7%
byte-code   4   0%
 outline-previous-heading1031   0%
 outline-next-heading 969   0%
 org-get-indentation  524   0%
 org-list-item-body-column476   0%
 org-inlinetask-in-task-p  23   0%
   + byte-code 12   0%
+ ... 475   0%
+ redisplay_internal (C function)  12   0%
#+END_EXAMPLE

-- 

Re: [O] Org Table Export to Markdown Table Question

2014-01-09 Thread Aric Gregson
--On January 9, 2014 11:58:37 AM -0500 Rick Frankel r...@rickster.com 
wrote:



I'm not sure why you are using markdown as an intermediate file
format. Org will export to latex, pdf (via latex) and openoffice odt
(which can be exported from open/libre office to doc/docx.).


I had originally tried because of problems with the odt exporter, which 
appears to have been fixed with the recent release, as noted previously. 
Markdown is still extremely useful for formatting references/bibliographies 
with bibtex and csl. Latex is not as useful because it is nearly impossible 
to share latex files with those using Word and most journals in my field do 
not accept latex files.


Thanks, Aric



Re: [O] [PATCH] Strip text properties from string code block arguments

2014-01-09 Thread Achim Gratz
Daniel Gerber writes:
 Not quite. I thought %S was not a typo because it escapes characters
 more nicely. E.g. with %s the buffer should contain \\\ to mean 
 in python.

If that's the intention, then %S is arguably a latent bug, since the
escaping it applies can only by accident be compatible with the targeted
language.  I don't know if something like shell-quote arguments exists
for arbitrary programming languages.


Regards,
Achim.
-- 
+[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Auto-creating a numbered list from pasted section?

2014-01-09 Thread Sharon Kimble
Eric Abrahamsen e...@ericabrahamsen.net wrote:
Bastien b...@gnu.org writes:

 Hi Sharon,

 Sharon Kimble boudic...@talktalk.net writes:

 In an org-mode document I can h which when TABBED gives me 
 #+BEGIN_HTML

 #+END_HTML

 In the same document I have a list of numbered items, actually
academic
 references, is it possible using something like r to have each and
 every one done as part of a numbered list please? It would be so
much
 simpler than going through numbering each and every one by hand!

 I'm not sure what you mean by

   done as part of a numbered list

 As for re-numbering items from a numbered list, moving one item up
and
 down will renumber the whole list automagically.

 Please give more details if this does not reply your question.

Also not sure what you mean, but maybe mark all the things you want to
be list items, and then use C-c - to actually make them list items?
Hit that again a few times to cycle through ordered/unordered, etc.

That's my guess.

Thanks for this, you'll have to bear with me as I have no Internet access atm 
due to a fault on the line. 

This is referring to a academic reference list on a medical journal reference 
list, where the articles are referenced in the body of the article and then all 
listed at the end in numbered order as they appear in the article. 

What I'm after is some way of auto-numbering a highlighted number of references 
so that I don't have to number them all by hand. 

Sharon. 
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: [O] Local variables in org files

2014-01-09 Thread Michael Albinus
Nick Dokos ndo...@gmail.com writes:

 Not sure if there are any limits for the top style but maybe you could
 combine the two styles of local variables - maybe:

 # -*- foo: (1 2 3 4) -*-

This would move the problem to the headline. No idea, whether there is a
limit (to be tested). But this extremely long and ugly headline would be
visible - nothing I like to offer :-(

But maybe we don't need the Local Variables block? Code blocks could help?

--8---cut here---start-8---
* COMMENT Local Variables

#+NAME: init
#+BEGIN_SRC elisp
(set (make-local-variable 'debbugs-org-ids) '(1 2 3))
#+END_SRC

#+CALL: init
--8---cut here---end---8---

However, I must have misread the documentation. The #+CALL: init
directive has no effect when loading a respective xxx.org file :-(

Best regards, Michael.



Re: [O] Performance issues after upgrading from Emacs 23.3 to 24.3

2014-01-09 Thread Nicolas Goaziou
Karl Voit devn...@karl-voit.at writes:

 M-up/down of list item is fast again.

 Re-calculate table is fast again.

 Wohoo! :-) Thanks!

Applied. Thank you for the report.

 However, M-up/down of a big heading is still slow (see profile
 below). Probably, I am able to find other examples of slow behavior
 on the weekend, where I am using the Linux-machine that has the
 issue.

This operation is bound to be slow anyway. On top of it, you use
`org-indent-mode', which can be costly on large buffer changes.

Is it really worse than in 23.3?

Also, would you mind testing the following patch on top of master?
I don't expect much out of it since you're moving a behemoth, but it may
help.


Regards,

-- 
Nicolas Goaziou
From 6681efd30c34e86ede597b5b9ec219c9358fc7eb Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Thu, 9 Jan 2014 21:59:59 +0100
Subject: [PATCH] Try something out

---
 lisp/org-list.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index c0cf77e..f85c19b 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -134,6 +134,8 @@
 (declare-function org-export-string-as ox
 		  (string backend optional body-only ext-plist))
 
+(declare-function org-element-type org-element (element))
+
 
 
 
@@ -489,10 +491,13 @@ group 4: description tag)
 	   (t (forward-line -1)))
 
 (defun org-at-item-p ()
-  Is point in a line starting a hand-formatted item?
+  Non-nil when point is in a line starting a list item.
   (save-excursion
 (beginning-of-line)
-(and (looking-at (org-item-re)) (org-list-in-valid-context-p
+(and (looking-at (org-item-re))
+	 (or (not (derived-mode-p 'org-mode))
+	 (memq (org-element-type (save-match-data (org-element-at-point)))
+		   '(item plain-list))
 
 (defun org-at-item-bullet-p ()
   Is point at the bullet of a plain list item?
-- 
1.8.5.2



[O] [RFC] img vs object in HTML export

2014-01-09 Thread Nick Dokos
Summary
---
I'm wondering whether it's a good idea to chnage the HTML exporter's
handling of images: my specific proposal is to use object tags instead
of img tags.

Rationale
--
I got data to plot and I wanted to use SVG, rather than PNG,
in order to be able to resize the plots to fit whatever projection
requirements I came up against. I use gnuplot which has a nice svg
terminal that also includes some javascript functions that allow
interactive manipulation of the plot (e.g. you can click on the label
of a dataset in the legend of the plot to toggle its visibility -
that's something I really want.)

I found out that if I opened the SVG file in my browser, I could use
the interactivity features that gnuplot provides, but if I visit
the HTML page that includes all the plots, the interactivity was lost.

Googling a bit, I found out about object vs img, changed the img
tags to object tags and presto! interactivity!

Example
---
Here is a simple example org file:

--8---cut here---start-8---
* Plots


#+BEGIN_SRC gnuplot :var tbl=foo.tbl :results output :file foo.svg
set terminal svg size 1024,512 dynamic mouse standalone
set xrange [0:5]
set xlabel x
set yrange [0:*]
set ylabel y

set datafile missing  

plot tbl using 1:2 title squares, '' using 1:3 title cubes, '' using 1:4 
title fourth powers
#+END_SRC

#+BEGIN_SRC gnuplot :var tbl=foo.tbl :results output :file foo.png
set terminal png size 1024,512
set xrange [0:5]
set xlabel x
set yrange [0:*]
set ylabel y

set datafile missing  

plot tbl using 1:2 title squares, '' using 1:3 title cubes, '' using 1:4 
title fourth powers
#+END_SRC

** data 
  :noexport:
#+name: foo.tbl
| 1 | 1 | 1 | 1 |
| 2 | 4 | 8 | 16 |
| 3 | 9 | 27 | 81 |
| 4 | 16 | 64 | 256 |

--8---cut here---end---8---

Exporting this to HTML produces img tags like this:

,
| div class=figure
| pimg src=foo.svg alt=foo.svg /
| /p
| /div
| 
| 
| div class=figure
| pimg src=foo.png alt=foo.png /
| /p
| /div
`

I attach a patch[fn:1] that changes these to object tags (the patch is
proof-of-concept only, not meant for integration into org core - it'll
need a fair amount of work before that happens, if it ever happens.)
With the patch, the relevant output is changed to this:

,
| div class=figure
| pobject data=foo.svg type=image/svg+xml /object
| /p
| /div
| 
| 
| div class=figure
| pobject data=foo.png type=image/png /object
| /p
| /div
`

I attach the HTML files for your amusement.[fn:2]

Open questions
--
Do I have this right? I'm neither an SVG nor an HTML expert. If there is
another way to do what I want, please let me know.

Do most browsers support object tags? Do they do the right thing with
images in object tags?

I tested this with Google Chrome (Version 31.0.1650.63) and Firefox
(Version 25.0), both on Linux. I have not tested any other browsers on
Linux and I have not tested *any* browsers on any other OSes. There are
probably compatibility problems which would imply that any change in org
mode would have to be made conditional on some global option
(org-html-accommodate-obsolete-browsers perhaps :-) - default would be t
to leave everything as it is currently i.e. img tags.)

BTW, I tried using

object data=foo.png type=image/png/

at first, but Chrome did not handle it correctly in my testing, whereas
it handles the

object data=foo.png type=image/png /object

form correctly. I did not try the first form with FF: there was no point.

So, WDYT?

Footnotes:

[fn:1] From 0529562b428d421f8aaf398bc604bc8d2f9498e8 Mon Sep 17 00:00:00 2001
From: Nick Dokos ndo...@redhat.com
Date: Thu, 9 Jan 2014 15:38:28 -0500
Subject: [PATCH] Use object tags instead of img

---
 lisp/ox-html.el | 28 +++-
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index 7dbbfc8..b57c97d 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1317,9 +1317,11 @@ CSS classes, then this prefix can be very useful.
   (let ((dt (downcase (plist-get info :html-doctype
 	(member dt '(html5 xhtml5 !doctype html
 
-(defun org-html-close-tag (tag attr info)
+(defun org-html-close-tag (tag attr info optional longopt)
   (concat  tag   attr
-	  (if (org-html-xhtml-p info)  / )))
+	  (if (not longopt)
+	  (if (org-html-xhtml-p info)  / )
+	(concat  / tag 
 
 (defun org-html-doctype (info)
   Return correct html doctype tag from `org-html-doctype-alist',
@@ -1362,6 +1364,12 @@ arguments CAPTION and LABEL are given, use them for caption and
 			\np%s/p)
 		  caption)
 
+(defun org-html-image-type (source info)
+  (let ((suffix (file-name-extension source)))
+(if (string= suffix svg)
+	svg+xml
+  suffix)))
+
 (defun org-html--format-image (source attributes info)
   Return \img\ tag with given SOURCE and ATTRIBUTES.
 SOURCE 

Re: [O] Local variables in org files

2014-01-09 Thread Sebastien Vauban
Hello Michael,

Michael Albinus wrote:
 Nick Dokos ndo...@gmail.com writes:

 Not sure if there are any limits for the top style but maybe you could
 combine the two styles of local variables - maybe:

 # -*- foo: (1 2 3 4) -*-

 This would move the problem to the headline. No idea, whether there is a
 limit (to be tested). But this extremely long and ugly headline would be
 visible - nothing I like to offer :-(

 But maybe we don't need the Local Variables block? Code blocks could help?

 * COMMENT Local Variables

 #+NAME: init
 #+BEGIN_SRC elisp
 (set (make-local-variable 'debbugs-org-ids) '(1 2 3))
 #+END_SRC

 #+CALL: init

 However, I must have misread the documentation. The #+CALL: init
 directive has no effect when loading a respective xxx.org file :-(

Nope, it doesn't, but you can add an `eval' directive in your Local
Variables section, and evaluate a call to the init block, like this:

--8---cut here---start-8---
# Local variables:
# eval: (sbe init)
# End:
--8---cut here---end---8---

Best regards,
  Seb

-- 
Sebastien Vauban




Re: [O] Local variables in org files

2014-01-09 Thread Michael Albinus


Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 Hello Michael,

Hi Sebastien,

 However, I must have misread the documentation. The #+CALL: init
 directive has no effect when loading a respective xxx.org file :-(

 Nope, it doesn't, but you can add an `eval' directive in your Local
 Variables section, and evaluate a call to the init block, like this:

 # Local variables:
 # eval: (sbe init)
 # End:

That does the trick. Thanks a lot!

 Best regards,
   Seb

Best regards, Michael.




Re: [O] Local variables in org files

2014-01-09 Thread Nick Dokos
Sebastien Vauban sva-n...@mygooglest.com
writes:

 Hello Michael,

 Michael Albinus wrote:
 Nick Dokos ndo...@gmail.com writes:

 Not sure if there are any limits for the top style but maybe you could
 combine the two styles of local variables - maybe:

 # -*- foo: (1 2 3 4) -*-

 This would move the problem to the headline. No idea, whether there is a
 limit (to be tested). But this extremely long and ugly headline would be
 visible - nothing I like to offer :-(

 But maybe we don't need the Local Variables block? Code blocks could help?

 * COMMENT Local Variables

 #+NAME: init
 #+BEGIN_SRC elisp
 (set (make-local-variable 'debbugs-org-ids) '(1 2 3))
 #+END_SRC

 #+CALL: init

 However, I must have misread the documentation. The #+CALL: init
 directive has no effect when loading a respective xxx.org file :-(

 Nope, it doesn't, but you can add an `eval' directive in your Local
 Variables section, and evaluate a call to the init block, like this:

 # Local variables:
 # eval: (sbe init)
 # End:


Nice!




Re: [O] [poll] Fontify code in code blocks

2014-01-09 Thread Alexander Baier


On 2014-01-09 13:22 Sebastien Vauban wrote:
 WDYT if we turn it on by default?

+1. I turned this on the minute I found out about this feature. This was
one of the many wow-moments while discovering Org-mode.

Regards,
-- 
 Alexander Baier




Re: [O] Org Table Export to Markdown Table Question

2014-01-09 Thread Alan L Tyree

On 10/01/14 07:30, Aric Gregson wrote:
--On January 9, 2014 11:58:37 AM -0500 Rick Frankel 
r...@rickster.com wrote:



I'm not sure why you are using markdown as an intermediate file
format. Org will export to latex, pdf (via latex) and openoffice odt
(which can be exported from open/libre office to doc/docx.).


I had originally tried because of problems with the odt exporter, 
which appears to have been fixed with the recent release, as noted 
previously. Markdown is still extremely useful for formatting 
references/bibliographies with bibtex and csl. Latex is not as useful 
because it is nearly impossible to share latex files with those using 
Word and most journals in my field do not accept latex files.
I am in the same fix -- writing in Org but needing to submit most things 
in Word. Damned annoying.


It really would be nice to see Org get the references/bibliography 
problem fixed up properly. The Pandoc version of Markdown does it well. 
As you note, bibtex and csl is a killer combination.


Org is so nice to use for authoring that I can't give it away. I have a 
book manuscript due in May and currently all my citations are using the 
[[cite: key]] format with ox-bibtex. It is far from satisfactory and I'm 
sure that May will see me tearing my hair out (what little is left).


Cheers,
Alan



Thanks, Aric





--
Alan L Tyreehttp://www2.austlii.edu.au/~alan
Tel:  04 2748 6206  sip:typh...@iptel.org




Re: [O] Auto-creating a numbered list from pasted section?

2014-01-09 Thread Eric Abrahamsen
Sharon Kimble boudic...@talktalk.net writes:

 Eric Abrahamsen e...@ericabrahamsen.net wrote:

 Bastien b...@gnu.org writes:
 
 Hi Sharon,
 
 Sharon Kimble boudic...@talktalk.net writes:
 
 In an org-mode document I can h which when TABBED gives me 
 #+BEGIN_HTML
 
 #+END_HTML
 
 In the same document I have a list of numbered items, actually 
 academic
 references, is it possible using something like r to have each 
 and
 every one done as part of a numbered list please? It would be so 
 much
 simpler than going through numbering each and every one by hand!
 I'm not sure what you mean by
 
 done as part of a numbered list
 
 As for re-numbering items from a numbered list, moving one item 
 up and
 down will renumber
 the whole list automagically.
 
 Please give more details if this does not reply your question.
 
 Also not sure what you mean, but maybe mark all the things you want to
 be list items, and then use C-c - to actually make them list items?
 Hit that again a few times to cycle through ordered/unordered, etc.
 
 That's my guess.
 
 
 

 Thanks for this, you'll have to bear with me as I have no
 Internet access atm due to a fault on the line.

 This is referring to a academic reference list on a medical
 journal reference list, where the articles are referenced in the
 body of the article and then all listed at the end in numbered
 order as they appear in the article.

 What I'm after is some way of auto-numbering a highlighted number
 of references so that I don't have to number them all by hand.

That still sounds to me like you're creating a numbered list from what
is currently just a series of lines and paragraphs. Or else you're
trying to do what org footnotes do: automatically link the numbering
between the in-text references, and the article list at the end. Maybe
try footnotes?

If this isn't right, maybe show us a simple example of the text you've
got, and what you're hoping to do.

Eric




Re: [O] Local variables in org files

2014-01-09 Thread Thomas S. Dye


Aloha Seb,

Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org
writes:

 Nope, it doesn't, but you can add an `eval' directive in your Local
 Variables section, and evaluate a call to the init block, like this:

 # Local variables:
 # eval: (sbe init)
 # End:

 Best regards,
   Seb

Thanks for this! 

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com