Re: [O] ECM for: issues with publishing to LaTeX using #INCLUDE

2015-06-18 Thread Robert Klein
On Thu, 18 Jun 2015 09:55:16 +0200
Nicolas Goaziou m...@nicolasgoaziou.fr wrote:

Hello,

thank you very much for your effort!

I boiled it down further and now don't even need an #include to see
this issues.  Using the same .emacs as in the earlier mail and having
three org files 1.org, 2.org, and 3.org all having the same contents:

--- snip ---
#+TITLE: Frequently Asked Questions

#+OPTIONS: toc:nil author:t ^:t creator:nil email:t tex:t

#+name: docinfo
#+begin_src elisp :exports none
  (let ((props (org-export-get-environment)))
(concat  #+LaTeX_HEADER: \\newcommand{\\myTitle}{
 (org-element-interpret-data
  (plist-get props :title))
 }\n))
#+end_src

#+CALL: docinfo() :exports results :results raw

#+LaTeX_CLASS: scrartcl
#+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
headsepline, headings=normal, DIV=12, BCOR=12mm]
#+OPTIONS: toc:t

* Headline
Some Text

--- snip ---


I also get the first file in the publishing process exports Ok, the
rest is not Ok.

When I delete the LaTeX_CLASS_OPTIONS line the whole project publishes
without issues.

The same happens when I delete the #+Options: toc:t line below the
class options line.

Best regards
Robert




 Hello,
 
 Robert Klein rokl...@roklein.de writes:
 
  On Thu, 18 Jun 2015 09:15:50 +0200
  Robert Klein rokl...@roklein.de wrote:
 
   
  The file exported first exports Ok, the others don't.
 
  Sorry, the file _published_ first exports Ok, the others not.
 
  For the ECM I export w/ org-publish-project.
 
 Thanks for the ECM. I will investigate by the end of the week. Do not
 hesitate to post any additional information.
 
 Regards,
 




Re: [O] helm-bibtex questions

2015-06-18 Thread Xebar Saram
Hi Titus and thx so much for the answers!

i will in the future use the github page to make requests.

The number of matches will be displayed in the mode line. 

i see that now thx! :) the problem was(is) that its colored black on my
black modline BG which makes it invisible ;-) i assume thats an helm config
i need to change


If you don’t want to type these search expressions, you could create a
command that invokes helm-bibtex with a default search expression and that
command could be bound to a keyboard shortcut.

that would be prefect for me and a solution to my issue. would you mind
giving an example of such a code chunk. unfortunately i dont know elisp though
as john recommended i will do my best this summer when the semester ends to
try and pick it up :)

i will definitely use your tag system as you recommended, sounds perfect
for me

thanks again for your kind help and the amazing app ;-)

best

Z



On Wed, Jun 17, 2015 at 11:02 PM, Titus von der Malsburg malsb...@posteo.de
 wrote:


 On 2015-06-17 Wed 11:08, Xebar Saram wrote:
  Hi Titus
 
  I have been exploring helm-bibtex a bit today and have some questions.
 btw
  is this the preferred way to make requests/ask questions or is
  github preferred?

 Helm-bibtex is not part of org (although it tries to work well with
 org).  So I’m not sure whether this list is the best place for
 discussing it.  For now the issue tracker on Github might be a better
 option:

   https://github.com/tmalsburg/helm-bibtex/issues

  in any case i was wondering a few things:
 
  1. is it possible to have custom sorting? i want all views to sort by
  Author, year, month

 I prefer to see the entries in the (inverse) order in which they appear
 in the BibTeX file.  This way, recent additions show up at the
 top.  However, I agree that sorting would be useful (see issues #5 and
 #21); it just doesn’t have high priority for me.  Pull requests welcome.

  2. i would really like a way to have stored smart groups (like the jabref
  dynamic groups if your aware of that). that is for example create a group
  that auto selects all publications i have (by my first/last name) and
 shows
  the count (in numbers) of these publications.

 I’m not familiar with smart groups but it seems that all helm-bibtex is
 doing is giving you very flexible smart groups defined by your search
 expressions.  For example, if you want a list of your publications, you
 can simple enter your name.  And if you want a list of your articles,
 you can enter your name + “article”.  If you want all your articles from
 2010, enter your name + “articles 2010”.  And so on.  The number of
 matches will be displayed in the mode line.  If you don’t want to type
 these search expressions, you could create a command that invokes
 helm-bibtex with a default search expression and that command could be
 bound to a keyboard shortcut.

  Another example is a group to keep track of all the papers im working on
 or
  invloved with by matching keyword author and prep/*other key word

 I use two BibTeX fields to tag entries: “keywords” for keywords
 describing the content of the paper (as usual) and “tags” for meta
 data.  Values that I use in tags are “own”, “manuscript”, “poster”,
 “talk”, … So if I want a list of all articles in progress, I search for
 “own manuscript”.  Since the tags field is non-standard, it has to be
 added to `helm-bibtex-additional-search-fields`.

 Another solution would be to use the pubstate field and to search for
 your name and “forthcoming” (add pubstate to
 helm-bibtex-additional-search-fields for this to work).

  3.is it possible to ass an option to auto generate a bibkey for a
 selected
  citation based on user criteria such as author(date)short-title?

 Maintaining the content of the BibTeX file not really in the scope of
 helm-bibtex (I prefer to write my BibTeX entries by hand).  Perhaps
 org-ref or ebib can help here?  Once you have a function that generates
 a new key and inserts it in the BibTeX file, you can easily add it to
 the list of actions in helm-bibtex.

 Hope that helps.

   Titus

  thx so much in advance, you and john have given me confidence to finally
  dive into the whole latex/bibteX world
 
  best
 
  Z




Re: [O] [feature request] org-capture-window-setup to stop capture window taking up whole frame

2015-06-18 Thread Xebar Saram
thx again Alan

i do get an error if i eval (org-capture nil t)
the error is:

Debugger entered--Lisp error: (error No capture template referred to by
\t\ keys)
  signal(error (No capture template referred to by \t\ keys))
  error(No capture template referred to by \%s\ keys t)
  org-capture-select-template(t)
  org-capture(nil t)
  eval((org-capture nil t) nil)
  eval-expression((org-capture nil t) nil)
  call-interactively(eval-expression nil nil)
  command-execute(eval-expression)

any ideas?

thx

Z


On Thu, Jun 18, 2015 at 2:45 PM, Alan Schmitt 
alan.schm...@polytechnique.org wrote:

 On 2015-06-18 13:16, Xebar Saram zelt...@gmail.com writes:

  Hi Alan
 
  your code seems very intersting and i have been looking for something
 like
  this for a while. yet for me it opens a new frame without org capture. i
 use
  linux (arch) and put in the following code. please note that when i
 evaled
  your code it said:
  `flet' is an obsolete macro (as of 24.3); use either `cl-flet' or
 `cl-letf'.
  so i changed flet to cl-flet and it still didnt work :)

 I don't know how to change this code to not use flet, so I live with the
 warning.

 
  here is the code
 
  (defun make-orgcapture-frame ()
  Create a new frame and run org-capture.
  (interactive)
  (make-frame '((name . remember) (width . 80) (height . 16)
  (top . 400) (left . 300)
  (font . Pragmata Pro-16)
  ))
  (select-frame-by-name remember)
  (delete-other-windows)
  (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
  (org-capture nil t)))
 
  ;; delete the frame in that case
  (add-hook 'org-capture-after-finalize-hook
  (lambda ()
  (when (equal
  (cdr (assoc 'name (frame-parameters (selected-frame
  remember)
  (delete-frame
 
  any ideas?

 - if you evaluate ( M-: ) (org-capture nil t), does it start
   a capture?
 - if yes, can you get rid of the flet and just have (org-capture nil
   t) instead (it should create a frame a split the window in two with
   a capture buffer)
 - if it still works like this, then the problem is in the flet, and
   I don't know what to do.

 Alan

 --
 OpenPGP Key ID : 040D0A3B4ED2E5C7
 Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm



Re: [O] [feature request] org-capture-window-setup to stop capture window taking up whole frame

2015-06-18 Thread Alan Schmitt
On 2015-06-18 13:16, Xebar Saram zelt...@gmail.com writes:

 Hi Alan

 your code seems very intersting and i have been looking for something like
 this for a while. yet for me it opens a new frame without org capture. i use
 linux (arch) and put in the following code. please note that when i evaled
 your code it said:
 `flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'.
 so i changed flet to cl-flet and it still didnt work :)

I don't know how to change this code to not use flet, so I live with the
warning.


 here is the code

 (defun make-orgcapture-frame ()
 Create a new frame and run org-capture.
 (interactive)
 (make-frame '((name . remember) (width . 80) (height . 16)
 (top . 400) (left . 300)
 (font . Pragmata Pro-16)
 ))
 (select-frame-by-name remember)
 (delete-other-windows)
 (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
 (org-capture nil t)))

 ;; delete the frame in that case
 (add-hook 'org-capture-after-finalize-hook
 (lambda ()
 (when (equal
 (cdr (assoc 'name (frame-parameters (selected-frame
 remember)
 (delete-frame

 any ideas?

- if you evaluate ( M-: ) (org-capture nil t), does it start
  a capture?
- if yes, can you get rid of the flet and just have (org-capture nil
  t) instead (it should create a frame a split the window in two with
  a capture buffer)
- if it still works like this, then the problem is in the flet, and
  I don't know what to do.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm


signature.asc
Description: PGP signature


Re: [O] Emacs/ESS/org freezes/hangs on big data/ RAM(~256GB) processes when run in org/babel

2015-06-18 Thread Xebar Saram
Thx Chuck

this sounds great. could you perhaps point us to some documentation on
this, or perhpas consider sharing a detailed overview of your workflow?
this seems it could really fit my needs.

thx so much in advance

Z


On Thu, Jun 18, 2015 at 6:17 AM, Charles C. Berry ccbe...@ucsd.edu wrote:

 On Wed, 17 Jun 2015, William Denton wrote:

  On 17 June 2015, Xebar Saram wrote:

  I do alot of modeling work that involves using huge datasets and run
 process intensive R processes (such as complex mixed models, Gamms etc).
 in
 R studio all works well yet when i use the orgmode eval on R code blocks
 it
 works well for small simple process but 90% of the time when dealing with
 complex models and bug data (up to 256GB) it will just freeze emacs/ess.
 sometimes i can C-c or C-g it and other times i need to physically kill
 emacs.


 I've been having the same problem for a while, but wasn't able to isolate
 it any more than large data sets, lack of memory, and heavy CPU usage.
 Sometimes everything hangs and I need to power cycle the computer. :(


 And you (both) have `ess-eval-visibly' set to nil, right?

 I do statistical genomics, which can be compute intensive. Sometimes
 processes need to run for a while, and I get impatient having to wait.

 I wrote (and use) ox-ravel[1] to speed up my write-run-revise cycle in
 org-mode.

 Basically, ravel will export Org mode to a format that knitr (and the
 like) can run - turning src blocks into `code chunks'. That allows me to
 set the cache=TRUE chunk option, etc. I run knitr on the exported document
 to initialize objects for long running computations or to produce a
 finished report.

 When I start a session, I run knitr in the R session, then all the cached
 objects are loaded in and ready to use.

 If I write a src block I know will take a long time to export, I export
 from org mode to update the knitr document and re-knit it to refresh the
 cache.

 Mostly, I work in org-mode adding src blocks, revising existing ones, or
 editing text and graphics.

 If you decide to try ravel I recommend the `ravel-lang' branch[2] as that
 will soon replace master.

 HTH,

 Chuck


 [1] https://github.com/chasberry/orgmode-accessories
 [2] https://github.com/chasberry/orgmode-accessories/tree/ravel-lang



Re: [O] Emacs/ESS/org freezes/hangs on big data/ RAM(~256GB) processes when run in org/babel

2015-06-18 Thread Rainer M Krug
Charles C. Berry ccbe...@ucsd.edu writes:

 On Wed, 17 Jun 2015, William Denton wrote:

 On 17 June 2015, Xebar Saram wrote:

 I do alot of modeling work that involves using huge datasets and run
 process intensive R processes (such as complex mixed models, Gamms etc). in
 R studio all works well yet when i use the orgmode eval on R code blocks it
 works well for small simple process but 90% of the time when dealing with
 complex models and bug data (up to 256GB) it will just freeze emacs/ess.
 sometimes i can C-c or C-g it and other times i need to physically kill
 emacs.

 I've been having the same problem for a while, but wasn't able to
 isolate it any more than large data sets, lack of memory, and heavy
 CPU usage. Sometimes everything hangs and I need to power cycle the
 computer. :(


 And you (both) have `ess-eval-visibly' set to nil, right?

 I do statistical genomics, which can be compute intensive. Sometimes
 processes need to run for a while, and I get impatient having to wait.

 I wrote (and use) ox-ravel[1] to speed up my write-run-revise cycle in
 org-mode.

 Basically, ravel will export Org mode to a format that knitr (and the
 like) can run - turning src blocks into `code chunks'. That allows me
 to set the cache=TRUE chunk option, etc. I run knitr on the exported
 document to initialize objects for long running computations or to
 produce a finished report.

 When I start a session, I run knitr in the R session, then all the
 cached objects are loaded in and ready to use.

 If I write a src block I know will take a long time to export, I
 export from org mode to update the knitr document and re-knit it to
 refresh the cache.

I have a similar workflow, only that I use a package like
approach, i.e. I tangle function definitions in a folder ./R, data into
./data (which makes it possible to share org defined variables with R
running outside org) and scripts, i.e. the things which do a analysis,
import data, ... i.e. which might take long, into a folder ./scripts/. I
then add the usual R package infrastructure files (DESCRIPTION,
NAMESPACE, ...).
Then I have one file tangled into ./scripts/init.R:

#+begin_src R :tangle ./scripts/init.R  
library(devtools)
load_all()
#+end_src

and one for the analysis:

#+begin_src R :tangle ./scripts/myAnalysis.R  
## Do some really time intensive and horribly complicated and important
## stuff here
save(
fileNames,
bw,
cols,
labels,
fit,
dens,
gof,
gofPerProf,
file = ./cache/results.myAnalysis.rds
)
#+end_src

Now after tangling, I have my code easily available in a new R session:

1) start R in the directory in which the DESCRIPTION file is, 
2) run source(./scripts/init.R)

and I have all my functions and data available.

To run a analysis, I do

3) source(./scripts/myAnalysis.R)

and the results are saved in a file fn

To analyse the data further, I can then simply use

#+begin_src R :tangle ./scripts/myAnalysis.R
fitSing - attach(./cache/results.myAnalysis.rds)
#+end_src

so they won't interfere with my environment in R.

I can finally remove the attached environment by doing

#+begin_src R :tangle ./scripts/myAnalysis.R  
detach(
name = attr(fitSing, name),
character.only = TRUE
)
#+end_src

Through these caching and compartmentalizing, I can easily do some
things outside org and some inside, and easily combine all the data.

Further advantage: I can actually create the package and send it to
somebody for testing and review and it should run out of the box, as in
the DESCRIPTION file all dependencies are defined.

I am using this approach at the moment for a paper and which will also
result in a paper. By executing all the scripts, one will be able to do
import the raw data, do the analysis and create all graphs used in the
paper.

Hope this gives you another idea how one can handle long running
analysis in R in org,

Cheers,

Rainer


 Mostly, I work in org-mode adding src blocks, revising existing ones,
 or editing text and graphics.

 If you decide to try ravel I recommend the `ravel-lang' branch[2] as
 that will soon replace master.

 HTH,

 Chuck


 [1] https://github.com/chasberry/orgmode-accessories
 [2] https://github.com/chasberry/orgmode-accessories/tree/ravel-lang


-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R

2015-06-18 Thread Rainer M Krug
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rainer M Krug rai...@krugs.de writes:

 Yes - that's true. But who of the longer org users reads the manual of
 features they use regularly?

 Ah well. I turned 3 `mapcar' calls into a single one. It should,
 hopefully improve speed in your case (could you confirm it).

Hm - it takes actually longer (as far as I can see), but the mapcar
calls in the function now take 24% each (compared to 20 before).


 Also, I suggest to signal the deprecation in ORG-NEWS (old timers read
 it, right?) and remove this part of code during 8.4 development.

I guess they might skim over it...

What about putting a warning in the function in tangling (and other
places where this construct is evaluated) that this construct will not
be be allowed in the next major release?


 WDYT?

 org-lint seems to become the place where these changes can be marked and
 the user be notified - that is really brilliant.

 Org Lint is not in master branch, yet.

I know - unfortunately. But as far as I understand, it will be in the
next major release?


 I could imagine the following automatic workflow to enable automatic
 linting of org files upon opening when they were saved under an older
 (or unknown) version of org:

 1) a new argument is introduced :

   #+FILE_ORG_VERSION: 8.3beta

 2) when opening an org file, this version is checked. The following
 cases are possible:

   - parameter not present: assume that file version is older and run org-lint
   - file version older then org version: run org-lint
   - file version identical to org version: just open
   - file version newer: run org-lint

 3) after reviewing the results, org-lint could offer to update the file
 version (#+FILE_ORG_VERSION) to the version of org-mode. This should be, by
 the way, possible to do even when running org-lint manually.

 4) this behavior should be possible to disabled by an additional header
   #+ORG_FILE_VERSION_CHECK: f
   but not via  emacs.el as this should be the standard behavior.

 The problem is that linting is not exact science. You shouldn't put too
 much trust into it.

True - but as far as deprecation of org constructs concerned, checks
could be explicitly put into the org-lint library - for some features
there are even conversion functions available - and linting could be
more robust in regards to deprecation checks?

Another option would be to use a function which does only file version
checking, but this would probably overlap with org-lint considerably.


 Also, version too broad: despite its name, some syntax changes were
 introduced in the middle of 8.3beta.

Well - users who use git (or other cutting edge sources) should be aware
that these things can happen - if they want to avoid it (or be informed
when it happens) they should stay with the official releases. So I don't
see a problem there. And even if I overlook a change in git, the check
in the next release would pick it up in longer unused org files.

I see this as a feature for non-power users (i.e. the ones who stick
with the normal releases) and org-from-git users (or other daily build users) 
are power users by
definition.


 Therefore, I'm not sure it's worth the hassle.

As there is nobody else responding, I guess you are right, although I
think it would make org much more robust.

In the spirit of reproducibility, I would at least suggest to introduce
a function which inserts an argument

#+ORG_FILE_VERSION: TheActualOrgVersionProbablyWithGitHash

if it does not exist, and if it exist, updates it to the actual version?

This should be incorporated into the default header sets.

This would lay the groundwork for introducing this feature at a later stage.

Thanks,

Rainer



 Regards,

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :   +33 - (0)9 53 10 27 44
Cell:   +33 - (0)6 85 62 59 98
Fax :   +33 - (0)9 58 10 27 44

Fax (D):+49 - (0)3 21 21 25 22 44

email:  rai...@krugs.de

Skype:  RMkrug

PGP: 0x0F52F982


signature.asc
Description: PGP signature


Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R

2015-06-18 Thread Nicolas Goaziou
Rainer M Krug rai...@krugs.de writes:

 Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Rainer M Krug rai...@krugs.de writes:

 Yes - that's true. But who of the longer org users reads the manual of
 features they use regularly?

 Ah well. I turned 3 `mapcar' calls into a single one. It should,
 hopefully improve speed in your case (could you confirm it).

 Hm - it takes actually longer (as far as I can see), but the mapcar
 calls in the function now take 24% each (compared to 20 before).

Considering the basic change I made, I fail to see how it could take
longer. In the worst case, it should be equivalent.

Could you provide another report, with an uncompiled Org?

 Also, I suggest to signal the deprecation in ORG-NEWS (old timers read
 it, right?) and remove this part of code during 8.4 development.

 I guess they might skim over it...

Then, it's their responsibility.

 What about putting a warning in the function in tangling (and other
 places where this construct is evaluated) that this construct will not
 be be allowed in the next major release?

This is not the usual way to deprecate features. Breaking changes are
written in ORG-NEWS, I don't see why this one would make an exception.

 I know - unfortunately. But as far as I understand, it will be in the
 next major release?

Hopefully, yes.

 True - but as far as deprecation of org constructs concerned, checks
 could be explicitly put into the org-lint library - for some features
 there are even conversion functions available - and linting could be
 more robust in regards to deprecation checks?

Not really.

For example, even if we want to check for deprecated Babel header
properties, there's no way to tell if :cache: yes is an obsolete way
to use them or user's own properties.

 In the spirit of reproducibility, I would at least suggest to introduce
 a function which inserts an argument

 #+ORG_FILE_VERSION: TheActualOrgVersionProbablyWithGitHash

 if it does not exist, and if it exist, updates it to the actual
 version?

I see no objection to this. 

We could extend `org-version' to do this, e.g., change its signature to
(org-version optional full medium) where MEDIUM can be `insert',
`message' or `keyword'. In the latter case, it would create or update
any such keyword in the current document.

Of course, we can provide a brand new function, instead.

Do you want to provide a patch for that?

 This should be incorporated into the default header sets.

What are the default header sets? You mean export template? I don't
think this is needed as long as we don't use this keyword.


Regards,



Re: [O] [feature request] org-capture-window-setup to stop capture window taking up whole frame

2015-06-18 Thread Xebar Saram
Hi Alan

your code seems very intersting and i have been looking for something like
this for a while. yet for me it opens a new frame without org capture. i
use linux (arch) and put in the following code. please note that when i
evaled your code it said:
`flet' is an obsolete macro (as of 24.3); use either `cl-flet' or `cl-letf'.
so i changed flet to cl-flet and it still didnt work :)

here is the code

(defun make-orgcapture-frame ()
  Create a new frame and run org-capture.
  (interactive)
  (make-frame '((name . remember) (width . 80) (height . 16)
(top . 400) (left . 300)
(font . Pragmata Pro-16)
))
  (select-frame-by-name remember)
  (delete-other-windows)
  (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
(org-capture nil t)))

;; delete the frame in that case
(add-hook 'org-capture-after-finalize-hook
  (lambda ()
(when (equal
   (cdr (assoc 'name (frame-parameters (selected-frame
   remember)
  (delete-frame


any ideas?

thx

z

On Tue, Jun 9, 2015 at 12:22 PM, Alan Schmitt 
alan.schm...@polytechnique.org wrote:

 Hello Eric,

 On 2015-06-08 17:23, Eric S Fraga e.fr...@ucl.ac.uk writes:

  as monitors get bigger and bigger, I tend to have lots of (emacs)
  windows in a frame.  No matter how many I have, org-capture takes over
  the whole frame which is kind of wasteful.

 How about using several frames? For instance I have the following code
 bound globally in my OS:

 #+begin_src sh
 /usr/local/bin/emacsclient -n -e '(make-orgcapture-frame)'
 #+end_src

 The function is defined as follows (with some supporting code to delete
 the frame when I'm done):

 #+begin_src emacs-lisp
 (defun make-orgcapture-frame ()
   Create a new frame and run org-capture.
   (interactive)
   (make-frame '((name . remember) (width . 80) (height . 16)
 (top . 400) (left . 300)
 (font .
 -*-Consolas-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1)
 ))
   (select-frame-by-name remember)
   (delete-other-windows)
   (flet ((switch-to-buffer-other-window (buf) (switch-to-buffer buf)))
 (org-capture nil t)))

 ;; delete the frame in that case
 (add-hook 'org-capture-after-finalize-hook
   (lambda ()
 (when (equal
(cdr (assoc 'name (frame-parameters (selected-frame
remember)
   (delete-frame
 #+end_src

 Alan

 --
 OpenPGP Key ID : 040D0A3B4ED2E5C7
 Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm



[O] no org-export-to-html-and-open since distribution switch

2015-06-18 Thread Sven Ehret
Hi List,

since I have switched distributions from Mint to Arch, I have lost one
of my most-loved Org features: Export to HTML and open.

When I choose to export something, I type C-c  C-e C-s h o as I usually
do. But now the HTML opens in my agenda buffer, and not in my browser
anymore.

When I right-click on http links in my org document, the browser
correctly opens them.

When I command M-x org-export-to-html-and-open, it says [No match].

The symptoms are very much like described in
http://emacs.stackexchange.com/questions/2387/browser-not-opening-when-exporting-html-from-org-mode
, but unfortunately there is no documented solution.

My org version reports as „Org-mode version 8.2.10
(8.2.10-41-g42228a-elpaplus @
/home/ehret/.emacs.d/elpa/org-plus-contrib-20150615/)“.

I tried moving the elpa installation out of the way and installing a
distribution package, aur/emacs-org-mode, but the result is the same.

Emacs will likely always feel alien to me, but my love to org mode is
bitter swt.

Any help or hints are greatly appreciated!

Best, Sven.

-- 
Sven Ehret
I2P: das unsichtbare Internet. Erreicht mich mit via I2P-Bote als 
vDe1o-Y0SS6JYDLUInq1O~1ryC0~Gx48~px7bb5iVDgoC1PRJf8OKG3PVeYGRqilnKn8k14KYBzp4FZ3FVnLklZNsHI62N8ieeexgU~SwJZ1pl6sucy24X8uU39T0aWf7egwrwfyI34rXEb7uBhWlkKf
https://geti2p.net/de/ :: http://i2pbote.i2p.us/



[O] no org-export-to-html-and-open since distribution switch

2015-06-18 Thread Sven Ehret
Hi List,

since I have switched distributions from Mint to Arch, I have lost one
of my most-loved Org features: Export to HTML and open.

When I choose to export something, I type C-c  C-e C-s h o as I usually
do. But now the HTML opens in my agenda buffer, and not in my browser
anymore.

When I right-click on http links in my org document, the browser
correctly opens them.

When I command M-x org-export-to-html-and-open, it says [No match].

The symptoms are very much like described in
http://emacs.stackexchange.com/questions/2387/browser-not-opening-when-exporting-html-from-org-mode
, but unfortunately there is no documented solution.

My org version reports as „Org-mode version 8.2.10
(8.2.10-41-g42228a-elpaplus @
/home/ehret/.emacs.d/elpa/org-plus-contrib-20150615/)“.

I tried moving the elpa installation out of the way and installing a
distribution package, aur/emacs-org-mode, but the result is the same.

Emacs will likely always feel alien to me, but my love to org mode is
bitter swt.

Any help or hints are greatly appreciated!

Best, Sven.

-- 
Sven Ehret
I2P: das unsichtbare Internet. Erreicht mich mit via I2P-Bote als 
vDe1o-Y0SS6JYDLUInq1O~1ryC0~Gx48~px7bb5iVDgoC1PRJf8OKG3PVeYGRqilnKn8k14KYBzp4FZ3FVnLklZNsHI62N8ieeexgU~SwJZ1pl6sucy24X8uU39T0aWf7egwrwfyI34rXEb7uBhWlkKf
https://geti2p.net/de/ :: http://i2pbote.i2p.us/



Re: [O] Why navigating in Org mode is so slow in overview mode?

2015-06-18 Thread Qiang Fang
I found it linum mode that slows all things down.
Thank you for the help!
Qiang

On Wed, Jun 17, 2015 at 3:51 AM, Nicolas Goaziou m...@nicolasgoaziou.fr
wrote:

 Hello,

 Q godbles...@gmail.com writes:

  I am view this file
  http://doc.norang.ca/org-mode.org
 
  It's a prettey long document, when it all folded up, navigating to
 previous
  line and next line takes about 2 seconds. When the sub heading is shown,
  it's more responsive. Is this a bug?

 I don't know. What Org version are you using? Could you use a profiler
 and report results?


 Regards,

 --
 Nicolas Goaziou



Re: [O] no org-export-to-html-and-open since distribution switch

2015-06-18 Thread Rasmus
Hi,

What is your WM/DM?  If it's Gnome that might be the reason.  There's an
thread a couple of weeks back with a workaround for Gnome.

Rasmus

-- 
C is for Cookie



Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R

2015-06-18 Thread Detlef Steuer
Am Thu, 18 Jun 2015 15:25:57 +0200
schrieb Rainer M Krug rai...@krugs.de:

 In the spirit of reproducibility, I would at least suggest to
 introduce a function which inserts an argument
 
 #+ORG_FILE_VERSION: TheActualOrgVersionProbablyWithGitHash
 
 if it does not exist, and if it exist, updates it to the actual
 version?


Wouldn´t something like 

#+BEGIN_SRC emacs-lisp :exports results
(org-version)
#+END_SRC

do it, when needed?

Regards
Detlef


pgpPfjvnb1qur.pgp
Description: Digitale Signatur von OpenPGP


[O] no org-export-to-html-and-open since distribution switch

2015-06-18 Thread Sven Ehret
Hi List,

since I have switched distributions from Mint to Arch, I have lost one
of my most-loved Org features: Export to HTML and open.

When I choose to export something, I type C-c  C-e C-s h o as I usually
do. But now the HTML opens in my agenda buffer, and not in my browser
anymore.

When I right-click on http links in my org document, the browser
correctly opens them.

When I command M-x org-export-to-html-and-open, it says [No match].

The symptoms are very much like described in
http://emacs.stackexchange.com/questions/2387/browser-not-opening-when-exporting-html-from-org-mode
, but unfortunately there is no documented solution.

My org version reports as „Org-mode version 8.2.10
(8.2.10-41-g42228a-elpaplus @
/home/ehret/.emacs.d/elpa/org-plus-contrib-20150615/)“.

I tried moving the elpa installation out of the way and installing a
distribution package, aur/emacs-org-mode, but the result is the same.

Emacs will likely always feel alien to me, but my love to org mode is
bitter swt.

Any help or hints are greatly appreciated!

Best, Sven.

-- 
Sven Ehret
I2P: das unsichtbare Internet. Erreicht mich mit via I2P-Bote als 
vDe1o-Y0SS6JYDLUInq1O~1ryC0~Gx48~px7bb5iVDgoC1PRJf8OKG3PVeYGRqilnKn8k14KYBzp4FZ3FVnLklZNsHI62N8ieeexgU~SwJZ1pl6sucy24X8uU39T0aWf7egwrwfyI34rXEb7uBhWlkKf
https://geti2p.net/de/ :: http://i2pbote.i2p.us/




Re: [O] ox-koma-letter: how to use @@LaTeX:@@ specific commands in #+ directives

2015-06-18 Thread Nicolas Goaziou
Hello,

Rasmus ras...@gmx.us writes:

 Nicolas: are there any of the keywords in the patch that shouldn't be
 parsed?

I don't think so.

Notwithstanding AUTHOR, which clearly is an overlook (ox.el parses it),
I wonder if it is a net gain, tho. In my experience, these values are
mostly constituted of LaTeX code anyway (e.g., \vspace and \hspace in
signature) and this change will not make them simpler.


 Also, I left out FROM_ADDRESS as I remember it interprets newlines and I
 don't have time ATM to properly check if this depends on the newline
 behavior.

Indeed, `parse' treats newline characters as spaces, so it is not
a replacement for `newline'.

Note that SIGNATURE has the same problem.


Regards,

-- 
Nicolas Goaziou



Re: [O] [feature request] org-capture-window-setup to stop capture window taking up whole frame

2015-06-18 Thread Alan Schmitt
On 2015-06-18 13:52, Xebar Saram zelt...@gmail.com writes:

 thx again Alan

 i do get an error if i eval (org-capture nil t)
 the error is:

 Debugger entered--Lisp error: (error No capture template referred to by \t\
 keys)

Yes: you need to define a capture template with that key. Here are my
capture templates, for instance
#+begin_src emacs-lisp
(setq org-capture-templates
  (quote
   ((t todo entry (file refile-orgx.org)
 * TODO %?\n %U)
(T todo with link entry (file refile-orgx.org)
 * TODO %?\n %U\n\n%a)
(r Reply entry (file refile-orgx.org)
 * TODO Reply to %:fromname about %:subject\n%?Received on 
%:date-timestamp-inactive, link: %a)
(w Wait for reply entry (file refile-orgx.org)
 * WAITING reply from %:to about %:subject\n%?Sent on 
%:date-timestamp-inactive, link: %a)
(o Old Journal entry (file+datetree+prompt diary-runx.org)
 * %i%?\n%u\n)
(O Old Journal with link entry (file+datetree+prompt 
diary-runx.org)
 * %i%?\n%u\n%a\n)
(j Journal entry (file+datetree diary-runx.org)
 * %i%?\nEntered on %U\n)
(J Journal with link entry (file+datetree diary-runx.org)
 * %i%?\nEntered on %U\n%a\n)
(i Store link in offline plain (file urls-offline.org)
 %l
#+end_src

You need to adapt this to your needs, of course.

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm


signature.asc
Description: PGP signature


Re: [O] allow italic quote marks? org-emphasis-regexp-components

2015-06-18 Thread Kaushal
Nope, it doesn't :)


Screencap of pdf export: http://i.imgur.com/KuLHKNd.png

On Thu, Jun 18, 2015 at 3:54 AM Marcin Borkowski mb...@mbork.pl wrote:


 On 2015-06-18, at 05:19, Kaushal kaushal.m...@gmail.com wrote:

  The solution is simpler than you think; you simply need to add ZERO WIDTH
  SPACE unicode char between / and  (beginning) and  and / (end).

 Won't it break the LaTeX export?

 Best,

 --
 Marcin Borkowski
 http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
 Faculty of Mathematics and Computer Science
 Adam Mickiewicz University




[O] another example of org being slow, with some analysis

2015-06-18 Thread Eric S Fraga
Hello,

there have been a few threads recently mentioning poor
performance.  Although some of these have been resolved (e.g. the use of
=linum=), I wonder if I could add a data point.

I have a medium (for me) sized (385 kB) org file with all of my tasks
in a date-tree structure.  One of the tasks requires me to edit a small
table every day for a couple of weeks (see below for the table).  Asking
for a recalculation of the table (C-u C-c C-c) takes 17 seconds on a new
laptop (16 GB RAM, SSD, i7 cpu, Debian linux testing) which is quite
fast at most other tasks.

The output of the ELP profiler is here:

--8---cut here---start-8---
org-ctrl-c-ctrl-c   117.655796272  17.655796272
org-table-recalculate   117.652738791  17.652738791
org-table-get-range 14   13.166332242  0.940452303
org-table-eval-formula  19   13.101183716  0.6895359851
org-goto-line   104  10.761145733  0.1034725551
org-table-copy-region   13   7.362366204   0.5663358618
org-current-line66   6.8422078910  0.1036698165
org-table-get-descriptor-line   28   1.659497877   0.0592677813
org-table-align 10.415633428   0.415633428
org-table-get-specials  10.206756703   0.206756703
org-table-expand-lhs-ranges 10.103551707   0.103551707
org-element--parse-to   60.0031655370  0.0005275895
org-babel-execute-safely-maybe  10.002872891   0.002872891
org-babel-execute-maybe 10.002870729   0.002870729
org-babel-execute-src-block-maybe   10.002846968   0.002846968
org-element-at-point30.0028012790  0.0009337596
org-babel-where-is-src-block-head   10.002664822   0.002664822
org-element--cache-compare  303  0.0025883040  8.542...e-06
org-table-current-column119  0.002235665   1.878...e-05
--8---cut here---end---8---

The table, for completeness, is here:

#+begin_src org
  | date | TBD | Victoria | London Bridge | Blackfriars | City | 
Farrindgon | St Pancras | Totals | Miles |
  |  | 2.5 |5 |   4.8 | 3.2 |  2.9 |
  5 |1.6 ||   |
  
|--+-+--+---+-+--++++---|
  | [2015-06-08 Mon] |   2 |  |   | |1 |
|  1 |9.5 |   5.9 |
  | [2015-06-12 Fri] |   2 |  |   |   1 |  |
|  1 |9.8 |   6.0 |
  | [2015-06-15 Mon] |   2 |  | 1 | |  |
|  1 |   11.4 |   7.0 |
  | [2015-06-17 Wed] |   2 |  |   |   1 |  |
|  1 |9.8 |   6.0 |
  | [2015-06-18 Thu] |   1 |  |   |   1 |  |
||5.7 |   3.5 |
  
|--+-+--+---+-+--++++---|
  | Totals   |   9 |0 | 1 |   3 |1 |
  0 |  4 |   46.2 |  28.5 |
  ,#+TBLFM: 
@$2..@$=vsum(@I..@II)::$9=($2..$)*(@$2..@$);EN::$10=$9/1.62;%.1f
#+end_src

If I change, for instance, the entry in the TBD column for today from 1
to 2, in the original file, it takes 17 seconds.  If I do it in this
email buffer (changing mode to org etc.), it is essentially
instantaneous.

Large buffers seem to be causing problems with org.  I've noticed this
elsewhere as I do tend to work with org files that are often 0.25-1 MB
in size.  Having looked at the profiler output, my gut feeling was that
the buffer is being repeatedly parsed (or some similar activity) given
where the time is being spent.  So... as the table is currently 99% of
the way into the buffer, I have copied the table to the start of the
same large document and, lo and behold, the table recalculation on the
copy is instantaneous!

(the moral of the story, for me, may be to use a reverse date-tree
structure for my tasks, if such were possible... maybe it is, given the
hidden gems in org! ;-)

I would be happy to instrument more than just org, if it would help.  I
should add that the above profile was done using emacs -Q so no
customisations.

I have no real issue with the performance of org overall but I thought
I'd add a data point in case it helps.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1216-gb856f6



Re: [O] allow italic quote marks? org-emphasis-regexp-components

2015-06-18 Thread Steven Arntson
Thank you very much!

-steven

Kaushal kaushal.m...@gmail.com writes:

 A quick google search comes up this these:

 http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex
 http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol

 Based on those solutions, may be you can add

 \DeclareUnicodeCharacter{200b}{}
 I haven't tried it, so cannot guarantee if that will work.

 I regularly generate pdfs and almost all of my org documents would be
 using 0x200b somewhere. If a pdf generates fine without any visible
 artifacts and with all content as expected, I do not look into the tex
 compilation logs. 

 This time I checked the log and I don't get that error, but a warning
 instead. Note that I also use XeTeX which has unicode support. Below
 is a snippet from my log:

 This is XeTeX, Version 3.14159265-2.6-0.1 (TeX Live 2014)
 (preloaded format=xelatex)
 \write18 enabled.
 entering extended mode
 (/home/kmodi/sandbox/org/italic_quotes.tex
 LaTeX2e 2014/05/01
 Babel 3.9k and hyphenation patterns for 2 languages loaded.
 (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/article.cls
 Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
 (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/size11.clo))
 (/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/inputenc.sty

 Package inputenc Warning: inputenc package ignored with utf8 based
 engines.

 On Thu, Jun 18, 2015 at 11:49 AM Myles English
 mylesengl...@gmail.com wrote:

 Marcin Borkowski writes:
 
  On 2015-06-18, at 05:19, Kaushal kaushal.m...@gmail.com wrote:
 
  The solution is simpler than you think; you simply need to add
 ZERO WIDTH
  SPACE unicode char between / and  (beginning) and  and /
 (end).
 
 Thanks for your detailed answer Kaushal. I hadn't heard of a 'zero
 length space' before.
 
  Won't it break the LaTeX export?
 
 I seems to work and manages to produce a pdf but does give this
 error:
 
 ! Package inputenc Error: Unicode char \u8:​ not set up for use
 with LaTeX.
 
 Myles
 




Re: [O] allow italic quote marks? org-emphasis-regexp-components

2015-06-18 Thread Kaushal
A quick google search comes up this these:

http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex
http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol

Based on those solutions, may be you can add

\DeclareUnicodeCharacter{200b}{}

I haven't tried it, so cannot guarantee if that will work.

I regularly generate pdfs and almost all of my org documents would be using
0x200b somewhere. If a pdf generates fine without any visible artifacts and
with all content as expected, I do not look into the tex compilation logs.

This time I checked the log and I don't get that error, but a warning
instead. Note that I also use XeTeX which has unicode support. Below is a
snippet from my log:

This is XeTeX, Version 3.14159265-2.6-0.1 (TeX Live 2014) (preloaded
format=xelatex)
 \write18 enabled.
entering extended mode
(/home/kmodi/sandbox/org/italic_quotes.tex
LaTeX2e 2014/05/01
Babel 3.9k and hyphenation patterns for 2 languages loaded.
(/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/size11.clo))
(/home/kmodi/texlive/2014/texmf-dist/tex/latex/base/inputenc.sty

Package inputenc Warning: inputenc package ignored with utf8 based engines.



On Thu, Jun 18, 2015 at 11:49 AM Myles English mylesengl...@gmail.com
wrote:


 Marcin Borkowski writes:

  On 2015-06-18, at 05:19, Kaushal kaushal.m...@gmail.com wrote:
 
  The solution is simpler than you think; you simply need to add ZERO
 WIDTH
  SPACE unicode char between / and  (beginning) and  and / (end).

 Thanks for your detailed answer Kaushal.  I hadn't heard of a 'zero
 length space' before.

  Won't it break the LaTeX export?

 I seems to work and manages to produce a pdf but does give this error:

 ! Package inputenc Error: Unicode char \u8:​ not set up for use with LaTeX.

 Myles



Re: [O] Bug: Org timeline does not work [8.3beta (release_8.3beta-1229-ge900eb @ /home/dominik/.emacs.d/org-mode/lisp/)]

2015-06-18 Thread Nick Dokos
Dominik Schrempf dominik.schre...@gmail.com writes:

 Hello,

 if I want to create a timeline of an arbritrary org file, I get the following 
 error:

 Symbol's function is void: org-timeline


This function is defined in org-agenda.el[c]. So the question is:
is org-agenda loaded? If

(featurep 'org-agenda)

evaluates to nil, it is not: check your initialization.
If it *is* loaded, then something is *really* wrong with your
installation.

BTW, to paraphrase a certain Jedi master this is not the function you
are looking for: org-timeline was a poor man's agenda before agendas
were implemented. At this point, it is an orphan, waiting to be
deprecated and deleted. Check the ML for earlier discussions.

 Best wishes,
 Dominik

 Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
  of 2015-04-20 on bitzer.hoetzel.info
 Package: Org-mode version 8.3beta (release_8.3beta-1229-ge900eb @ 
 /home/dominik/.emacs.d/org-mode/lisp/)

Nick




Re: [O] allow italic quote marks? org-emphasis-regexp-components

2015-06-18 Thread Myles English

Marcin Borkowski writes:

 On 2015-06-18, at 05:19, Kaushal kaushal.m...@gmail.com wrote:

 The solution is simpler than you think; you simply need to add ZERO WIDTH
 SPACE unicode char between / and  (beginning) and  and / (end).

Thanks for your detailed answer Kaushal.  I hadn't heard of a 'zero
length space' before.

 Won't it break the LaTeX export?

I seems to work and manages to produce a pdf but does give this error:

! Package inputenc Error: Unicode char \u8:​ not set up for use with LaTeX.

Myles



Re: [O] searching for csv utilities

2015-06-18 Thread Jude DaShiell
I spent time looking for vmode in info org using a regular expression 
search and couldn't find it either.  That capability is probably in R 
though it may be under another name.  I have emacs-ess package and R 
installed on this system though haven't used them yet.  I also found sbcl 
so if it gets too difficult to get stuff done with R I'll have an option 
open to start studying common lisp and write a mode function I can use 
with common lisp in conjunction with orgmode.


Interestingly, I did find pop_stdev() in postgresql but it turned out to 
be one of those situations like you were better off never having found 
that function since I managed to break a query that was working up until I 
added that extra code into it.  I was using aliases and pop_stdev() needs 
explicit casting to work at all for some reason.  That's what happens on 
learning curves every so often.




--




Re: [O] allow italic quote marks? org-emphasis-regexp-components

2015-06-18 Thread Marcin Borkowski

On 2015-06-18, at 18:02, Kaushal kaushal.m...@gmail.com wrote:

 A quick google search comes up this these:

 http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex
 http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol

 Based on those solutions, may be you can add

 \DeclareUnicodeCharacter{200b}{}

 I haven't tried it, so cannot guarantee if that will work.

Thanks, I'll check it in my Spare Time™.

 I regularly generate pdfs and almost all of my org documents would be using
 0x200b somewhere. If a pdf generates fine without any visible artifacts and
 with all content as expected, I do not look into the tex compilation logs.

I hate when TeX gives me *any* errors.  (So does AUCTeX.)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] helm-bibtex questions

2015-06-18 Thread Titus von der Malsburg

On 2015-06-18 Thu 04:32, Xebar Saram wrote:
 Hi Titus and thx so much for the answers!

 i will in the future use the github page to make requests.

 The number of matches will be displayed in the mode line. 

 i see that now thx! :) the problem was(is) that its colored black on my
 black modline BG which makes it invisible ;-) i assume thats an helm config
 i need to change


 If you don’t want to type these search expressions, you could create a
 command that invokes helm-bibtex with a default search expression and that
 command could be bound to a keyboard shortcut.

 that would be prefect for me and a solution to my issue. would you mind
 giving an example of such a code chunk. unfortunately i dont know elisp though
 as john recommended i will do my best this summer when the semester ends to
 try and pick it up :)

Sure, here you go:

#+BEGIN_SRC elisp
;; Define helm-search with predefined search expression:
(defun helm-bibtex-my-publications ()
  Search BibTeX entries authored by Xebar Saram.
  (interactive)
  (helm :sources '(helm-source-bibtex)
:full-frame t
:input xebar saram
:candidate-number-limit 500))

;; Bind this search function to Ctrl-x p:
(global-set-key (kbd C-x p) 'helm-bibtex-my-publications)
#+END_SRC

 i will definitely use your tag system as you recommended, sounds perfect
 for me

The tag system also comes in handy when generating publication lists for
CVs and web pages because BibTeX does not distinguish between conference
papers, posters, and talks.  If you have tags for that, it’s relatively
easy to create separate sections for these types of publications using
biblatex or bib2bib and bibtex2html in the case of web pages.

 thanks again for your kind help and the amazing app ;-)

You are welcome.

  Titus


 best

 Z



 On Wed, Jun 17, 2015 at 11:02 PM, Titus von der Malsburg malsb...@posteo.de
 wrote:


 On 2015-06-17 Wed 11:08, Xebar Saram wrote:
  Hi Titus
 
  I have been exploring helm-bibtex a bit today and have some questions.
 btw
  is this the preferred way to make requests/ask questions or is
  github preferred?

 Helm-bibtex is not part of org (although it tries to work well with
 org).  So I’m not sure whether this list is the best place for
 discussing it.  For now the issue tracker on Github might be a better
 option:

   https://github.com/tmalsburg/helm-bibtex/issues

  in any case i was wondering a few things:
 
  1. is it possible to have custom sorting? i want all views to sort by
  Author, year, month

 I prefer to see the entries in the (inverse) order in which they appear
 in the BibTeX file.  This way, recent additions show up at the
 top.  However, I agree that sorting would be useful (see issues #5 and
 #21); it just doesn’t have high priority for me.  Pull requests welcome.

  2. i would really like a way to have stored smart groups (like the jabref
  dynamic groups if your aware of that). that is for example create a group
  that auto selects all publications i have (by my first/last name) and
 shows
  the count (in numbers) of these publications.

 I’m not familiar with smart groups but it seems that all helm-bibtex is
 doing is giving you very flexible smart groups defined by your search
 expressions.  For example, if you want a list of your publications, you
 can simple enter your name.  And if you want a list of your articles,
 you can enter your name + “article”.  If you want all your articles from
 2010, enter your name + “articles 2010”.  And so on.  The number of
 matches will be displayed in the mode line.  If you don’t want to type
 these search expressions, you could create a command that invokes
 helm-bibtex with a default search expression and that command could be
 bound to a keyboard shortcut.

  Another example is a group to keep track of all the papers im working on
 or
  invloved with by matching keyword author and prep/*other key word

 I use two BibTeX fields to tag entries: “keywords” for keywords
 describing the content of the paper (as usual) and “tags” for meta
 data.  Values that I use in tags are “own”, “manuscript”, “poster”,
 “talk”, … So if I want a list of all articles in progress, I search for
 “own manuscript”.  Since the tags field is non-standard, it has to be
 added to `helm-bibtex-additional-search-fields`.

 Another solution would be to use the pubstate field and to search for
 your name and “forthcoming” (add pubstate to
 helm-bibtex-additional-search-fields for this to work).

  3.is it possible to ass an option to auto generate a bibkey for a
 selected
  citation based on user criteria such as author(date)short-title?

 Maintaining the content of the BibTeX file not really in the scope of
 helm-bibtex (I prefer to write my BibTeX entries by hand).  Perhaps
 org-ref or ebib can help here?  Once you have a function that generates
 a new key and inserts it in the BibTeX file, you can easily add it to
 the list of actions in helm-bibtex.

 Hope that helps.

   Titus

  thx so much in advance, 

Re: [O] Emacs/ESS/org freezes/hangs on big data/ RAM(~256GB) processes when run in org/babel

2015-06-18 Thread Charles C. Berry

On Thu, 18 Jun 2015, Xebar Saram wrote:


Thx Chuck

this sounds great. could you perhaps point us to some documentation on
this, or perhpas consider sharing a detailed overview of your workflow?
this seems it could really fit my needs.


Start with Sections 1-3 of ox-ravel.org for basic info.

There are a couple of examples on my github repo. Looking at the 
ravel-lang branch[1], there are these files:


- example-1-Rnw.org :: contains an org mode translation of the
 “example-1.Rnw’ (Sweave) file from the R distribution and
 instructions on how to export it.


- knitr-minimal-rhtml.org :: contains the “knitr-minimal.Rhtml’ file
 from the knitr demos page, but modified to *.org format.


- demos.org :: contains a variety of examples. It is best viewed
 online using 'raw' (or by downloading and viewing it in Org mode),
 as github formatting masks the #+BEGIN_EXAMPLE ... #+END_EXAMPLE
 sections that show what the output should be.

As far as caching goes this file (named cache.org, say)

--8---cut here---start-8---

* cache this chunk

#+ATTR_RAVEL: cache=TRUE
#+NAME: show-time
#+BEGIN_SRC R
  firstTime - date()
  firstTime
#+END_SRC

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

when exported as ravel-latex (i.e. C-c C-e r l, if you have ox-ravel
up and running, see section 2 of ox-ravel.org) creates cache.Rnw with
one chunk for which caching is specified. Loading knitr and running
knit(cache.Rnw) in R produces cache.tex and 3 ./cache/show-time*
files. Rerunning cache.Rnw will not update those files even if
cache.Rnw is updated as long as the code in the show-time block is
unchanged. You can start a fresh session, run knit(cache.Rnw), and
the value of firstTime will be loaded into it.

HTH,

Chuck

[1] https://github.com/chasberry/orgmode-accessories/tree/ravel-lang


Re: [O] ECM for: issues with publishing to LaTeX using #INCLUDE

2015-06-18 Thread Robert Klein
Hello,

now I've narrowed the org file(s) down to

--- snip ---
#+TITLE: Frequently Asked Questions

#+name: docinfo
#+begin_src elisp :exports none
  (let ((props (org-export-get-environment)))
(concat  #+LaTeX_HEADER: \\newcommand{\\myTitle}{
 (org-element-interpret-data
  (plist-get props :title))
 }\n))
#+end_src

#+CALL: docinfo() :exports results :results raw

#+LaTeX_CLASS: scrartcl
#+LaTeX_CLASS_OPTIONS: [11pt]
#+OPTIONS: email:t

* Headline
Some Text
--- snip ---

I tried toc:t, toc:nil and email:t as options.

The sequence CALL, LaTeX_CLASS, LaTeX_CLASS_OPTIONS, OPTIONS seems to be
important.  Publishing the example looks Ok when I use the following
sequences: 

- CALL, LaTeX_CLASS_OPTIONS, LaTeX_CLASS, OPTIONS
- CALL, LaTeX_CLASS_OPTIONS, OPTIONS, LaTeX_CLASS
- CALL, OPTIONS, LaTeX_CLASS_OPTIONS, LaTeX_CLASS

Best regards
Robert


On Thu, 18 Jun 2015 14:21:42 +0200
Robert Klein rokl...@roklein.de wrote:

 On Thu, 18 Jun 2015 09:55:16 +0200
 Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 
 Hello,
 
 thank you very much for your effort!
 
 I boiled it down further and now don't even need an #include to see
 this issues.  Using the same .emacs as in the earlier mail and having
 three org files 1.org, 2.org, and 3.org all having the same contents:
 
 --- snip ---
 #+TITLE: Frequently Asked Questions
 
 #+OPTIONS: toc:nil author:t ^:t creator:nil email:t tex:t
 
 #+name: docinfo
 #+begin_src elisp :exports none
   (let ((props (org-export-get-environment)))
 (concat  #+LaTeX_HEADER: \\newcommand{\\myTitle}{
  (org-element-interpret-data
   (plist-get props :title))
  }\n))
 #+end_src
 
 #+CALL: docinfo() :exports results :results raw
 
 #+LaTeX_CLASS: scrartcl
 #+LaTeX_CLASS_OPTIONS: [11pt, a4paper, twoside, notitlepage,
 headsepline, headings=normal, DIV=12, BCOR=12mm]
 #+OPTIONS: toc:t
 
 * Headline
 Some Text
 
 --- snip ---
 
 
 I also get the first file in the publishing process exports Ok, the
 rest is not Ok.
 
 When I delete the LaTeX_CLASS_OPTIONS line the whole project publishes
 without issues.
 
 The same happens when I delete the #+Options: toc:t line below the
 class options line.
 
 Best regards
 Robert
 
 
 
 
  Hello,
  
  Robert Klein rokl...@roklein.de writes:
  
   On Thu, 18 Jun 2015 09:15:50 +0200
   Robert Klein rokl...@roklein.de wrote:
  

   The file exported first exports Ok, the others don't.
  
   Sorry, the file _published_ first exports Ok, the others not.
  
   For the ECM I export w/ org-publish-project.
  
  Thanks for the ECM. I will investigate by the end of the week. Do
  not hesitate to post any additional information.
  
  Regards,
  
 
 




Re: [O] allow italic quote marks? org-emphasis-regexp-components

2015-06-18 Thread Rasmus
Marcin Borkowski mb...@mbork.pl writes:

 On 2015-06-18, at 18:02, Kaushal kaushal.m...@gmail.com wrote:

 A quick google search comes up this these:

 http://tex.stackexchange.com/questions/83440/inputenc-error-unicode-char-u8-not-set-up-for-use-with-latex
 http://tex.stackexchange.com/questions/4268/inputenc-error-unicode-char-u8-error-while-trying-to-write-a-degree-symbol

 Based on those solutions, may be you can add

 \DeclareUnicodeCharacter{200b}{}

 I haven't tried it, so cannot guarantee if that will work.

 Thanks, I'll check it in my Spare Time™.

I use something like this:

  (defcustom rasmus/org-latex-unicode-to-tex  '((  ~)
  (  \\,)
  (​ ))
list of re rep pairs which are replaced during latex export)
  
  (defun rasmus/org-latex-unicode-to-tex (text backend info)
Replace unicode strings with their TeX equivalents.

Currently:  ' ' (no break space) to '~'
' ' (thin space) to '\,'
'​'  (zero width space) to ''.
(when (org-export-derived-backend-p backend 'latex)
  (cl-loop for (re rep) in rasmus/org-latex-unicode-to-tex do
   (setq text (replace-regexp-in-string re rep text t t)))
  text))
  
  (add-to-list 'org-export-filter-final-output-functions
   'rasmus/org-latex-unicode-to-tex)



-- 
Sådan en god dansk lagereddike kan man slet ikke bruge mere




Re: [O] another example of org being slow, with some analysis

2015-06-18 Thread Nick Dokos
Eric S Fraga e.fr...@ucl.ac.uk writes:


 The output of the ELP profiler is here:

 ...
 org-goto-line   104  10.761145733  0.1034725551
 ..
 org-current-line66   6.8422078910  0.1036698165
 ...

I find these two difficult to explain: they account for the vast
majority of the time, they don't call anything other than basic emacs
lisp functions (which should be very fast) and they take an unbelievably
long 0.1 s/call - I did a profile of a single call of each in a file
where wc reports these stats:

  12961  270362 4317977 /home/nick/lib/notes/notes.org

and I got 0.002s for the first (going to line 6000, about the middle of
the file) and 0.0004s for the second: a factor of 50 smaller for the
first and a factor of 250 smaller for the second.

Maybe it's an artifact of profiling, but maybe you can try instrumenting
these two functions and doing something similar.  Do you still get 0.1s
for each call?

Nick





Re: [O] Emacs/ESS/org freezes/hangs on big data/ RAM(~256GB) processes when run in org/babel

2015-06-18 Thread Charles C. Berry

On Thu, 18 Jun 2015, Rainer M Krug wrote:


Charles C. Berry ccbe...@ucsd.edu writes:


On Wed, 17 Jun 2015, William Denton wrote:


On 17 June 2015, Xebar Saram wrote:


I do alot of modeling work that involves using huge datasets and run
process intensive R processes (such as complex mixed models, Gamms etc). in
R studio all works well yet when i use the orgmode eval on R code blocks it
works well for small simple process but 90% of the time when dealing with
complex models and bug data (up to 256GB) it will just freeze emacs/ess.
sometimes i can C-c or C-g it and other times i need to physically kill
emacs.


I've been having the same problem for a while, but wasn't able to
isolate it any more than large data sets, lack of memory, and heavy
CPU usage. Sometimes everything hangs and I need to power cycle the
computer. :(



And you (both) have `ess-eval-visibly' set to nil, right?



[snip: ox-ravel and how it might solve OP's problem]



I have a similar workflow, only that I use a package like
approach, i.e. I tangle function definitions in a folder ./R, data into
./data (which makes it possible to share org defined variables with R
running outside org) and scripts, i.e. the things which do a analysis,
import data, ... i.e. which might take long, into a folder ./scripts/. I
then add the usual R package infrastructure files (DESCRIPTION,
NAMESPACE, ...).
Then I have one file tangled into ./scripts/init.R:


[snip: how and why to structure an analysis as an R package]



I am using this approach at the moment for a paper and which will also
result in a paper. By executing all the scripts, one will be able to do
import the raw data, do the analysis and create all graphs used in the
paper.



And by writing the paper in the form of a vignette that Sweave or knitr 
can render you have an R package that when installed processes the data 
and reproduces the paper in pdf format.


ox-ravel will produce that vignette from Org mode.

For example, the bioConductor package geneRxCluster [1] comes from an Org 
mode document that contains the C and R code as src blocks and a subtree 
with the vignette (Using geneRxCluster) that analyzes data, produces 
graphics, etc. tangle-ing the src blocks and exporting the vignette 
creates the package.


HTH,

Chuck

[1] http://www.bioconductor.org/packages/geneRxCluster



Re: [O] another example of org being slow, with some analysis

2015-06-18 Thread Ivan Andrus
I’m jumping into the middle of the thread, but have you tried

(setq cache-long-scans nil)

That solved some performance issues for me.  I can’t remember where
I got the advice.

-Ivan

On Jun 18, 2015, at 10:28 AM, Eric S Fraga e.fr...@ucl.ac.uk wrote:

Hello,

there have been a few threads recently mentioning poor
performance.  Although some of these have been resolved (e.g. the use of
=linum=), I wonder if I could add a data point.

I have a medium (for me) sized (385 kB) org file with all of my tasks
in a date-tree structure.  One of the tasks requires me to edit a small
table every day for a couple of weeks (see below for the table).  Asking
for a recalculation of the table (C-u C-c C-c) takes 17 seconds on a new
laptop (16 GB RAM, SSD, i7 cpu, Debian linux testing) which is quite
fast at most other tasks.

The output of the ELP profiler is here:

--8---cut here---start-8---
org-ctrl-c-ctrl-c   117.655796272  17.655796272
org-table-recalculate   117.652738791  17.652738791
org-table-get-range 14   13.166332242  0.940452303
org-table-eval-formula  19   13.101183716  0.6895359851
org-goto-line   104  10.761145733  0.1034725551
org-table-copy-region   13   7.362366204   0.5663358618
org-current-line66   6.8422078910  0.1036698165
org-table-get-descriptor-line   28   1.659497877   0.0592677813
org-table-align 10.415633428   0.415633428
org-table-get-specials  10.206756703   0.206756703
org-table-expand-lhs-ranges 10.103551707   0.103551707
org-element--parse-to   60.0031655370  0.0005275895
org-babel-execute-safely-maybe  10.002872891   0.002872891
org-babel-execute-maybe 10.002870729   0.002870729
org-babel-execute-src-block-maybe   10.002846968   0.002846968
org-element-at-point30.0028012790  0.0009337596
org-babel-where-is-src-block-head   10.002664822   0.002664822
org-element--cache-compare  303  0.0025883040  8.542...e-06
org-table-current-column119  0.002235665   1.878...e-05
--8---cut here---end---8---

The table, for completeness, is here:

#+begin_src org
 | date | TBD | Victoria | London Bridge | Blackfriars | City |
Farrindgon | St Pancras | Totals | Miles |
 |  | 2.5 |5 |   4.8 | 3.2 |  2.9 |
 5 |1.6 ||   |
 
|--+-+--+---+-+--++++---|
 | [2015-06-08 Mon] |   2 |  |   | |1 |
   |  1 |9.5 |   5.9 |
 | [2015-06-12 Fri] |   2 |  |   |   1 |  |
   |  1 |9.8 |   6.0 |
 | [2015-06-15 Mon] |   2 |  | 1 | |  |
   |  1 |   11.4 |   7.0 |
 | [2015-06-17 Wed] |   2 |  |   |   1 |  |
   |  1 |9.8 |   6.0 |
 | [2015-06-18 Thu] |   1 |  |   |   1 |  |
   ||5.7 |   3.5 |
 
|--+-+--+---+-+--++++---|
 | Totals   |   9 |0 | 1 |   3 |1 |
 0 |  4 |   46.2 |  28.5 |
 ,#+TBLFM: @$2..@$=vsum(@I..@II)::$9=($2..$)*(@$2..@
$);EN::$10=$9/1.62;%.1f
#+end_src

If I change, for instance, the entry in the TBD column for today from 1
to 2, in the original file, it takes 17 seconds.  If I do it in this
email buffer (changing mode to org etc.), it is essentially
instantaneous.

Large buffers seem to be causing problems with org.  I've noticed this
elsewhere as I do tend to work with org files that are often 0.25-1 MB
in size.  Having looked at the profiler output, my gut feeling was that
the buffer is being repeatedly parsed (or some similar activity) given
where the time is being spent.  So... as the table is currently 99% of
the way into the buffer, I have copied the table to the start of the
same large document and, lo and behold, the table recalculation on the
copy is instantaneous!

(the moral of the story, for me, may be to use a reverse date-tree
structure for my tasks, if such were possible... maybe it is, given the
hidden gems in org! ;-)

I would be happy to instrument more than just org, if it would help.  I
should add that the above profile was done using emacs -Q so no
customisations.

I have no real issue with the performance of org overall but I thought
I'd add a data point in case it helps.

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1216-gb856f6


Re: [O] ox-koma-letter: how to use @@LaTeX:@@ specific commands in #+ directives

2015-06-18 Thread Rasmus
Eric S Fraga e.fr...@ucl.ac.uk writes:

 with this patch, exporting to koma-letter doesn't work for me.  I've not
 investigated properly yet but thought I'd give you a heads up on
 this.  

Thanks.  I don't really know where exactly it breaks with a minimal
example.  It works on my PC.  Anyway, this patch adds only a few parsed
keywords.  Does it work with your letter?

-- 
A page of history is worth a volume of logic
From fc999a651773353d105fca59a0044d4945a6241d Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Thu, 18 Jun 2015 10:34:17 +0200
Subject: [PATCH 2/2] ox-koma-letter: Parse more keywords

* ox-koma-letter.el (koma-letter): Parse author, phone-number,
  opening, closing and signature.
  (org-koma-letter-template): parse closing.
---
 contrib/lisp/ox-koma-letter.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 119ffe9..e907fd7 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -381,7 +381,7 @@ e.g. \title-subject:t\.
   :options-alist
   '((:latex-class LATEX_CLASS nil org-koma-letter-default-class t)
 (:lco LCO nil org-koma-letter-class-option-file)
-(:author AUTHOR nil (org-koma-letter--get-value org-koma-letter-author) t)
+(:author AUTHOR nil (org-koma-letter--get-value org-koma-letter-author) parse)
 (:author-changed-in-buffer-p AUTHOR nil nil t)
 (:from-address FROM_ADDRESS nil org-koma-letter-from-address newline)
 (:phone-number PHONE_NUMBER nil org-koma-letter-phone-number)
@@ -389,8 +389,8 @@ e.g. \title-subject:t\.
 (:to-address TO_ADDRESS nil nil newline)
 (:place PLACE nil org-koma-letter-place)
 (:subject SUBJECT nil nil parse)
-(:opening OPENING nil org-koma-letter-opening)
-(:closing CLOSING nil org-koma-letter-closing)
+(:opening OPENING nil org-koma-letter-opening parse)
+(:closing CLOSING nil org-koma-letter-closing parse)
 (:signature SIGNATURE nil org-koma-letter-signature newline)
 (:special-headings nil special-headings
 		   org-koma-letter-prefer-special-headings)
@@ -665,7 +665,7 @@ holding export options.
;; Letter body.
contents
;; Closing.
-   (format \n\\closing{%s}\n (plist-get info :closing))
+   (format \n\\closing{%s}\n (org-export-data (plist-get info :closing) info))
(org-koma-letter--special-contents-as-macro
 (plist-get info :with-after-closing))
;; Letter end.
-- 
2.4.4



Re: [O] Emacs/ESS/org freezes/hangs on big data/ RAM(~256GB) processes when run in org/babel

2015-06-18 Thread Andreas Leha
Hi Chuck,

[snip: all context about workflows for R projects]

 For example, the bioConductor package geneRxCluster [1] comes from an
 Org mode document that contains the C and R code as src blocks and a
 subtree with the vignette (Using geneRxCluster) that analyzes data,
 produces graphics, etc. tangle-ing the src blocks and exporting the
 vignette creates the package.


I'd love to see that org document, but I do not seem to be able to find
it.  Is it available anywhere?

Thanks,
Andreas




[O] Column formats for columnview dynamic block

2015-06-18 Thread Joon Ro
Hi,
I use columnview dynamic block to generate a table so I can export it.However, 
it does not obey the #+COLUMNS: settings that I have in the org file.Is there 
any way to make it obey the settings? I'm exporting the table for LaTeX and I 
want to control the number of digits that it shows. 
Cheers,Joon   

Re: [O] org-cite and org-citeproc

2015-06-18 Thread Richard Lawrence
Hi Matt,

Matt Price mopto...@gmail.com writes:

 I'm wondering what kind of work is required to make use of org-cite and
 org-citeproc at present. In particular, I'm wondering what kinds of changes
 I'll need to make to my current setup, and whether it's worthwhile to use
 my ultra-slow coding skills to create whatever glue is still necessary.

At the moment, org-cite/org-citeproc has no way of talking to Zotero.
So you'd need to manually export citation data from Zotero to a format
that pandoc-citeproc understands, like BibTex.  It sounds like zotxt and
zotxt-emacs provide a lot of what's needed to glue org-cite together
with Zotero; so one thing that would be helpful, if you're up for it, is
hacking org-cite to pull bibliography data from Zotero in a format that
can be passed to org-citeproc.  I don't use Zotero myself, so this is
something I'm unlikely to do anytime soon without some help.  (Borrowing
code from zotxt-emacs and putting it in org-cite is probably the way to
go here, as I doubt that we want to make zotxt-emacs a dependency of
org-cite.)

 All of this is fine for my current purposes, but I would like to figure out
 a more flexible and enduring solution, so I'd like to try out org-cite and
 org-citeproc.  But I'm not quite sure what's required, and whether there's
 support currently for odt and html export.

`Flexible and enduring' does not describe org-citeproc at the moment. :)
I'd be very happy to have you test out org-citeproc and give feedback
that will help improve it, but I can't recommend that you rely on it or
switch to it for serious work any time soon.  It is a working
proof-of-concept, but only that.

Still, there is support in org-cite/org-citeproc for both HTML and ODT
export, and it handles quite a few of the common cases.  So let me know
if you're interested in trying it out.  There are brief installation
instructions in the README (https://github.com/wyleyr/org-citeproc); let
me know if you need more than that.
 
Best,
Richard




Re: [O] Column formats for columnview dynamic block

2015-06-18 Thread Joon Ro
 I solved this with providing 'printf' format specifiers 
(http://orgmode.org/org.html#Formula-syntax-for-Calc). I wasn't aware of the 
the formatting capability - awesome.From: joon...@outlook.com
To: emacs-orgmode@gnu.org
Date: Thu, 18 Jun 2015 15:27:33 -0700
Subject: [O] Column formats for columnview dynamic block




Hi,
I use columnview dynamic block to generate a table so I can export it.However, 
it does not obey the #+COLUMNS: settings that I have in the org file.Is there 
any way to make it obey the settings? I'm exporting the table for LaTeX and I 
want to control the number of digits that it shows. 
Cheers,Joon 
  

Re: [O] Links

2015-06-18 Thread Suvayu Ali
On Wed, Jun 17, 2015 at 11:47:38AM +0200, Nicolas Goaziou wrote:

 [... description of the issues trimmed ...]

  Although, you still have to handle the ambiguous case for existing Org
  files.  Unless this double maintenance is cumbersome, I would vote for
  introducing such a scheme.
 
 The double maintenance is not possible. Either we take into
 consideration the prefix or the heuristic rule above, and some links are
 going to break, or we allow to bypass it and it doesn't improve the
 situation.

This is tricky indeed.  I guess the heuristic is the safest bet when it
comes to compatibility.

-- 
Suvayu

Open source is the future. It sets us free.



Re: [O] issues with publishing to LaTeX using #INCLUDE

2015-06-18 Thread Robert Klein
Update: it happens only with org-mode master, not with maint.

When I delete the elisp (and its call) at the beginning of the
#INCLUDEd file everything works Ok.

In the failing export already the exported \documentclass is wrong; it
says `article' instead of `scrartcl' I use.

It seems the following code in the #INCLUDEd file causes this:

--- snip ---
#+name: docinfo
#+begin_src elisp :exports none
  (let ((props (org-export-get-environment)))
(concat  #+LaTeX_HEADER: \\newcommand{\\myTitle}{
 (org-element-interpret-data
  (plist-get props :title))
 }\n
 #+LaTeX_HEADER: \\newcommand{\\myAuthor}{
 (org-element-interpret-data
  (plist-get props :author))
 }\n
 #+LaTeX_HEADER: \\newcommand{\\myDate}{
 (org-element-interpret-data
  (plist-get props :date))
 }\n
 #+LaTeX_HEADER: \\newcommand{\\myCreator}{
 (org-element-interpret-data
  (plist-get props :creator))
 }\n
 #+LaTeX_HEADER: \\newcommand{\\myKeywords}{
 (org-element-interpret-data
  (plist-get props :keywords))
 }\n
 #+LaTeX_HEADER: \\newcommand{\\mySubject}{
 (org-element-interpret-data
  (plist-get props :description))
 }\n))
#+end_src

#+CALL: docinfo() :exports results :results raw
--- snip ---


Any ideas?


Thanks a lot

Best regards
Robert



On Wed, 17 Jun 2015 20:04:43 +0200 (CEST)
Robert Klein rokl...@roklein.de wrote:

 Hi,
 
 when publishing a project (to LaTeX) where each file has a #INCLUDE:
 of the same file, some files get mixed up on export to LaTeX, but
 _only_ the stuff from the #INCLUDE gets mixed up.
 
 Below is an excerpt of a correct export, one of a mixed up export and
 the corresponding part from the #INCLUDEd file.
 
 Currently I don't have the slightest idea what to do about this.
 
 Any advice is highly appreciated.
 
 Thank you very much for your help.
 
 Best regards
 Robert
 
 
 A correct export looks like:
 
 #+begin_src latex
   \newcommand{\mySubtitle}{}
   \newcommand{\myProducer}{org-mode / pdflatex}
   \newcommand{\myTitle}{Common Software}
   \newcommand{\myAuthor}{Robert Klein}
   \newcommand{\myDate}{}
   \newcommand{\myCreator}{Emacs 24.5.1 (Org mode 8.3beta)}
   \newcommand{\myKeywords}{}
   \newcommand{\mySubject}{}
   \usepackage{scrhack}
   % standard font is Linux Libertine, but may want to have different
   % tt font.  Scale is for 10pt, probably also Ok for others.
   %\usepackage[ttscale=.875]{libertine} % scale by roklein
   \usepackage[osf]{libertine} % standardfont Linux
 Libertine \usepackage[libertine]{newtxmath}
   \renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
   \usepackage[scaled=0.9,zerostyle=c]{newtxtt} % TX typewriter, scale
 ok by roklein % have to load ams packages before symbol packages, so
 some things aren't % already defined. (amsmath doesn't cope)
   \usepackage{amstext}   % text in a math display
   \usepackage[rgb,svgnames,table]{xcolor} % enable color, also for
 tables \usepackage[most]{tcolorbox}
   \usepackage{overpic}   % put LaTeX or grid over graphics
   \usepackage{colortbl}  % colored tables
   \usepackage{tabu}  % enhanced tables using above
 packages \usepackage{booktabs}  % beautiful table
 formatting \usepackage{tikz}
   \usetikzlibrary{matrix,arrows,decorations.pathmorphing}
   \usepackage{paralist}
   \usepackage{xfrac} % nice fractions $\sfrac{1}{2}$
   \usepackage{calc}  % infix notation arithmetic
   \usepackage{ifthen}% if...then for LaTeX
   \usepackage{alltt} % like verbatim but \, {, and }
 work \usepackage[a4paper]{geometry}
   \usepackage{relsize}   % relative font sizing
 (\smaller) \lstset{
   basicstyle=\ttfamily,
   frame=single,
   % frame=leftline,
   backgroundcolor=\color{Gainsboro},
   % spacing normal, wie in verbatim:
   columns=fullflexible,
   keepspaces=true,
   % Umlaute
   inputencoding=utf8,
   extendedchars=true,
   literate={Ä}{{\A}}1 {ä}{{\a}}1 {Ö}{{\O}}1 {ö}{{\o}}1
 {Ü}{{\U}}1 {ü}{{\u}}1 {ß}{{\ss}}1, }
   ...
 #+end_src
 
 For some other files, however the export looks like:
 
 #+begin_src latex
   \newcommand{\mySubtitle}{}
   \newcommand{\myProducer}{org-mode / pdflatex}
   \newcommand{\myTitle}{Mathematical Software}
   \newcommand{\myAuthor}{Robert Klein}
   \newcommand{\myDate}{}
   \newcommand{\myCreator}{Emacs 24.5.1 (Org mode 8.3beta)}
   \usepackage{scrhack}
   % standard font is Linux Libertine, but may want to have different
   % tt font.  Scale is for 10pt, probably also Ok for others.
   % tt font.  Scale is for 10pt, probably also Ok for others.
   %\usepackage[ttscale=.875]{libertine} % scale by roklein
   \usepackage[osf]{libertine} % standardfont Linux
 Libertine 

[O] ECM for: issues with publishing to LaTeX using #INCLUDE

2015-06-18 Thread Robert Klein
Attached an ECM:

.femacs is the .emacs used.

The files 1.org, 2.org, and 3.org are in the directory ~/ot
mpip-settings.org is in ~/ot/include

The file exported first exports Ok, the others don't.

A diff of the export for the ECM (3.org exported Ok, 2.org and 1.org
not):

--- snip ---
--- 3.tex   2015-06-18 09:10:09.251989000 +0200
+++ 2.tex   2015-06-18 09:10:09.773039000 +0200
@@ -1,5 +1,5 @@
 % Created 2015-06-18 Thu 09:10
-\documentclass[11pt, a4paper, twoside, notitlepage, headsepline,
headings=normal, DIV=12, BCOR=12mm]{scrartcl}
+\documentclass[11pt,a4paper, twoside, notitlepage, headsepline,
headings=normal, DIV=12, BCOR=12mm]{article}
\usepackage[utf8]{inputenc} 
\usepackage[T1]{fontenc}
\usepackage{fixltx2e}
@@ -24,8 +24,6 @@ \newcommand{\myAuthor}{Robert
Klein} \newcommand{\myDate}{}
 \newcommand{\myCreator}{Emacs 24.5.1 (Org mode 8.3beta)}
-\newcommand{\myKeywords}{}
-\newcommand{\mySubject}{}
 \author{Robert Klein\thanks{robert.kl...@mpip-mainz.mpg.de}}
 \date{\today}
 \title{Frequently Asked Questions}
--- snip ---

Best regards
Robert

On Thu, 18 Jun 2015 08:58:13 +0200
Robert Klein rokl...@roklein.de wrote:

 Update: it happens only with org-mode master, not with maint.
 
 When I delete the elisp (and its call) at the beginning of the
 #INCLUDEd file everything works Ok.
 
 In the failing export already the exported \documentclass is wrong; it
 says `article' instead of `scrartcl' I use.
 
 It seems the following code in the #INCLUDEd file causes this:
 
 --- snip ---
 #+name: docinfo
 #+begin_src elisp :exports none
   (let ((props (org-export-get-environment)))
 (concat  #+LaTeX_HEADER: \\newcommand{\\myTitle}{
  (org-element-interpret-data
   (plist-get props :title))
  }\n
  #+LaTeX_HEADER: \\newcommand{\\myAuthor}{
  (org-element-interpret-data
   (plist-get props :author))
  }\n
  #+LaTeX_HEADER: \\newcommand{\\myDate}{
  (org-element-interpret-data
   (plist-get props :date))
  }\n
  #+LaTeX_HEADER: \\newcommand{\\myCreator}{
  (org-element-interpret-data
   (plist-get props :creator))
  }\n
  #+LaTeX_HEADER: \\newcommand{\\myKeywords}{
  (org-element-interpret-data
   (plist-get props :keywords))
  }\n
  #+LaTeX_HEADER: \\newcommand{\\mySubject}{
  (org-element-interpret-data
   (plist-get props :description))
  }\n))
 #+end_src
 
 #+CALL: docinfo() :exports results :results raw
 --- snip ---
 
 
 Any ideas?
 
 
 Thanks a lot
 
 Best regards
 Robert
 
 
 
 On Wed, 17 Jun 2015 20:04:43 +0200 (CEST)
 Robert Klein rokl...@roklein.de wrote:
 
  Hi,
  
  when publishing a project (to LaTeX) where each file has a #INCLUDE:
  of the same file, some files get mixed up on export to LaTeX, but
  _only_ the stuff from the #INCLUDE gets mixed up.
  
  Below is an excerpt of a correct export, one of a mixed up export
  and the corresponding part from the #INCLUDEd file.
  
  Currently I don't have the slightest idea what to do about this.
  
  Any advice is highly appreciated.
  
  Thank you very much for your help.
  
  Best regards
  Robert
  
  
  A correct export looks like:
  
  #+begin_src latex
\newcommand{\mySubtitle}{}
\newcommand{\myProducer}{org-mode / pdflatex}
\newcommand{\myTitle}{Common Software}
\newcommand{\myAuthor}{Robert Klein}
\newcommand{\myDate}{}
\newcommand{\myCreator}{Emacs 24.5.1 (Org mode 8.3beta)}
\newcommand{\myKeywords}{}
\newcommand{\mySubject}{}
\usepackage{scrhack}
% standard font is Linux Libertine, but may want to have different
% tt font.  Scale is for 10pt, probably also Ok for others.
%\usepackage[ttscale=.875]{libertine} % scale by roklein
\usepackage[osf]{libertine} % standardfont Linux
  Libertine \usepackage[libertine]{newtxmath}
\renewcommand*\oldstylenums[1]{{\fontfamily{fxlj}\selectfont #1}}
\usepackage[scaled=0.9,zerostyle=c]{newtxtt} % TX typewriter,
  scale ok by roklein % have to load ams packages before symbol
  packages, so some things aren't % already defined. (amsmath doesn't
  cope) \usepackage{amstext}   % text in a math display
\usepackage[rgb,svgnames,table]{xcolor} % enable color, also for
  tables \usepackage[most]{tcolorbox}
\usepackage{overpic}   % put LaTeX or grid over
  graphics \usepackage{colortbl}  % colored tables
\usepackage{tabu}  % enhanced tables using above
  packages \usepackage{booktabs}  % beautiful table
  formatting \usepackage{tikz}
\usetikzlibrary{matrix,arrows,decorations.pathmorphing}
\usepackage{paralist}
\usepackage{xfrac} % nice fractions $\sfrac{1}{2}$
\usepackage{calc}  % infix notation arithmetic
\usepackage{ifthen}   

[O] Bug: Org timeline does not work [8.3beta (release_8.3beta-1229-ge900eb @ /home/dominik/.emacs.d/org-mode/lisp/)]

2015-06-18 Thread Dominik Schrempf
Hello,

if I want to create a timeline of an arbritrary org file, I get the
following error:

Symbol's function is void: org-timeline

Best wishes,
Dominik

Emacs  : GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.16.2)
 of 2015-04-20 on bitzer.hoetzel.info
Package: Org-mode version 8.3beta (release_8.3beta-1229-ge900eb @
/home/dominik/.emacs.d/org-mode/lisp/)


Re: [O] ECM for: issues with publishing to LaTeX using #INCLUDE

2015-06-18 Thread Robert Klein
On Thu, 18 Jun 2015 09:15:50 +0200
Robert Klein rokl...@roklein.de wrote:

 
 The file exported first exports Ok, the others don't.

Sorry, the file _published_ first exports Ok, the others not.

For the ECM I export w/ org-publish-project.

Best regards
Robert



Re: [O] allow italic quote marks? org-emphasis-regexp-components

2015-06-18 Thread Marcin Borkowski

On 2015-06-18, at 05:19, Kaushal kaushal.m...@gmail.com wrote:

 The solution is simpler than you think; you simply need to add ZERO WIDTH
 SPACE unicode char between / and  (beginning) and  and / (end).

Won't it break the LaTeX export?

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



Re: [O] org version numbers in file - WAS: Tangling takes long - profiling and calling R

2015-06-18 Thread Nicolas Goaziou
Rainer M Krug rai...@krugs.de writes:

 Yes - that's true. But who of the longer org users reads the manual of
 features they use regularly?

Ah well. I turned 3 `mapcar' calls into a single one. It should,
hopefully improve speed in your case (could you confirm it).

Also, I suggest to signal the deprecation in ORG-NEWS (old timers read
it, right?) and remove this part of code during 8.4 development.

WDYT?

 org-lint seems to become the place where these changes can be marked and
 the user be notified - that is really brilliant.

Org Lint is not in master branch, yet.

 I could imagine the following automatic workflow to enable automatic
 linting of org files upon opening when they were saved under an older
 (or unknown) version of org:

 1) a new argument is introduced :

   #+FILE_ORG_VERSION: 8.3beta

 2) when opening an org file, this version is checked. The following
 cases are possible:

   - parameter not present: assume that file version is older and run org-lint
   - file version older then org version: run org-lint
   - file version identical to org version: just open
   - file version newer: run org-lint

 3) after reviewing the results, org-lint could offer to update the file
 version (#+FILE_ORG_VERSION) to the version of org-mode. This should be, by
 the way, possible to do even when running org-lint manually.

 4) this behavior should be possible to disabled by an additional header
   #+ORG_FILE_VERSION_CHECK: f
   but not via  emacs.el as this should be the standard behavior.

The problem is that linting is not exact science. You shouldn't put too
much trust into it.

Also, version too broad: despite its name, some syntax changes were
introduced in the middle of 8.3beta.

Therefore, I'm not sure it's worth the hassle.


Regards,



Re: [O] ox-koma-letter: how to use @@LaTeX:@@ specific commands in #+ directives

2015-06-18 Thread Eric S Fraga
On Thursday, 18 Jun 2015 at 00:03, Nicolas Goaziou wrote:

[...]

 I cannot reproduce it. koma-letter back-ends explicitly allows latex
 export snippets, e.g.,

   #+title: @@latex:\something@@

 produces the expected \something.

Ummm, I thought I was going crazy as, for once, I had tested using emacs
-Q before posting something silly to the list...

You are correct in that it works with #+title:.  It also works with
#+subject:.  However, it does *not* work with #+author:.  I've not tried
any of the other org setting directives.  It was author I was playing
with yesterday...

thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1216-gb856f6



Re: [O] ECM for: issues with publishing to LaTeX using #INCLUDE

2015-06-18 Thread Nicolas Goaziou
Hello,

Robert Klein rokl...@roklein.de writes:

 On Thu, 18 Jun 2015 09:15:50 +0200
 Robert Klein rokl...@roklein.de wrote:

  
 The file exported first exports Ok, the others don't.

 Sorry, the file _published_ first exports Ok, the others not.

 For the ECM I export w/ org-publish-project.

Thanks for the ECM. I will investigate by the end of the week. Do not
hesitate to post any additional information.

Regards,

-- 
Nicolas Goaziou



Re: [O] [feature request] org-capture-window-setup to stop capture window taking up whole frame

2015-06-18 Thread Eric S Fraga
On Wednesday, 17 Jun 2015 at 16:41, Subhan Michael Tindall wrote:
 Quickie patch, maybe I'll work it up as per comments later  submit
 but this will fix things for you (no guarantees, not widely tested)

Thanks for this.  Works okay if there is more than one window which is a
step in the right direction.  In any case, you've pointed me in the
right direction and the following seems to work fine (with very limited
testing):

--8---cut here---start-8---
diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index eeb05ca..ac0ed6f 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -1590,8 +1590,7 @@ The template may still contain \%?\ for cursor 
positioning.
 (unless template (setq template ) (message No template) (ding)
(sit-for 1))
 (save-window-excursion
-  (delete-other-windows)
-  (org-pop-to-buffer-same-window (get-buffer-create *Capture*))
+  (org-switch-to-buffer-other-window (get-buffer-create *Capture*))
   (erase-buffer)
   (insert template)
   (goto-char (point-min))
--8---cut here---end---8---

Feedback from real emacs lisp people welcome...

thanks again,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1216-gb856f6



Re: [O] ox-koma-letter: how to use @@LaTeX:@@ specific commands in #+ directives

2015-06-18 Thread Eric S Fraga
On Thursday, 18 Jun 2015 at 10:47, Rasmus wrote:

[...]

 Right.  #+author is not parsed.  In the patch I enable parsing on this and
 others.

 Nicolas: are there any of the keywords in the patch that shouldn't be
 parsed?

 Also, I left out FROM_ADDRESS as I remember it interprets newlines and I
 don't have time ATM to properly check if this depends on the newline
 behavior.

 Rasmus

Rasmus,

with this patch, exporting to koma-letter doesn't work for me.  I've not
investigated properly yet but thought I'd give you a heads up on
this.  The LaTeX compilation fails:

,
| Foot of first page
| Address (addressee)
| Location field: empty
| Title: yes
| (/usr/share/texlive/texmf-dist/tex/latex/base/t1cmss.fd)
| Subject: before opening
| ! Undefined control sequence.
| \@gnewline ...\@nolnerr \else \unskip \reserved@e 
|   {\reserved@f #1}\nobreak 
\...
| l.59 \closing{nil}
|   
| ? 
| ! Emergency stop.
| \@gnewline ...\@nolnerr \else \unskip \reserved@e 
|   {\reserved@f #1}\nobreak 
\...
| l.59 \closing{nil}
`

Without the patch, the compilation succeeds (although obviously I still
don't have @@latex:@@ working in the author field ;-).

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1154-g6ba251



Re: [O] org-babel-lob-ingest and debug-init

2015-06-18 Thread Andreas Leha
Hi,

Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 Hello,

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:

 Andreas Leha andreas.l...@med.uni-goettingen.de writes:
 Hi all,

 I have two lines like this in my .emacs:

 (org-babel-lob-ingest ~/path/to/library-of-babel.org)
 (org-babel-lob-ingest ~/path/to/custom-library-of-babel.org)


 All works fine usually.  But when I start emacs using the --debug-init
 option, these lines result in

 ,
 | Debugger entered--Lisp error: (error Before first heading)
 `

 Not sure whether this is relevant, but these are basically my first lines 
 in .emacs:

 (add-to-list 'load-path ~/path/to/org-mode-from-git/)
 (require 'org-loaddefs)

 Why do I get this error?

 Many thanks in advance,
 Andreas

 Sorry, this was the wrong diagnosis.  I get 'Before first heading' now
 quite often with Org mode files (visiting the file, global visibility
 cycling, etc.)

 I got myself into this by upgrading emacs [1].  I also upgraded Org
 mode [2] to no avail.

 What am I missing?

 Dunno. A backtrace with an uncompiled Org would help.


Sorry, I did not even test with emacs -q before reporting here.

I 'found' the problem.  The problem is outshine/outorg.  Disabling those
does solve the problem.

So, it is not really Org mode related.

Regards,
Andreas




Re: [O] ox-koma-letter: how to use @@LaTeX:@@ specific commands in #+ directives

2015-06-18 Thread Rasmus
Eric S Fraga e.fr...@ucl.ac.uk writes:

 On Thursday, 18 Jun 2015 at 00:03, Nicolas Goaziou wrote:

 [...]

 I cannot reproduce it. koma-letter back-ends explicitly allows latex
 export snippets, e.g.,

   #+title: @@latex:\something@@

 produces the expected \something.

 Ummm, I thought I was going crazy as, for once, I had tested using emacs
 -Q before posting something silly to the list...

 You are correct in that it works with #+title:.  It also works with
 #+subject:.  However, it does *not* work with #+author:.  I've not tried
 any of the other org setting directives.  It was author I was playing
 with yesterday...

Right.  #+author is not parsed.  In the patch I enable parsing on this and
others.

Nicolas: are there any of the keywords in the patch that shouldn't be
parsed?

Also, I left out FROM_ADDRESS as I remember it interprets newlines and I
don't have time ATM to properly check if this depends on the newline
behavior.

Rasmus

-- 
El Rey ha muerto. ¡Larga vida al Rey!
From 0dc981a8d223a0f41dc5d1f7227ae1d32e7abf2d Mon Sep 17 00:00:00 2001
From: Rasmus ras...@gmx.us
Date: Thu, 18 Jun 2015 10:34:17 +0200
Subject: [PATCH 1/2] ox-koma-letter: Parse more keywords

* ox-koma-letter.el (koma-letter): Parse author, phone-number,
  opening, closing and signature.

fix
---
 contrib/lisp/ox-koma-letter.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/contrib/lisp/ox-koma-letter.el b/contrib/lisp/ox-koma-letter.el
index 119ffe9..aeb8f01 100644
--- a/contrib/lisp/ox-koma-letter.el
+++ b/contrib/lisp/ox-koma-letter.el
@@ -381,17 +381,17 @@ e.g. \title-subject:t\.
   :options-alist
   '((:latex-class LATEX_CLASS nil org-koma-letter-default-class t)
 (:lco LCO nil org-koma-letter-class-option-file)
-(:author AUTHOR nil (org-koma-letter--get-value org-koma-letter-author) t)
+(:author AUTHOR nil (org-koma-letter--get-value org-koma-letter-author) parse)
 (:author-changed-in-buffer-p AUTHOR nil nil t)
 (:from-address FROM_ADDRESS nil org-koma-letter-from-address newline)
-(:phone-number PHONE_NUMBER nil org-koma-letter-phone-number)
+(:phone-number PHONE_NUMBER nil org-koma-letter-phone-number parse)
 (:email EMAIL nil (org-koma-letter--get-value org-koma-letter-email) t)
 (:to-address TO_ADDRESS nil nil newline)
-(:place PLACE nil org-koma-letter-place)
+(:place PLACE nil org-koma-letter-place parse)
 (:subject SUBJECT nil nil parse)
-(:opening OPENING nil org-koma-letter-opening)
-(:closing CLOSING nil org-koma-letter-closing)
-(:signature SIGNATURE nil org-koma-letter-signature newline)
+(:opening OPENING nil org-koma-letter-opening parse)
+(:closing CLOSING nil org-koma-letter-closing parse)
+(:signature SIGNATURE nil org-koma-letter-signature parse)
 (:special-headings nil special-headings
 		   org-koma-letter-prefer-special-headings)
 (:special-tags nil nil (append
-- 
2.4.4