Re: [O] Emacs+org-mode in a Docker?

2015-11-06 Thread Grant Rettke
On Wed, Nov 4, 2015 at 7:07 PM, John Kitchin  wrote:
> Thanks for all the notes! It looks like a not too trivial exercise that
> might have to be a summer project for me.

For the past year, I've been curious about how to make my Emacs
environment available to me and anyone else, easily. Goal is to make
working on a Linux, Windows, or OSX GUI a one-click setup. For me,
Vagrant is the obvious solution here. Vagrant and Packer,
specifically.

The benefit of using Packer to build a Vagrant image is that the user
doesn't have to wait for the download and installation of big stuff
like TeXLive. That get's me curious if we (all Emacs/Org users) might
want to build a base-image that includes all the stuff out there.
Might make it easy for users to try out lots of different configs
without having to deal with all of the software requirements. While
that isn't a "big deal", it is just easier for them so they can focus
on doing stuff with Org.



Re: [O] Org markup bug ?

2015-11-06 Thread Mehul Sanghvi
Yes, looks like that is the fix.

Thanks for looking it.


cheers,

  mehul


On Sat, Oct 31, 2015 at 11:48 AM, Nick Dokos  wrote:

> Mehul Sanghvi  writes:
>
> > Nicolas,
> >
> >   Thanks for pointing out that the latest version works. I updated
> org-mode and it seems to be working now.
> > I wonder what changed to cause it to work.
> >
>
> My guess would be
>
> commit b4af3f0852e9705ddbac66d78cd8a508c547be85
> Author: Nicolas Goaziou 
> Date:   Sun Oct 25 19:20:25 2015 +0100
>
> Allow more characters in emphasis
>
> * lisp/org.el (org-emphasis-regexp-components): Allow singe quote,
>   double quote and comma as the last character in an emphasis string.
>
> Reported-by: Marcin Borkowski 
> 
>
>
> > On Sat, Oct 31, 2015 at 10:57 AM, Mehul Sanghvi 
> wrote:
> >
> > I am currently using:
> >
> >Org-mode version 8.3.2 (release_8.3.2-195-gbf9146
> >
> > I will try updating and seeing what happens.
> >
> > On Sat, Oct 31, 2015 at 5:23 AM, Nicolas Goaziou <
> m...@nicolasgoaziou.fr> wrote:
> >
> > Hello,
> >
> > Mehul Sanghvi  writes:
> >
> > > I have the following written in an org file:
> > >
> > >   The =\,= allows you to put a Lisp expression there and
> the =#= is
> > >the /replace-count/.  Read /*replace-regexp*/ for more
> information.
> > >
> > > When I render this in HTML I get the following:
> > >
> > >The \,= allows you to put a Lisp expression there and
> the =# is the
> > > *replace-count*. Read *replace-regexp* for more information.
> > >
> > > Is this a bug with the parser or am I doing something wrong ?
> >
> > FWIW, I cannot reproduce it in development version. You may want
> to
> > update Org.
> >
>
> --
> Nick
>
>
>


-- 
Mehul N. Sanghvi
email: mehul.sang...@gmail.com


Re: [O] Lexical binding bug in org-list.el?

2015-11-06 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> The org-list code is a mess, and I think we should hold off on converting
> it to lexical scoping until it can be refactored in a more dedicated
> way.

It seems a bit strong considering there's only one issue so far. I don't
think the code is a mess, but "Send and receive lists" part clearly
needs an overhaul.

> Nonetheless I include the patch, in case it’s helpful to anyone.

Lifting `org-list--get-text', `org-list--parse-item', etc. isn't
necessary. I just forgot a `letrec' in `org-list-parse-list'.

The problem comes from `org-list-to-substree'. `org-list-to-generic'
mechanism is not adequate for this function, which relied so far on
a kludge to get the job done (i.e., undocumented `eval'ing of :istart
and :icount values). Actually, `org-list-to-generic' in its current form
isn't adequate for anything. Even `org-list-to-*' functions do not use
it.

As a temporary fix, besides using `letrec' per above, we can
re-implement `org-list-to-subtree' without using `org-list-to-generic'.

Later, `org-list-to-*' could be re-implemented like `orgtbl-to-generic'.
Also, some parameters should be able to be set to a function generating
a string, which would be called with the current depth of the item. In
the process I think `org-list-parse-list' should be simplified, too, as
its current return value is useless (e.g., nothing uses [CBON] anymore
in the code base).

WDYT?


Regards,

-- 
Nicolas Goaziou



[O] [PATCH][BUG] org-babel-confirm-evaluate

2015-11-06 Thread Charles C. Berry


Seems like this commit

  commit 40356ae3765d123fd9950a961718530219fa5cb8
  Author: Aaron Ecay 
  Date:   Thu Nov 5 15:51:06 2015 +

broke Babel. At least I cannot get C-c C-c to execute sec blocks when I 
respond 'y' to queries.


I think this patch fixes it (and some typos), but I hesitate to push it in 
case there is something I am not seeing about the recent changes.


Chuck
From 35edc2835bea76f494df9c42d3d7927d4a10bbd0 Mon Sep 17 00:00:00 2001
From: Charles Berry 
Date: Fri, 6 Nov 2015 16:00:50 -0800
Subject: [PATCH] ob-core.el: org-babel-confirm-evaluate bugfix

* lisp/ob-core.el (org-babel-confirm-evaluate): Return t/nil for y/n answer to 
query.   Minor edits of prompt and message.
---
 lisp/ob-core.el | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 739bbcd..53aa1f5 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -344,15 +344,17 @@ environment, to override this check."
 (pcase evalp
   (`nil nil)
   (`t t)
-  (`query (unless
- (and (not (org-bound-and-true-p
-org-babel-confirm-evaluate-answer-no))
-  (yes-or-no-p
-   (format "Evaluate this %s code block%son your system? "
-   lang name-string)))
-   (message "Evaluation of this %s code-block%sis aborted."
-lang name-string)))
-  (x (error "Unexepcted value `%s' from 
`org-babel-check-confirm-evaluate'" x)
+  (`query (or
+  (and (not (org-bound-and-true-p
+ org-babel-confirm-evaluate-answer-no))
+   (yes-or-no-p
+(format "Evaluate this %s code block%s on your system? "
+lang name-string)))
+  (and
+   (message "Evaluation of this %s code-block%s is aborted."
+lang name-string)
+   nil)))
+  (x (error "Unexpected value `%s' from 
`org-babel-check-confirm-evaluate'" x)
 
 ;;;###autoload
 (defun org-babel-execute-safely-maybe ()
-- 
2.4.9 (Apple Git-60)



Re: [O] BUG: emacs orgmode ob-R.el function org-babel-R-evaluate-session over aggressively performs "; ; cleanup extra prompts left in output" and a possible workaround

2015-11-06 Thread Charles C. Berry

On Thu, 5 Nov 2015, Nicolas Goaziou wrote:


Hello,

"Charles C. Berry"  writes:


I have traced this back to its source, and the culprit appears to be me.

See
  commit dc92eaa08d89e4bc9556f868ae65633196157a8d
  Author: Eric Schulte 
  Date:   Wed Jul 28 08:05:30 2010 -0600
and subsequent modifications.

I believe the leading blank(s) in the regex were copied from ess, but
nowadays I only see this in code in ess-traceback.el that is commented
out.

So I guess there would be no harm in pushing the latter regex.


Would you want to provide a patch for that (and commit it while you're
at it)?


Yes, but Babel seems to be broken - at least on my box - by this

commit 40356ae3765d123fd9950a961718530219fa5cb8
Author: Aaron Ecay 
Date:   Thu Nov 5 15:51:06 2015 +

Once that is resolved, I'll do something.

Chuck



[O] Better Bibtex text-editor API

2015-11-06 Thread Matt Price
I've just had my attention drawn to this feature of the Better Bibtex
plugin for Zotero:

https://zotplus.github.io/better-bibtex/cayw.html

So, Better Bibtex now supports an HTTP endpoint that generates various
kinds of citations.I'm not sure if that's helpful only for creating
citation keys, or if it gives a way to use Zotero  Erik, I was wondering if
you had seen it and whether you have a sense of how much this overlaps with
your work in zotxt.  And org: I thought it was worth pointing out another
possible method for integrating with Zotero.

m


Re: [O] Lexical binding bug in org-list.el?

2015-11-06 Thread Kaushal Modi
Thanks for working on this Aaron but M-x ediff-patch-file failed for me.

I am on the cce317 commit of org-mode
(http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=265e5b9984818f76dea8f5147af0c4a939cf457b)

patching file /home/kmodi/e/elisp/org-mode/lisp_25_0/org-list.el
Hunk #1 succeeded at 2923 (offset 1 line).
Hunk #2 succeeded at 3017 (offset 1 line).
Hunk #3 succeeded at 3103 (offset 1 line).
Hunk #4 FAILED at 3215.
Hunk #5 FAILED at 3325.
2 out of 5 hunks FAILED -- saving rejects to file
/home/kmodi/e/elisp/org-mode/lisp_25_0/org-list.el.rej



Re: [O] ox-html HOWTO? exporting #+RESULTS inside div

2015-11-06 Thread Charles C. Berry

On Fri, 6 Nov 2015, Cook, Malcolm wrote:


Charles, Thanks again for you suggestion.  Alas, using 'header-args

> >:wrap org-results-container' has the unforeseen (by me) side effect
> >of masking my use of `#+ATTR_HTML :class dataTable` on selected
> >exported tables (which I use to allow for search/sortable/scrollable
> >tables).  Now, the ':class dataTable' attribute is placed on the new
> > instead of the  with undesired outcome.
>
> > Do you have any thoughts on how to accomplish both my goals (apply
> > :class table to selected results, and making ALL results be
> > addressable using javascript.  FYI - My application is to hide all
> > source blocks on html open.  Clicking on a source block caption
> > shows the source.  This provides an HTML view that hides the source
> > until desired.  My recipients of such analysis write-ups really like
> > this.
>
> [snip]
>
> > # #+PROPERTY: header-args :wrap org-results-container
> > #
>
> This creates a special block and attributes on the results will apply
> to it - not its contents.
>
> What you want can be obtained by creating a different special block
> and then applying a filter. So, wrap like this
>
> #+PROPERTY: header-args :wrap org-results-container-to-filter
>
> and add a filter to `org-export-filter-special-block-functions' that
> strips the 'to-filter' and adds the `dataTable' where it is needed.

Hi Charles - ok - you've got me looking at ox aspects I've not yet explored 
good!

If I understand your suggestion, the filter you propose would need to 
somehow "know" which tables I desire to be adorned with `class 
:dataTable`.




Make a really dumb filter that just wraps a special block with something 
like


`special-block>>>' ... `< #+PROPERTY: 
header-args :wrap org-results-container" provided for me, except that 
the introduction of the new  was blocking my means of doing (a)


Right. So you use replace-regex-in-string to fix that.

HTH,

Chuck




Re: [O] Lexical binding bug in org-list.el?

2015-11-06 Thread Aaron Ecay
Hi Kaushal,

I can reproduce the bug, and you’re right about the cause.  I made the
attached patch, which seems to get the code back on its feet.  But I
just sort of fiddled with it until all the lexical scoping warnings from
the compiler went away; I have no idea whether it’s correct.

The org-list code is a mess, and I think we should hold off on converting
it to lexical scoping until it can be refactored in a more dedicated way.
Nonetheless I include the patch, in case it’s helpful to anyone.

Thanks for the report (and the very easy test case! :) ),

-- 
Aaron Ecay
>From d4b3d0e9ec19d6c2bca8a53313c260b266437c00 Mon Sep 17 00:00:00 2001
From: Aaron Ecay 
Date: Fri, 6 Nov 2015 20:38:08 +
Subject: [PATCH] draft patch to fix org-list

---
 lisp/org-list.el | 328 ++-
 1 file changed, 153 insertions(+), 175 deletions(-)

diff --git a/lisp/org-list.el b/lisp/org-list.el
index 683a643..060fda3 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -2922,6 +2922,66 @@ ignores hidden links."
 
 ;;; Send and receive lists
 
+(defun org-list--get-text (beg end)
+  "Return text between BEG and END, trimmed, with checkboxes replaced."
+  (let ((text (org-trim (buffer-substring beg end
+(if (string-match "\\`\\[\\([-X ]\\)\\]" text)
+	(replace-match
+	 (let ((box (match-string 1 text)))
+	   (cond
+	((equal box " ") "CBOFF")
+	((equal box "-") "CBTRANS")
+	(t "CBON")))
+	 t nil text 1)
+  text)))
+
+(defun org-list--parse-item (e struct parents prevs)
+  "Return a list containing counter of item, if any, text and any sublist inside it."
+  (let ((start (save-excursion
+		 (goto-char e)
+		 (looking-at "[ \t]*\\S-+\\([ \t]+\\[@\\(start:\\)?\\([0-9]+\\|[a-zA-Z]\\)\\]\\)?[ \t]*")
+		 (match-end 0)))
+	;; Get counter number.  For alphabetic counter, get
+	;; its position in the alphabet.
+	(counter (let ((c (org-list-get-counter e struct)))
+		   (cond
+		((not c) nil)
+		((string-match "[A-Za-z]" c)
+		 (- (string-to-char (upcase (match-string 0 c)))
+			64))
+		((string-match "[0-9]+" c)
+		 (string-to-number (match-string 0 c))
+	(childp (org-list-has-child-p e struct))
+	(end (org-list-get-item-end e struct)))
+;; If item has a child, store text between bullet and
+;; next child, then recursively parse all sublists.  At
+;; the end of each sublist, check for the presence of
+;; text belonging to the original item.
+(if childp
+	(let* ((children (org-list-get-children e struct parents))
+	   (body (list (org-list--get-text start childp
+	  (while children
+	(let* ((first (car children))
+		   (sub (org-list-get-all-items first struct prevs))
+		   (last-c (car (last sub)))
+		   (last-end (org-list-get-item-end last-c struct)))
+	  (push (org-list--parse-sublist sub struct parents prevs) body)
+	  ;; Remove children from the list just parsed.
+	  (setq children (cdr (member last-c children)))
+	  ;; There is a chunk of text belonging to the
+	  ;; item if last child doesn't end where next
+	  ;; child starts or where item ends.
+	  (unless (= (or (car children) end) last-end)
+		(push (org-list--get-text last-end (or (car children) end))
+		  body
+	  (cons counter (nreverse body)))
+  (list counter (org-list--get-text start end)
+
+(defun org-list--parse-sublist (e struct parents prevs)
+  "Return a list whose car is list type and cdr a list of items' body."
+  (cons (org-list-get-list-type (car e) struct prevs)
+	(mapcar (lambda (x) (org-list--parse-item x struct parents prevs)) e)))
+
 (defun org-list-parse-list (&optional delete)
   "Parse the list at point and maybe DELETE it.
 
@@ -2956,77 +3016,10 @@ Point is left at list end."
 	 (parents (org-list-parents-alist struct))
 	 (top (org-list-get-top-point struct))
 	 (bottom (org-list-get-bottom-point struct))
-	 out
-	 (get-text
-	  (function
-	   ;; Return text between BEG and END, trimmed, with
-	   ;; checkboxes replaced.
-	   (lambda (beg end)
-	 (let ((text (org-trim (buffer-substring beg end
-	   (if (string-match "\\`\\[\\([-X ]\\)\\]" text)
-		   (replace-match
-		(let ((box (match-string 1 text)))
-		  (cond
-		   ((equal box " ") "CBOFF")
-		   ((equal box "-") "CBTRANS")
-		   (t "CBON")))
-		t nil text 1)
-		 text)
-	 (parse-sublist
-	  (function
-	   ;; Return a list whose car is list type and cdr a list of
-	   ;; items' body.
-	   (lambda (e)
-	 (cons (org-list-get-list-type (car e) struct prevs)
-		   (mapcar parse-item e)
-	 (parse-item
-	  (function
-	   ;; Return a list containing counter of item, if any, text
-	   ;; and any sublist inside it.
-	   (lambda (e)
-	 (let ((start (save-excursion
-			(goto-char e)
-			(looking-at "[ \t]*\\S-+\\([ \t]+\\[@\\(start:\\)?\\([0-9]+\\|[a-zA-Z]\\)\\]\\)?[ \t]*")
-			(match-end 0)))
-		   ;; Get counter number.  For alphabetic counter, get
-		   ;; its position in

Re: [O] [RFC] [PATCH] allow bind keywords to set safe values

2015-11-06 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> BIND keywords should be used for controlling export, rather than the
> usual emacs method of setting file local variables
> .

In this message, I say that file local variables may not replace BIND
keywords (although, I still cannot remember why).

However, BIND keywords cannot replace file local variables, because some
variables are used outside of `org-export-as'. `org-latex-compiler'
comes to mind.

> But, BIND keywords are currently disabled by default. We can’t turn
> these on by default, as maliciously crafted documents could do nasty
> things to a user’s emacs. The attached patch permits many interesting
> usages of BIND keywords by allowing them to set variables by default,
> as long as the value thus set is safe (as implemented by emacs’s
> default file local variable code).

Sounds good.

>  If @code{org-export-allow-bind-keywords} is non-@code{nil}, Emacs variables
> -can become buffer-local during export by using the BIND keyword.  Its syntax
> -is @samp{#+BIND: variable value}.  This is particularly useful for in-buffer
> -settings that cannot be changed using specific keywords.
> +can become buffer-local during export by using the BIND keyword.  Setting the
> +variable to @code{t} allows variables to take on all values.  Setting it to
> +the symbol @code{safe} (the default) only allows safe values.  (@pxref{Safe
> +File Variables,,,emacs,The Emacs Manual}) The syntax of a BIND keyword is
> +@samp{#+BIND: variable value}.  The text of @samp{value} will be passed to
> +the elisp @code{read} function.@footnote{This means that strings should be
> +surrounded with double quotes, but symbols and lists will be read literally
> +and need not be quoted for lisp with a single quote.}  The BIND keyword is
> +particularly useful for in-buffer settings that cannot be changed using
> +specific keywords.@footnote{You should not use the usual emacs local variable
> +convention (@pxref{Specifying File Variables,,,emacs,The Emacs Manual}),
> +because these notations could be lost during the export process.}  It is also
> +useful for collecting common variable settings in a setup file shared between
> +several documents (@pxref{SETUPFILE}).

Maybe an example would be interesting, preferably with a non trivial
value (e.g. a list or a string). WDYT?

> -(push (read (format "(%s)" val)) alist)
> +(let* ((pair (read (format "(%s)" val

`let*' -> `let'


Regards,

-- 
Nicolas Goaziou



Re: [O] Inconsistency between org-store-link-functions and org-store-link

2015-11-06 Thread Nicolas Goaziou
Hello,

Aaron Ecay  writes:

> The docstring of org-store-link-functions says: “Each function will be
> called in turn until one returns a non-nil value.”  However, the code of
> org-store-link actually calls all the functions, and if more than one
> returns a non-nil value raises a prompt asking the user to choose (and
> then calls that function a second time).
>
> Should we change the code to match the doc, or vice versa?

The former, IMO.

> Aaron
>
> PS I vote for keeping the semantics described in the doc, because the
> current implementation’s double calling of the selected function
> means that store-link functions that have side effects will behave
> unpredictably.  Imagine a store-link function for image buffers that
> uploads the buffer to imgur or a similar hosting site, and stores the
> http url of the uploaded file.  The current implementation would
> upload the image twice.

I agree.

Regards,

-- 
Nicolas Goaziou

P.S: next release is AFAIK "8.4", not "9.0", you may want to update your
recent changes advertising the latter. Thank you.



Re: [O] [RFC] [PATCH] allow bind keywords to set safe values

2015-11-06 Thread Thomas S . Dye
Aloha Aaron,

Aaron Ecay  writes:

> Hello all,
>
> BIND keywords should be used for controlling export, rather than the
> usual emacs method of setting file local variables
> .  But,
> BIND keywords are currently disabled by default.  We can’t turn these on
> by default, as maliciously crafted documents could do nasty things to a
> user’s emacs.  The attached patch permits many interesting usages of
> BIND keywords by allowing them to set variables by default, as long as
> the value thus set is safe (as implemented by emacs’s default file local
> variable code).

The prescription that BIND keywords should be used over local variables
caught me by surprise.  Nicolas' post about a vague recollection that
some local variables might not be picked up during export seems an odd
motivation for the prescription.  I've used local variables to control
export for a long time without running into this problem.

I'm not complaining, just commenting on an unusual sequence of events on
the mailing list.  

I'm happy to migrate my local variables to BIND if that is what I should
do.

That said, it would be great if one could use EXPORT_BIND to control
export at the subtree export level.  I'm keeping separate HTML and LaTeX
export projects in the same file fairly often now and it can be
difficult (for me) to structure the whole file properly so both exports
work as expected.

BTW, many thanks for your recent interest in and work on Babel.  It is
an important part of my work flow and I've been uneasy since Eric
orphaned the project a while back.  I hope you find the work there
rewarding enough to keep up.

All the best,
Tom

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



Re: [O] [bug] 8.3 fills all footnotes

2015-11-06 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> * test
> 8.3 seems to fill multi-paragraph footnotes wrong.
>
> perhaps i misunderstand a footnote syntax change?
> *** to reproduce
> ebasic () { emacs --geometry 80x30-0+0 --eval '(blink-cursor-mode 0)' "$@" ;}
> eq () { ebasic -Q "$@" ;}
> eo () { eq --eval '(progn (add-to-list '\''load-path
> (substitute-in-file-name "$delorgsrc/lisp")) (add-to-list
> '\''load-path (substitute-in-file-name "$delorgsrc/contrib/lisp")))'
> "$@" ;}
>
> export to ascii
> *** input
> hi[fn:overton]  there[fn:orwell]
>
> [fn:overton]
>
> test1.
>
> test2
>
> test3
>
> ===
>
> test4
>
> [fn:orwell]
>
> 4
>
> 5
> 6
> *** undesirable output
>   ___
>
>INPUT
>   ___
>
>
> hi[1]  there[2]
>
>
>
> Footnotes
> _
>
> [1] test1.  test2 test3 === test4
>
> [2] 4 5 6

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] 8.3 fills all footnotes

2015-11-06 Thread Samuel Wales
i must be the only guy who ever uses multiple paragraphs in footnotes.
i keep thinking i can't be /that/ strange.  (don't answer that.)

thank you for fixing it.


On 11/6/15, Nicolas Goaziou  wrote:
> Hello,
>
> Samuel Wales  writes:
>
>> * test
>> 8.3 seems to fill multi-paragraph footnotes wrong.
>>
>> perhaps i misunderstand a footnote syntax change?
>> *** to reproduce
>> ebasic () { emacs --geometry 80x30-0+0 --eval '(blink-cursor-mode 0)' "$@"
>> ;}
>> eq () { ebasic -Q "$@" ;}
>> eo () { eq --eval '(progn (add-to-list '\''load-path
>> (substitute-in-file-name "$delorgsrc/lisp")) (add-to-list
>> '\''load-path (substitute-in-file-name "$delorgsrc/contrib/lisp")))'
>> "$@" ;}
>>
>> export to ascii
>> *** input
>> hi[fn:overton]  there[fn:orwell]
>>
>> [fn:overton]
>>
>> test1.
>>
>> test2
>>
>> test3
>>
>> ===
>>
>> test4
>>
>> [fn:orwell]
>>
>> 4
>>
>> 5
>> 6
>> *** undesirable output
>>   ___
>>
>>INPUT
>>   ___
>>
>>
>> hi[1]  there[2]
>>
>>
>>
>> Footnotes
>> _
>>
>> [1] test1.  test2 test3 === test4
>>
>> [2] 4 5 6
>
> Fixed. Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

Ramsay's disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] Lexical binding bug in org-list.el?

2015-11-06 Thread Kaushal Modi
Lesser steps to recreate this bug:

(1) In any buffer, do M-x org-mode

(2) Type: - item 1

(3) Do M-RET
Now you have
- item 1
-

(4) Now do C-c *
Boom!



Re: [O] ox-html HOWTO? exporting #+RESULTS inside div

2015-11-06 Thread Cook, Malcolm
> > Charles, Thanks again for you suggestion.  Alas, using 'header-args
 > >:wrap org-results-container' has the unforeseen (by me) side effect
 > >of masking my use of `#+ATTR_HTML :class dataTable` on selected
 > >exported tables (which I use to allow for search/sortable/scrollable
 > >tables).  Now, the ':class dataTable' attribute is placed on the new
 > > instead of the  with undesired outcome.
 > 
 > > Do you have any thoughts on how to accomplish both my goals (apply
 > > :class table to selected results, and making ALL results be
 > > addressable using javascript.  FYI - My application is to hide all
 > > source blocks on html open.  Clicking on a source block caption
 > > shows the source.  This provides an HTML view that hides the source
 > > until desired.  My recipients of such analysis write-ups really like
 > > this.
 > 
 > [snip]
 > 
 > > # #+PROPERTY: header-args :wrap org-results-container
 > > #
 > 
 > This creates a special block and attributes on the results will apply
 > to it - not its contents.
 > 
 > What you want can be obtained by creating a different special block
 > and then applying a filter. So, wrap like this
 > 
 > #+PROPERTY: header-args :wrap org-results-container-to-filter
 > 
 > and add a filter to `org-export-filter-special-block-functions' that
 > strips the 'to-filter' and adds the `dataTable' where it is needed.

Hi Charles - ok - you've got me looking at ox aspects I've not yet explored 
good!

If I understand your suggestion, the filter you propose would need to somehow 
"know" which tables I desire to be adorned with `class :dataTable`.

How do you reckon I might declare that?

Upon reflection, I wonder if following source block header syntax might rather 
be considered "in the spirit of things" and worthy of implementation:

#+begin_src R :exports value table :prefix '#+attr_html :class 
dataTable'

which would be interpreted by ob-sbe (somehow) to emit and
#+attr_html :class dataTable
Immediately prior to the #+results, all of which might be further :wrapped.

Or am I putting the cart before the horse?

Reminder (in part to self): my goal is two-fold 
 (a) declare to the ox-html exporter a :class (i.e. dataTable) to adorn 
selected exported results tables
 (b) have a means of addressing the exported html results of a code block 
allowing to conditionally hide or expose it (i.e. toggle exposure when user 
click on the export source code.  This is what "> #+PROPERTY: header-args :wrap 
org-results-container" provided for me, except that the introduction of the new 
 was blocking my means of doing (a)

Cheers,

Malcolm

 > 
 > HTH,
 > 
 > Chuck



[O] Lexical binding bug in org-list.el?

2015-11-06 Thread Kaushal Modi
Hi,

Here the required info:

Org-mode version 8.3.2 (release_8.3.2-287-gcce317 @
/home/kmodi/usr_local/apps/6/emacs/master/share/emacs/site-lisp/org/)

The bug is very easy to recreate.

(1) In any buffer, M-x org-mode

(2) Type * heading 1

(3) Do M-RET
Now you have
* heading 1
*

(4) Do C-c -
Now you have
* heading 1
-

(5) Do C-c *
Boom!

The depth var is not bound to anything in that lexical scope.

= BACKTRACE

Debugger entered--Lisp error: (void-variable depth)
  (funcall get-stars depth)
  eval((funcall get-stars depth))
  (concat (eval istart) "%s")
  (cond ((eq type (quote descriptive)) (concat (let ((s (eval
istart))) (or (and (string-match "[ \n
]+\\'" s) (replace-match "" t t s)) istart)) "%s" (eval ddend))) ((and
counter (eq type (quote ordered))) (concat (eval icount) "%s")) (t
(concat (eval istart) "%s")))
  (concat (cond ((eq type (quote descriptive)) (concat (let ((s (eval
istart))) (or (and (string-match "[ \n
]+\\'" s) (replace-match "" t t s)) istart)) "%s" (eval ddend))) ((and
counter (eq type (quote ordered))) (concat (eval icount) "%s")) (t
(concat (eval istart) "%s"))) (eval iend))
  (let* ((counter (car-safe (prog1 item (setq item (cdr item) (fmt
(concat (cond ((eq type (quote descriptive)) (concat (let ... ...)
"%s" (eval ddend))) ((and counter (eq type ...)) (concat (eval icount)
"%s")) (t (concat (eval istart) "%s"))) (eval iend))) (first (car
item))) (cond ((string-match "\\[CBON\\]" first) (setq first
(replace-match cbon t t first))) ((string-match "\\[CBOFF\\]" first)
(setq first (replace-match cboff t t first))) ((string-match
"\\[CBTRANS\\]" first) (setq first (replace-match cbtrans t t
first (if nobr (progn (setq first (org-list-item-trim-br first
(if (eq type (quote descriptive)) (progn (let* ((complete
(string-match "^\\(.*\\)[ ]+::[ ]*" first)) (term (if complete (let
... ...) "???")) (desc (if complete (substring first ...) first)))
(setq first (concat (eval dtstart) term (eval dtend) (eval ddstart)
desc) (setcar item first) (format fmt (mapconcat (function (lambda
(e) (if (stringp e) e (funcall export-sublist e (1+ depth) item
(or (eval csep) ""
  (closure ((export-sublist) (nobr) (cbtrans . "TODO") (cboff .
"TODO") (cbon . "DONE") (csep if org--blankp "\n\n" "\n") (lsep) (isep
if org--blankp "\n\n" "\n") (iend) (icount funcall get-stars depth)
(istart funcall get-stars depth) (ddend) (ddstart) (dtend . " ")
(dtstart . " ") (dend) (dstart) (uend) (ustart) (oend) (ostart)
(splicep . t) (p :splice t :dtstart " " :dtend " " :istart (funcall
get-stars depth) :icount (funcall get-stars depth) :isep (if
org--blankp "\n\n" "\n") :csep (if org--blankp "\n\n" "\n") :cbon
"DONE" :cboff "TODO" :cbtrans "TODO") (params :splice t :dtstart " "
:dtend " " :istart (funcall get-stars depth) :icount (funcall
get-stars depth) :isep (if org--blankp "\n\n" "\n") :csep (if
org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO" :cbtrans "TODO")
(list unordered (nil "")) org-tab-ind-state t) (item type depth) (let*
((counter (car-safe (prog1 item (setq item (cdr item) (fmt (concat
(cond ((eq type ...) (concat ... "%s" ...)) ((and counter ...) (concat
... "%s")) (t (concat ... "%s"))) (eval iend))) (first (car item)))
(cond ((string-match "\\[CBON\\]" first) (setq first (replace-match
cbon t t first))) ((string-match "\\[CBOFF\\]" first) (setq first
(replace-match cboff t t first))) ((string-match "\\[CBTRANS\\]"
first) (setq first (replace-match cbtrans t t first (if nobr
(progn (setq first (org-list-item-trim-br first (if (eq type
(quote descriptive)) (progn (let* ((complete (string-match "^\\(.*\\)[
]+::[ ]*" first)) (term (if complete ... "???")) (desc (if complete
... first))) (setq first (concat (eval dtstart) term (eval dtend)
(eval ddstart) desc) (setcar item first) (format fmt (mapconcat
(function (lambda (e) (if (stringp e) e (funcall export-sublist e
... item (or (eval csep) "")((nil "") unordered 0)
  funcall((closure ((export-sublist) (nobr) (cbtrans . "TODO") (cboff
. "TODO") (cbon . "DONE") (csep if org--blankp "\n\n" "\n") (lsep)
(isep if org--blankp "\n\n" "\n") (iend) (icount funcall get-stars
depth) (istart funcall get-stars depth) (ddend) (ddstart) (dtend . "
") (dtstart . " ") (dend) (dstart) (uend) (ustart) (oend) (ostart)
(splicep . t) (p :splice t :dtstart " " :dtend " " :istart (funcall
get-stars depth) :icount (funcall get-stars depth) :isep (if
org--blankp "\n\n" "\n") :csep (if org--blankp "\n\n" "\n") :cbon
"DONE" :cboff "TODO" :cbtrans "TODO") (params :splice t :dtstart " "
:dtend " " :istart (funcall get-stars depth) :icount (funcall
get-stars depth) :isep (if org--blankp "\n\n" "\n") :csep (if
org--blankp "\n\n" "\n") :cbon "DONE" :cboff "TODO" :cbtrans "TODO")
(list unordered (nil "")) org-tab-ind-state t) (item type depth) (let*
((counter (car-safe (prog1 item (setq item (cdr item) (fmt (concat
(cond ((eq type ...) (concat ... "%s" ...)) ((and counter ...) (concat
... "%s")) (t (concat ... "%s"))) (eval ie

[O] [bug] 8.3 fills all footnotes

2015-11-06 Thread Samuel Wales
* test
8.3 seems to fill multi-paragraph footnotes wrong.

perhaps i misunderstand a footnote syntax change?
*** to reproduce
ebasic () { emacs --geometry 80x30-0+0 --eval '(blink-cursor-mode 0)' "$@" ;}
eq () { ebasic -Q "$@" ;}
eo () { eq --eval '(progn (add-to-list '\''load-path
(substitute-in-file-name "$delorgsrc/lisp")) (add-to-list
'\''load-path (substitute-in-file-name "$delorgsrc/contrib/lisp")))'
"$@" ;}

export to ascii
*** input
hi[fn:overton]  there[fn:orwell]

[fn:overton]

test1.

test2

test3

===

test4

[fn:orwell]

4

5
6
*** undesirable output
  ___

   INPUT
  ___


hi[1]  there[2]



Footnotes
_

[1] test1.  test2 test3 === test4

[2] 4 5 6
*** background
i always use inline footnotes.  i always prefer them to
allow multiple paragraphs the way old org did and have a
filter to support that.  they do not work either.  i
converted to non-inline footnotes for this example.


-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

Ramsay's disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



[O] Inconsistency between org-store-link-functions and org-store-link

2015-11-06 Thread Aaron Ecay
Hello all,

The docstring of org-store-link-functions says: “Each function will be
called in turn until one returns a non-nil value.”  However, the code of
org-store-link actually calls all the functions, and if more than one
returns a non-nil value raises a prompt asking the user to choose (and
then calls that function a second time).

Should we change the code to match the doc, or vice versa?

Aaron

PS I vote for keeping the semantics described in the doc, because the
current implementation’s double calling of the selected function
means that store-link functions that have side effects will behave
unpredictably.  Imagine a store-link function for image buffers that
uploads the buffer to imgur or a similar hosting site, and stores the
http url of the uploaded file.  The current implementation would
upload the image twice.

-- 
Aaron Ecay



[O] [RFC] [PATCH] allow bind keywords to set safe values

2015-11-06 Thread Aaron Ecay
Hello all,

BIND keywords should be used for controlling export, rather than the
usual emacs method of setting file local variables
.  But,
BIND keywords are currently disabled by default.  We can’t turn these on
by default, as maliciously crafted documents could do nasty things to a
user’s emacs.  The attached patch permits many interesting usages of
BIND keywords by allowing them to set variables by default, as long as
the value thus set is safe (as implemented by emacs’s default file local
variable code).

Comments welcome.

Thanks,

-- 
Aaron Ecay
>From a0650372cafa6debf1465624c2cc23dd01aa7083 Mon Sep 17 00:00:00 2001
From: Aaron Ecay 
Date: Fri, 6 Nov 2015 17:51:09 +
Subject: [PATCH] Allow bind keywords to set safe values

* lisp/ox.el (org-export-allow-bind-keywords): Add new `safe' value.
(org-export--list-bound-variables): Use it.
* doc/org.texi (Export settings): Update doc.
---
 doc/org.texi | 18 +++---
 lisp/ox.el   | 20 
 2 files changed, 31 insertions(+), 7 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index c57cc41..6abf5ad 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -10708,6 +10708,7 @@ properties (@pxref{Properties and columns}).  Options set at a specific level
 override options set at a more general level.
 
 @cindex #+SETUPFILE
+@anchor{SETUPFILE}
 In-buffer settings may appear anywhere in the file, either directly or
 indirectly through a file included using @samp{#+SETUPFILE: filename} syntax.
 Option keyword sets tailored to a particular back-end can be inserted from
@@ -10948,9 +10949,20 @@ properties.
 @cindex #+BIND
 @vindex org-export-allow-bind-keywords
 If @code{org-export-allow-bind-keywords} is non-@code{nil}, Emacs variables
-can become buffer-local during export by using the BIND keyword.  Its syntax
-is @samp{#+BIND: variable value}.  This is particularly useful for in-buffer
-settings that cannot be changed using specific keywords.
+can become buffer-local during export by using the BIND keyword.  Setting the
+variable to @code{t} allows variables to take on all values.  Setting it to
+the symbol @code{safe} (the default) only allows safe values.  (@pxref{Safe
+File Variables,,,emacs,The Emacs Manual}) The syntax of a BIND keyword is
+@samp{#+BIND: variable value}.  The text of @samp{value} will be passed to
+the elisp @code{read} function.@footnote{This means that strings should be
+surrounded with double quotes, but symbols and lists will be read literally
+and need not be quoted for lisp with a single quote.}  The BIND keyword is
+particularly useful for in-buffer settings that cannot be changed using
+specific keywords.@footnote{You should not use the usual emacs local variable
+convention (@pxref{Specifying File Variables,,,emacs,The Emacs Manual}),
+because these notations could be lost during the export process.}  It is also
+useful for collecting common variable settings in a setup file shared between
+several documents (@pxref{SETUPFILE}).
 
 @cindex property, EXPORT_FILE_NAME
 The name of the output file to be generated is taken from the file associated
diff --git a/lisp/ox.el b/lisp/ox.el
index eb1af9b..e257c1f 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -832,14 +832,22 @@ can also be set with the OPTIONS keyword, e.g.  \"todo:nil\"."
   :group 'org-export-general
   :type 'boolean)
 
-(defcustom org-export-allow-bind-keywords nil
+(defcustom org-export-allow-bind-keywords 'safe
   "Non-nil means BIND keywords can define local variable values.
 This is a potential security risk, which is why the default value
-is nil.  You can also allow them through local buffer variables."
+is nil.  You can also allow them through local buffer variables.
+
+See the documentation for `safe-local-variable-p' and the
+node (info \"(emacs) Safe File Variables\") for information on
+the safety setting."
   :group 'org-export-general
   :version "24.4"
   :package-version '(Org . "8.0")
-  :type 'boolean)
+  :type '(choice
+	  (const :tag "Never" nil)
+	  (const :tag "Only if safe" safe)
+	  (const :tag "Always" t))
+  :safe (lambda (x) (memq x '(nil safe
 
 (defcustom org-export-with-broken-links nil
   "Non-nil means do not raise an error on broken links.
@@ -1646,7 +1654,11 @@ an alist where associations are (VARIABLE-NAME VALUE)."
 			 (let ((val (org-element-property :value element)))
 			   (if (equal (org-element-property :key element)
   "BIND")
-			   (push (read (format "(%s)" val)) alist)
+			   (let* ((pair (read (format "(%s)" val
+ (when (or (eq org-export-allow-bind-keywords t)
+	   (safe-local-variable-p
+	(nth 0 pair) (nth 1 pair)))
+   (push pair alist)))
 			 ;; Enter setup file.
 			 (let ((file (expand-file-name
 	  (org-remove-double-quotes val
-- 
2.6.2



Re: [O] contributing to work on citations

2015-11-06 Thread Matt Price
On Fri, Nov 6, 2015 at 8:10 AM, Aaron Ecay  wrote:

> Hi Matt,
>
> 2015ko azaroak 6an, Matt Price-ek idatzi zuen:
>
> > Hey, Aaron,
> > Am I right that I need to check out your wip-cite-awe branch from ~8
> months
> > ago?
>
> Richard Lawrence forked that branch, and made some changes on top of it,
> so you should probably start with his branch.  His changes aren’t in the
> org-mode repo but rather github: 
> (That should be a url suitable for git clone or git remote add; the branch
> with his work in it is called wip-cite-org-citeproc and not master).
>
> > Would it make sense to try to merge recent changes on master into that
> > branch first?
>
> That’s a good first step.  Hopefully any conflicts will be minor, but
> don’t hesitate to shout for help if there are problems!
>
> OK, I tried rebasing on current master, is online here & pull request has
been sent ot richard:

https://github.com/titaniumbones/org-mode



> >
> > Anyway, I figure I will try to modify zotxt-emacs so it provides these
> > functions and generates conformant cite: links.
>
> NB the new citation support doesn’t use links à la org-ref, but rather a
> dedicated syntax object (maybe that’s what you meant, but calling the
> new citations “links” is not technically correct).
>
> Right. Of course. Thank you! I'll try to get started on this in the next
few days.

m


Re: [O] Resolving links breaks workflow using org-narrow-to-subtree

2015-11-06 Thread Andreas Hock
Hi,

> 2015ko azaroak 5an, Nicolas Goaziou-ek idatzi zuen:
> > Actually, it is, as notified in
> > .
> 
> Excellent news!  I missed the announcement.  Sorry for the confusion.

thanks a lot - that's great news for me.

And thank you for all the hard work you're putting into Org-Mode!

Andreas Hock



Re: [O] Conditional link export?

2015-11-06 Thread John Kitchin
I would redefine the info link, and write new export functions for each
backend. You will need to parse the link path for html to construct that
url, but it looks easy to do. I assume # splits the info link into
pieces that are useful?

Alternatively, write a filter for links that only does that for links of
info type.

or you could directly modify org-link-protocols, e.g.

#+BEGIN_SRC emacs-lisp
(setf (elt  (assoc "info" org-link-protocols) 2)
  (lambda (keyword desc format)
(cond
 ((eq format 'html)
  (format
   "https://www.gnu.org/software/emacs/manual/html_node/%s/%s.html\";>%s"
   (car (s-split "#" keyword))
   (car (last (s-split "#" keyword)))
   keyword)
#+END_SRC

This seems to make the info link into something like what you want. This
way you keep the simple link syntax in org, and get what you want in
other formats.

Oleh Krehel writes:

> Hi all,
>
> I'm writing a manual in Org-mode, with the intent to export both to
> Texinfo and HTML. And I'd like to use this link for Texinfo:
>
> info:emacs#Packages
>
> and this link for HTML:
>
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html
>
> They both link to the same information, but in different browsers
> basically. How could this be done? I'm thinking of something like:
>
> #ifdef TEXINFO
> [[info:emacs#Packages]]
> #else
> [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html]]
> #endif
>
> Oleh

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Conditional link export?

2015-11-06 Thread Aaron Ecay
Hi again,

2015ko azaroak 6an, Aaron Ecay-ek idatzi zuen:
> 
> Hi Oleh,
> 
> One approach would be to use a parse-tree filter to change one kind of
> link into another.  Something like the following (not tested):
> 
> ,
> | (defun awe/change-info-links (tree backend _info)
> |   (org-element-map tree 'link
> | (lambda (link)
> |   (when (org-export-derived-backend-p backend 'html)

add (equal (org-element-property :type link) "info") to the condition of
the when.

derp derp derp,

-- 
Aaron Ecay



Re: [O] Conditional link export?

2015-11-06 Thread Aaron Ecay
Hi Oleh,

One approach would be to use a parse-tree filter to change one kind of
link into another.  Something like the following (not tested):

,
| (defun awe/change-info-links (tree backend _info)
|   (org-element-map tree 'link
| (lambda (link)
|   (when (org-export-derived-backend-p backend 'html)
| (let* ((target (org-element-property :path link))
|(parts (split-string target "#")))
|   (org-element-put-property link :type "https")
|   (org-element-put-property
|link :path
|(format
| "//www.gnu.org/software/emacs/manual/html_node/%s/%s.html"
| (nth 0 parts)
| (nth 1 parts)))
|   tree)
| (add-to-list 'org-export-filter-parse-tree-functions #'awe/change-info-links)
`

This finds info links in the buffer, and converts them to http ones for
html export.

Exercises for the reader:
- Handle the case of info links with no “#”
- Link to manuals as http links in the document, and convert only the
  relevant http links to info links for info export.

Hope this helps,

-- 
Aaron Ecay



Re: [O] export to beamer

2015-11-06 Thread Kaushal Modi
There were a lot of changes in this area in org-mode version 8.0. I believe
you updated from an older version 8.x version.

Here's info on the 8.0 upgrade: http://orgmode.org/worg/org-8.0.html

There are many backward incompatible changes in that version. So you should
read the above in full, especially if you are also using ox-latex and
ox-html.

The answer to your ox-beamer question is in the "Upgrading your setup"
section; you now need to explicitly require ox-beamer using one of the two
methods described there.
On Nov 6, 2015 12:51 AM, "童俊翔"  wrote:

I want to export org to beamer. It worked well previously when I press C-c
C-e l O. But in recent days, when I press C-c C-e l, the options for beamer
are missing. I can only export to pdf, not beamer.

What’s the problem, and what can I do?

Thanks a lot!


Re: [O] contributing to work on citations

2015-11-06 Thread Aaron Ecay
Hi Matt,

2015ko azaroak 6an, Matt Price-ek idatzi zuen:

> Hey, Aaron,
> Am I right that I need to check out your wip-cite-awe branch from ~8 months
> ago? 

Richard Lawrence forked that branch, and made some changes on top of it,
so you should probably start with his branch.  His changes aren’t in the
org-mode repo but rather github: 
(That should be a url suitable for git clone or git remote add; the branch
with his work in it is called wip-cite-org-citeproc and not master).

> Would it make sense to try to merge recent changes on master into that
> branch first?

That’s a good first step.  Hopefully any conflicts will be minor, but
don’t hesitate to shout for help if there are problems!

> 
> Anyway, I figure I will try to modify zotxt-emacs so it provides these
> functions and generates conformant cite: links.

NB the new citation support doesn’t use links à la org-ref, but rather a
dedicated syntax object (maybe that’s what you meant, but calling the
new citations “links” is not technically correct).

> That seems the easiest solution, and maybe Erik will give me some help
> once I've made some initial progress.  Meanwhile I will try to learn
> enough about javascript to get started on the citeproc-js ocmmand-line
> tool.  thx, matt

Thanks,

-- 
Aaron Ecay



[O] Conditional link export?

2015-11-06 Thread Oleh Krehel

Hi all,

I'm writing a manual in Org-mode, with the intent to export both to
Texinfo and HTML. And I'd like to use this link for Texinfo:

info:emacs#Packages

and this link for HTML:

https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html

They both link to the same information, but in different browsers
basically. How could this be done? I'm thinking of something like:

#ifdef TEXINFO
[[info:emacs#Packages]]
#else
[[https://www.gnu.org/software/emacs/manual/html_node/emacs/Packages.html]]
#endif

Oleh



Re: [O] Org and Citations / References / Bibliography

2015-11-06 Thread Rainer M Krug
John Kitchin  writes:

> Rainer M Krug writes:
>
>> It does now. I went through the setup process slowly again using the
>> README.org and the org-ref.org in
>> [[https://github.com/jkitchin/org-ref]] as guidelines and it worked.
>>
>> But I could not install any of the "useful libraries", as none of them
>> seems to be on melpa et al?
>
> These should all be in the org-ref distribution, so if you have that in
> your load-path it should work, or add something like   :load-path
> "~/.emacs.d/org-ref" to the optional libaries too.


OK - I had to install key-chord as it is a dependency from jmax-bibtex.
Thanks.

>
> Thanks for sharing your setup. I have not used use-package much, but
> yours looks pretty clean!

Pleasure - that is the reason I started migrating to use-package - its
clean structure and the ability to disable packages by simply adding

,
| :disalbled t
`

and to install via the package manager by adding

,
| :ensure t
`

I am still struggling with larger configurations (like org-mode and ESS, which
have different sections in my emacs.org), but I am getting there.

Cheers,

Rainer

PS: I started using your link for TODO
[[http://kitchingroup.cheme.cmu.edu/blog/2015/04/24/Commenting-in-org-files/]]
and export to todonotes in LaTeX - very nice! 

>
>>
>> Thanks a lot - and org-ref looks really great.
>>
>> Cheers,
>>
>> Rainer
>>
>>
>> P.S.:
>>
>> Just for reference: I now have the following in my emacs.org file:
>>
>> *** org-ref
>> See [[https://www.youtube.com/watch?v=JyvpSVl4_dg][org-ref video]] and 
>> [[https://github.com/jkitchin/jmax/blob/master/org-ref.org][org-rel github 
>> site]] for further details (John Kitchin)
>> #+begin_src emacs-lisp
>> (use-package ebib
>>   :ensure t
>>   )
>> (use-package dash
>>   :ensure t
>>   )
>> (use-package s
>>   :ensure t
>>   )
>> (use-package f
>>   :ensure t
>>   )
>> (use-package hydra
>>   :ensure t
>>   )
>> (use-package org-ref
>>   :ensure f
>>   :load-path "~/.emacs.d/org-ref"
>>   :config
>>   ;; README.org in org-ref repo for the why
>>   (setq reftex-default-bibliography 
>> '("~/Documents/Mendeley/bibliography.bib"))
>>   ;;
>>   ;; see org-ref for use of these variables
>>   (setq org-ref-bibliography-notes "~/Documents/Mendeley/notes.org"
>> org-ref-default-bibliography 
>> '("~/Documents/Mendeley/bibliography.bib")
>> org-ref-pdf-directory "~/iCloud/Mendeley/")
>>   ;;
>>   (setq helm-bibtex-bibliography "~/.emacs.d/org-ref/test.bib")
>>   (setq helm-bibtex-library-path "~/Dropbox/bibliography/bibtex-pdfs")
>>   ;;
>>   ;; open pdf with system pdf viewer (works on mac)
>>   (setq helm-bibtex-pdf-open-function
>> (lambda (fpath)
>>   (start-process "open" "*open*" "open" fpath)))
>>
>>   ;; :bind
>>   ;; You may want to set some convenient keys for working in your bibtex 
>> file:
>>   ;; ("f10" . org-ref-open-bibtex-notes)
>>   ;; ("f11" . org-ref-open-bibtex-pdf)
>>   ;; ("f12" . org-ref-open-in-browser)
>>   )
>> ;; optional but very useful libraries in org-ref
>> (use-package doi-utils
>>   :disabled t
>>   :ensure t
>>   )
>> (use-package jmax-bibtex
>>   :disabled t
>>   :ensure t
>>   )
>> (use-package pubmed
>>   :disabled t
>>   :ensure t
>>   )
>> (use-package arxiv
>>   :disabled t
>>   :ensure t
>>   )
>> (use-package sci-id
>>   :disabled t
>>   :ensure t
>>   )
>> #+end_src
>>
>>>
>>> Rainer M Krug writes:
>>>
 Hi

 I have been following the whole discussion about the implementation of a
 good citation system in org, which is really necessary.

 At the moment I am again at that point where I would like to include
 citations in a document and I don't get any citation system to work -
 neither org-ref[1] nor org's org-reftex-citation nor reftex
 citation. None of these find anything in a .bib file, I have no overview
 where I have to specify the bib file and I am frustrated, because it
 worked some months ago.

 I would very much like to use org-ref, but I don't even get the supplied
 examples to work, i.e. find something from the .bib file.

 Any suggestions what I can do, any simple / minimalistic init.el file
 which I can merge into my config?

 Thanks,

 Rainer


 Footnotes:
 [1]  
 http://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citations-and-references/
>>>
>>> --
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> http://kitchingroup.cheme.cmu.edu
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu

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

Centre of Excellence for Invasion Biology
Stellenbosch Unive

Re: [O] Org and Citations / References / Bibliography

2015-11-06 Thread John Kitchin

Rainer M Krug writes:

> It does now. I went through the setup process slowly again using the
> README.org and the org-ref.org in
> [[https://github.com/jkitchin/org-ref]] as guidelines and it worked.
>
> But I could not install any of the "useful libraries", as none of them
> seems to be on melpa et al?

These should all be in the org-ref distribution, so if you have that in
your load-path it should work, or add something like   :load-path
"~/.emacs.d/org-ref" to the optional libaries too.

Thanks for sharing your setup. I have not used use-package much, but
yours looks pretty clean!

>
> Thanks a lot - and org-ref looks really great.
>
> Cheers,
>
> Rainer
>
>
> P.S.:
>
> Just for reference: I now have the following in my emacs.org file:
>
> *** org-ref
> See [[https://www.youtube.com/watch?v=JyvpSVl4_dg][org-ref video]] and 
> [[https://github.com/jkitchin/jmax/blob/master/org-ref.org][org-rel github 
> site]] for further details (John Kitchin)
> #+begin_src emacs-lisp
> (use-package ebib
>   :ensure t
>   )
> (use-package dash
>   :ensure t
>   )
> (use-package s
>   :ensure t
>   )
> (use-package f
>   :ensure t
>   )
> (use-package hydra
>   :ensure t
>   )
> (use-package org-ref
>   :ensure f
>   :load-path "~/.emacs.d/org-ref"
>   :config
>   ;; README.org in org-ref repo for the why
>   (setq reftex-default-bibliography 
> '("~/Documents/Mendeley/bibliography.bib"))
>   ;;
>   ;; see org-ref for use of these variables
>   (setq org-ref-bibliography-notes "~/Documents/Mendeley/notes.org"
> org-ref-default-bibliography 
> '("~/Documents/Mendeley/bibliography.bib")
> org-ref-pdf-directory "~/iCloud/Mendeley/")
>   ;;
>   (setq helm-bibtex-bibliography "~/.emacs.d/org-ref/test.bib")
>   (setq helm-bibtex-library-path "~/Dropbox/bibliography/bibtex-pdfs")
>   ;;
>   ;; open pdf with system pdf viewer (works on mac)
>   (setq helm-bibtex-pdf-open-function
> (lambda (fpath)
>   (start-process "open" "*open*" "open" fpath)))
>
>   ;; :bind
>   ;; You may want to set some convenient keys for working in your bibtex file:
>   ;; ("f10" . org-ref-open-bibtex-notes)
>   ;; ("f11" . org-ref-open-bibtex-pdf)
>   ;; ("f12" . org-ref-open-in-browser)
>   )
> ;; optional but very useful libraries in org-ref
> (use-package doi-utils
>   :disabled t
>   :ensure t
>   )
> (use-package jmax-bibtex
>   :disabled t
>   :ensure t
>   )
> (use-package pubmed
>   :disabled t
>   :ensure t
>   )
> (use-package arxiv
>   :disabled t
>   :ensure t
>   )
> (use-package sci-id
>   :disabled t
>   :ensure t
>   )
> #+end_src
>
>>
>> Rainer M Krug writes:
>>
>>> Hi
>>>
>>> I have been following the whole discussion about the implementation of a
>>> good citation system in org, which is really necessary.
>>>
>>> At the moment I am again at that point where I would like to include
>>> citations in a document and I don't get any citation system to work -
>>> neither org-ref[1] nor org's org-reftex-citation nor reftex
>>> citation. None of these find anything in a .bib file, I have no overview
>>> where I have to specify the bib file and I am frustrated, because it
>>> worked some months ago.
>>>
>>> I would very much like to use org-ref, but I don't even get the supplied
>>> examples to work, i.e. find something from the .bib file.
>>>
>>> Any suggestions what I can do, any simple / minimalistic init.el file
>>> which I can merge into my config?
>>>
>>> Thanks,
>>>
>>> Rainer
>>>
>>>
>>> Footnotes:
>>> [1]  
>>> http://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citations-and-references/
>>
>> --
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> http://kitchingroup.cheme.cmu.edu

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Org and Citations / References / Bibliography

2015-11-06 Thread Rainer M Krug
John Kitchin  writes:

> Can you send me a minimal org and bib file you are using that doesn't
> work, and how you have it set up?
>
> Does helm-bibtex work for you?
>
> We use org-ref on a daily basis, so it should work.

It does now. I went through the setup process slowly again using the
README.org and the org-ref.org in
[[https://github.com/jkitchin/org-ref]] as guidelines and it worked.

But I could not install any of the "useful libraries", as none of them
seems to be on melpa et al?

Thanks a lot - and org-ref looks really great.

Cheers,

Rainer


P.S.:

Just for reference: I now have the following in my emacs.org file:

*** org-ref
See [[https://www.youtube.com/watch?v=JyvpSVl4_dg][org-ref video]] and 
[[https://github.com/jkitchin/jmax/blob/master/org-ref.org][org-rel github 
site]] for further details (John Kitchin)
#+begin_src emacs-lisp
(use-package ebib
  :ensure t
  )
(use-package dash
  :ensure t
  )
(use-package s
  :ensure t
  )
(use-package f
  :ensure t
  )
(use-package hydra
  :ensure t
  )
(use-package org-ref
  :ensure f
  :load-path "~/.emacs.d/org-ref"
  :config
  ;; README.org in org-ref repo for the why
  (setq reftex-default-bibliography '("~/Documents/Mendeley/bibliography.bib"))
  ;;
  ;; see org-ref for use of these variables
  (setq org-ref-bibliography-notes "~/Documents/Mendeley/notes.org"
org-ref-default-bibliography '("~/Documents/Mendeley/bibliography.bib")
org-ref-pdf-directory "~/iCloud/Mendeley/")
  ;;
  (setq helm-bibtex-bibliography "~/.emacs.d/org-ref/test.bib")
  (setq helm-bibtex-library-path "~/Dropbox/bibliography/bibtex-pdfs")
  ;;
  ;; open pdf with system pdf viewer (works on mac)
  (setq helm-bibtex-pdf-open-function
(lambda (fpath)
  (start-process "open" "*open*" "open" fpath)))
  
  ;; :bind
  ;; You may want to set some convenient keys for working in your bibtex file:
  ;; ("f10" . org-ref-open-bibtex-notes)
  ;; ("f11" . org-ref-open-bibtex-pdf)
  ;; ("f12" . org-ref-open-in-browser)
  )
;; optional but very useful libraries in org-ref
(use-package doi-utils
  :disabled t
  :ensure t
  )
(use-package jmax-bibtex
  :disabled t
  :ensure t
  )
(use-package pubmed
  :disabled t
  :ensure t
  )
(use-package arxiv
  :disabled t
  :ensure t
  )
(use-package sci-id
  :disabled t
  :ensure t
  )
#+end_src

>
> Rainer M Krug writes:
>
>> Hi
>>
>> I have been following the whole discussion about the implementation of a
>> good citation system in org, which is really necessary.
>>
>> At the moment I am again at that point where I would like to include
>> citations in a document and I don't get any citation system to work -
>> neither org-ref[1] nor org's org-reftex-citation nor reftex
>> citation. None of these find anything in a .bib file, I have no overview
>> where I have to specify the bib file and I am frustrated, because it
>> worked some months ago.
>>
>> I would very much like to use org-ref, but I don't even get the supplied
>> examples to work, i.e. find something from the .bib file.
>>
>> Any suggestions what I can do, any simple / minimalistic init.el file
>> which I can merge into my config?
>>
>> Thanks,
>>
>> Rainer
>>
>>
>> Footnotes:
>> [1]  
>> http://kitchingroup.cheme.cmu.edu/blog/2014/05/13/Using-org-ref-for-citations-and-references/
>
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu

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