Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Nicolas Goaziou
Hello,

Frederick Giasson  writes:

>> Could you recreate the commit so it is self-contained?
>
> That should be it.

Thank you. I applied your patch with the following changes:

  - I wrote a proper (according to our usage) commit message;

  - I slightly refactored the code;

  - I required an expected value for :show-process, much like other head
arguments. So a bare ":show-process" means ":show-process nil" and,
therefore, doesn't show process. Use ":show-process t" instead.

BTW, could you document the new feature in
?

Regards,

-- 
Nicolas Goaziou



Re: [O] Release 9.0 test failed: test-ob/indented-cached-org-bracket-link

2016-11-18 Thread Nicolas Goaziou
Hello,

"Charles C. Berry"  writes:

> On Fri, 18 Nov 2016, Nicolas Goaziou wrote:
>
>> Hello,
>>
>> David Talmage  writes:
>>
>>> I built org 9.0 on my Mac today.  'make test' reported one failed test.  I
>>> don't know if it is important or not.  Please advise me.
>>>
>>> 'make test' said:
>>>
>>> 1 unexpected results:
>>>FAILED  test-ob/indented-cached-org-bracket-link
>>
>> Our build bot doesn't report this error and I cannot reproduce it
>> either. None of us is using a Mac, though.
>>
>
> I have a Mac and I *can* reproduce this running `make test'. But
> following the README for interactive testing, the test succeeds:
>
> Selector: test-ob/indented-cached-org-bracket-link
> Passed:  1
> Failed:  0
> Skipped: 0
> Total:   1/1
>
> I do not know what further steps to take to debug this.

You can mimic the test:
- create a new file in `temporary-file-directory'.
- insert 

  * Test
#+BEGIN_SRC emacs-lisp :file test.txt :cache yes
  (message "test")
#+END_SRC"

- Put point on "BEGIN"

- Call (org-babel-execute-src-block) and compare return value with
  (concat default-directory "test.text")


Another option is to modify the test so it prints some useful debugging
information before failing (e.g., contents of default-directory and
return value of (org-babel-execute-src-block)).


Regards,

-- 
Nicolas Goaziou



[O] export to single html file (like reveal_single_file:t) in regular html export

2016-11-18 Thread Xebar Saram
Hi all

i love the option in org revel (reveal_single_file:t) that allows me to
export a presentation to my students with image support embedded in the
html file./

ive searched for a way to do it in the normal org to html exporter with no
success. any clue how that can be done?

best

Z


Re: [O] org.texi edits, patch attached

2016-11-18 Thread Lambda Coder
Thanks Nicolas for pushing the 1st set of edits.

Attached I have a 2nd set of edits for the same chapter. Cleaned up
references mainly.

This patch is based off maint branch. Hope it's easier for you this time.

Best wishes,

--Lambda Coder


On Fri, Nov 18, 2016 at 12:21 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Lambda Coder  writes:
>
> > Do you prefer future edits against master or maint branch? It was not
> clear
> > when I asked the very first time.
>
> Documentation fixes usually go to maint, unless they refer to
> a master-only feature, obviously.
>
> Regards,
>
> --
> Nicolas Goaziou
>


0001-Working-with-source-code-2nd-revision.patch.gz
Description: GNU Zip compressed data


Re: [O] force italic mode?

2016-11-18 Thread William Henney
On Fri, Nov 18, 2016 at 12:31 PM, hymie! 
wrote:

> In our last episode, the evil Dr. Lacto had captured our hero,
>   Aaron Ecay , who said:
> > You can accomplish this by using an entity that expands to nothing.  The
> > closest entry in org-entities is \zwj (zero width word-joining space):
> >
> > foo\zwj{}/bar/\zwj{}baz
>
> This doesn't work for me. :(
>
> It works to the left of the zwj, such as
> =foo=\zwj{}bar
>
> ...but not to the right as you did above.
>
> It's hard to read the value I have for org-emphasis-regexp-components
> but it looks like } is in there, so I guess it should be working?
>
>
No, it is only in the POSTMATCH part. If you add it to the PREMATCH part
too, then your example would work.  But I think it would be neater to put a
pair of literal "zero width space" characters in your file.  I managed to
get this to work by doing:

(setq org-emphasis-regexp-components '("[:space:][:cntrl:]('\"{}"
"[:space:][:cntrl:]-.,:!?;'\")}\\[" "[:space:][:cntrl:]" "." 1))

This means you can write "fuzzy​/wuzzy/​wuzzabear" where there is a 0x200B
character (ZERO WIDTH SPACE) either side of /wuzzy/ (hopefully this will
survive in the email).  I inserted the characters with "C-x 8 RET ...".

In case you prefer to have something more visible in the source file, I
also made it so you can use any ascii control character to bracket the
delimiters.  For instance, the NULL character: "fuzzy^@/wuzzy/^@bear".
Note that those are not real NULLs, but are how they appear in the emacs
buffer.  You can insert them with "C-q 0 RET".


Will








> --hymie!http://lactose.homelinux.net/~hymie
> hy...@lactose.homelinux.net
>
>
>


-- 

  Dr William Henney, Instituto de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


Re: [O] Inheritance of tangle file for org babel blocks is broken in org 9

2016-11-18 Thread William Henney
On Fri, Nov 18, 2016 at 3:31 PM, Charles C. Berry  wrote:

> On Fri, 18 Nov 2016, William Henney wrote:
>
> Hi,
>>
>> Since upgrading to version 9.0, tangling of babel source blocks no longer
>> works properly for me.
>>
>
> It works for me with Org mode version 9.0.1 (release_9.0.1-31-g0a24f5).
>
> Running your ECM, the `tail' of C-c C-v C-i:
>
> :tangle test-B.el
>
> Maybe try restarting emacs to be sure 9.0.1 loads cleanly?
>
>
Thanks Chuck - that worked!   Weird, since I was sure I had already
restarted emacs once after updating.  But restarting again seems to have
fixed things.

Will

-- 

  Dr William Henney, Instituto de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


Re: [O] ical export issues

2016-11-18 Thread Nicolas Goaziou
Hello,

Stephen Eglen  writes:

> p.s. a small issue, but when I passed the org-generated .ics file
> through a validator, http://severinghaus.org/projects/icv/ it noted
> that:
>
>   Your calendar is using an invalid newline format. Make sure to use
>   \r\n to end lines rather than just \n (RFC 2445 §4.1).

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] Inheritance of tangle file for org babel blocks is broken in org 9

2016-11-18 Thread Charles C. Berry

On Fri, 18 Nov 2016, William Henney wrote:


Hi,

Since upgrading to version 9.0, tangling of babel source blocks no longer
works properly for me.


It works for me with Org mode version 9.0.1 (release_9.0.1-31-g0a24f5).

Running your ECM, the `tail' of C-c C-v C-i:

:tangle test-B.el

Maybe try restarting emacs to be sure 9.0.1 loads cleanly?

HTH,

Chuck



[O] Inheritance of tangle file for org babel blocks is broken in org 9

2016-11-18 Thread William Henney
Hi,

Since upgrading to version 9.0, tangling of babel source blocks no longer
works properly for me.  Specifically, the tangle file name is not inherited
from settings in a property drawer higher up the sub-tree, so that "C-u C-u
C-c C-v C-t" no longer behaves as it should.  This worked fine in version 8
and I can't find any mention of any deliberate change in the manual or the
change log.

Here is a minimal example that explains what goes wrong.

Cheers

Will


* Test of inheritance of tangle file name
** Pieces to tangle to test-A.el
:PROPERTIES:
:header-args: :tangle test-A.el
:END:

*** Piece A1
#+BEGIN_SRC emacs-lisp
;; code-block from first sub-head of A
#+END_SRC

*** Piece A2
#+BEGIN_SRC emacs-lisp
;; code-block from second sub-head of A
#+END_SRC

** Pieces to tangle to test-B.el
:PROPERTIES:
:header-args: :tangle test-B.el
:END:

+ This does not work any more in org 9
+ The pieces are tangled to =test-A.el= instead of =test-B.el=

*** Piece B1
#+BEGIN_SRC emacs-lisp
;; code-block from first sub-head of B
#+END_SRC

*** Piece B2
#+BEGIN_SRC emacs-lisp
;; code-block from second sub-head of B
#+END_SRC

** Results of inspecting babel info in source block B1
+ =C-c C-v TAB= invokes =(org-babel-view-src-block-info)=

*** In Org 8
+ src_elisp{(org-version)} =8.2.10=
+ This looks fine

#+BEGIN_EXAMPLE
Lang: emacs-lisp
Header Arguments:
:cache no
:colnames no
:exports code
:hlines yes
:noweb no
:results replace
:session none
:tangle test-B.el
#+END_EXAMPLE

*** In Org 9
+ src_elisp{(org-version)} {{{results(=9.0.1=)}}}
+ This looks contradictory
  + The "Properties" section has ":header-args :tangle test-B.el", which is
correct
  + But the "Header Arguments" has ":tangle test-A.el", which is wrong

#+BEGIN_EXAMPLE
Lang: emacs-lisp
Properties:
:header-args :tangle test-B.el
:header-args:emacs-lisp nil
Header Arguments:
:cache no
:exports code
:hlines no
:lexical no
:noweb no
:results replace
:session none
:tangle test-A.el
#+END_EXAMPLE


-- 

  Dr William Henney, Instituto de Radioastronomía y Astrofísica,
  Universidad Nacional Autónoma de México, Campus Morelia


Re: [O] How to find out in Elisp which .bib file is used for the current org buffer?

2016-11-18 Thread John Kitchin
It depends on how you put citations in I guess. If you use org-ref, then
there is a bibliography link or a latex_header with addbibresource.
Otherwise, it is one of the files defined in
org-ref-default-bibliography.

I am not sure about the ox-bibtex setup.

Joost Kremers writes:

> Hi all,
>
> If you're writing a scientific document in Org, you'll normally 
> have a .bib file that you use for your references. What I'd like 
> to know is: is there a (robust) way to find out if a specific Org 
> buffer has a .bib file associated with it?
>
> In a LaTeX file, you can usually find this out by looking for a 
> \bibliography command or, if you use biblatex, for 
> \addbibresource. I'm wondering what the canonical way is to 
> specify this for an Org file.
>
> TIA
>
> Joost


-- 
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] Release 9.0 test failed: test-ob/indented-cached-org-bracket-link

2016-11-18 Thread Charles C. Berry

On Fri, 18 Nov 2016, Nicolas Goaziou wrote:


Hello,

David Talmage  writes:


I built org 9.0 on my Mac today.  'make test' reported one failed test.  I
don't know if it is important or not.  Please advise me.

'make test' said:

1 unexpected results:
   FAILED  test-ob/indented-cached-org-bracket-link


Our build bot doesn't report this error and I cannot reproduce it
either. None of us is using a Mac, though.



I have a Mac and I *can* reproduce this running `make test'. But following 
the README for interactive testing, the test succeeds:


Selector: test-ob/indented-cached-org-bracket-link
Passed:  1
Failed:  0
Skipped: 0
Total:   1/1

I do not know what further steps to take to debug this.

??

Chuck



Re: [O] org table clean up command

2016-11-18 Thread Jude DaShiell
I ran another check, and there is serious reason to like and use org-mode! 
org-mode did to the automatic clean up on that column when I saved the org 
table file with emacs.  I find this to be very helpful.



--




[O] org table clean up command

2016-11-18 Thread Jude DaShiell
I wrote a table in org-mode and a certain column in that table should have 
all content entries starting in character position 32.  I ran cut on the 
table and sent output to another file in order to inspect my work and 
found at least one line of the table for that column had content starting 
in column 28.  I opened the file again in org-mode and located the row and 
column and checked the content start position and that showed as being in 
column 32.  So this brings up two questions.
1) When I saved that org file after checking it and found content output 
starting in column 32 rather than in character position 28, did org-mode 
clean up the table for me?
2) If org-mode did not clean up the table, does a command exist I can use 
to cause such a clean up to happen?



--




Re: [O] force italic mode?

2016-11-18 Thread hymie!
In our last episode, the evil Dr. Lacto had captured our hero,
  Aaron Ecay , who said:
> You can accomplish this by using an entity that expands to nothing.  The
> closest entry in org-entities is \zwj (zero width word-joining space):
>
> foo\zwj{}/bar/\zwj{}baz

This doesn't work for me. :(

It works to the left of the zwj, such as
=foo=\zwj{}bar

...but not to the right as you did above.

It's hard to read the value I have for org-emphasis-regexp-components
but it looks like } is in there, so I guess it should be working?

--hymie!http://lactose.homelinux.net/~hymiehy...@lactose.homelinux.net




Re: [O] force italic mode?

2016-11-18 Thread Eric Abrahamsen
Aaron Ecay  writes:

> Hi Eric, hi all,
>
> 2016ko azaroak 17an, Eric Abrahamsen-ek idatzi zuen:
>> 
>> John Kitchin  writes:
>> 
>>> No what Hymie wants is part of the middle of that word italicizes I
>>> think. 
>> 
>> Oh, sorry! Don't know how I missed that. Well, still, same solution:
>> 
>> fuzzy@@html:@@wuzzy@@html:@@wuzzabear
>> 
>> So far as I know there's no way to do that *outside* of an
>> export-specific snippet, but I would love to be proved wrong.
>
> You can accomplish this by using an entity that expands to nothing.  The
> closest entry in org-entities is \zwj (zero width word-joining space):
>
> foo\zwj{}/bar/\zwj{}baz
>
> I have an entry like the following defined in org-entities-user for this
> purpose:
>
> ("nothing" "" nil "" "" "" "")
>
> It might be worth considering adding to org-entities, but I’ve never
> proposed it as it looks like an ugly hack to me.

Huh... but with the \zwj{} trick the /bar/ still isn't recognized as
italic -- I think that was the OP's main hope. 




Re: [O] Trouble with logbook drawers

2016-11-18 Thread Michael Welle
Hello,

Nicolas Goaziou  writes:

> Hello,
>
> Michael Welle  writes:
>
>> I have a few repeating tasks with defective logbook drawers:
>>
>>:LOGBOOK:
>>
>>:LOGBOOK:
>>
>>:END:
>>...
>>:END:
>>
>> As you can see, two drawers got nested somehow. They both hold data that
>> belongs to the task. I can't say if data is missing, but there seems to
>> be no duplication of data.
>>
>> From time to time I fix them manually, but they tend to come back after
>> some time. Any hints?
>
> No idea. An ECM would help.
that's not so easy I guess.

I found a few occurrences where that issue occurred and the order of the
log entries in the drawer was out of order, like this:

   :LOGBOOK:
   - State "DONE"   from "OPEN"   [2016-10-19 Wed 10:08]
   - State "DONE"   from "OPEN"   [2016-10-15 Sat 09:17]
   - State "OPEN"   from "OPEN"   [2016-10-15 Sat 09:16]
   - State "DONE"   from "OPEN"   [2016-10-07 Fri 12:58]
   :LOGBOOK:
   - State "OPEN"   from "OPEN"   [2016-10-19 Wed 10:07]
   - State "OPEN"   from "OPEN"   [2016-10-07 Fri 12:58]
   :END:
   - State "DONE"   from "OPEN"   [2016-09-29 Thu 10:35]
   ...
   :END:

Judging from the time stamps all tasks suffering from the issue got
defective at the some day. But most of the time the order of the entries
is still correct, so I can't really say if the issue happened at a
certain point in time or gradually.


> Also, what Org version are you using? What
The git version from october. But I observed that issue with earlier
versions as well. I've upgraded from git now, let's see what happens.


> is the value of `org-log-into-drawer'?
It's set to t.

Regards
hmw



Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Frederick Giasson

Hi Nicolas,


Could you recreate the commit so it is self-contained?


That should be it.

Thanks,

Fred

>From e19c358f9d4cab9b22c3e4e3bf6b8f6298e61b0e Mon Sep 17 00:00:00 2001
From: Frederick Giasson 
Date: Fri, 18 Nov 2016 12:01:02 -0500
Subject: [PATCH] Multiple improvements of ob-clojure have been performed in
 this commit.

  (1) better error handling. Errors and exceptions are output in the results 
section of a org-mode document. They were silenced with the previous version.
  (2) A new header parameter has been created: ":show-process" what will output 
the underlying NREPL processing in a new window + buffer
  (3) new setting "org-babel-clojure-sync-nrepl-timeout" to specify the Cider 
nrepl timeout. 'nil' means that it will never timeout

Note that the behavior of ob-clojure *did not change* with these modications.

Only the function (org-babel-execute:clojure) has been modified.
---
 etc/ORG-NEWS   |  42 ++-
 lisp/ob-clojure.el | 117 ++---
 2 files changed, 134 insertions(+), 25 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index a360e35..5a5be53 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -23,8 +23,48 @@ into
 
 : (file (lambda () (sexp)))
 
-
 ** New features
+*** Babel
+ Org-babel-clojure, new setting 'org-babel-clojure-sync-nrepl-timeout'
+
+Creation of a new setting to specify the Cider timeout. By setting the 
=org-babel-clojure-sync-nrepl-timeout=
+setting option. The value is in seconds and if set to =nil= then no timeout 
will occur.
+
+#+BEGIN_SRC emacs-lisp
+  ; Disable Cider's timeout
+  (setq org-babel-clojure-sync-nrepl-timeout nil)
+
+  ; Set the timeout to 20 seconds
+  (setq org-babel-clojure-sync-nrepl-timeout 20)
+#+END_SRC
+
+
+ Org-babel-clojure :show-process
+A new block code header has been created for Org-babel-clojure that enables 
developers to output the process of an ongoing process into a new window/buffer.
+
+You can tell Org-babel-clojure to output the process of a running code block.
+
+To show that output you only have to specify the =:show-process= option in the 
code block's header like this:
+
+#+begin_example
+#+BEGIN_SRC clojure :results output :show-process
+  (dotimes [n 10]
+(println n ".")
+(Thread/sleep 500))
+#+END_SRC
+#+end_example
+
+If =:show-process= is specified that way, then when you will run the
+code using =C-c C-c= a new window will open in Emacs. Everything that is
+output by the REPL will immediately be added to that new window.
+
+When the processing of the code is finished, then the window and its buffer 
will be closed and the results will be reported in the
+=#+RESULTS= section. 
+
+Note that the =:results= parameter's behavior is *not* changed. If =silent= is 
specified, then no result will be displayed. If =output= is
+specified then all the output from the window will appears in the
+results section. If =value= is specified, then only the last returned
+value of the code will be displayed in the results section.
 
 *** Horizontal rules are no longer ignored in LaTeX table math mode
 
diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index 72ea77d..070e0ca 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2009-2016 Free Software Foundation, Inc.
 
-;; Author: Joel Boehland, Eric Schulte, Oleh Krehel
+;; Author: Joel Boehland, Eric Schulte, Oleh Krehel, Frederick Giasson
 ;;
 ;; Keywords: literate programming, reproducible research
 ;; Homepage: http://orgmode.org
@@ -45,6 +45,9 @@
 (declare-function cider-current-connection "ext:cider-client" ( type))
 (declare-function cider-current-session "ext:cider-client" ())
 (declare-function nrepl-dict-get "ext:nrepl-client" (dict key))
+(declare-function nrepl-dict-put "ext:nrepl-client" (dict key value))
+(declare-function nrepl--merge "ext:nrepl-client" (dict1 dict2))
+(declare-function nrepl-request:eval "ext:nrepl-client" (input callback 
connection))
 (declare-function nrepl-sync-request:eval "ext:nrepl-client"
  (input connection session  ns))
 (declare-function org-trim "org" (s  keep-lead))
@@ -56,6 +59,15 @@
 (defvar org-babel-default-header-args:clojure '())
 (defvar org-babel-header-args:clojure '((package . :any)))
 
+(defcustom org-babel-clojure-sync-nrepl-timeout 10
+  "Timeout value, in seconds, of a Clojure sync call. 
+   If the value is nil, timeout is disabled."
+  :type 'integer
+  :version "25.1"
+  :package-version '(Org . "9.0")  
+  :safe #'wholenump  
+  :group 'org-babel)
+
 (defcustom org-babel-clojure-backend
   (cond ((featurep 'cider) 'cider)
(t 'slime))
@@ -84,34 +96,91 @@
   body)))
 
 (defun org-babel-execute:clojure (body params)
-  "Execute a block of Clojure code with Babel."
+  "Execute a block of Clojure code with Babel. 
+   The underlying process performed by the code block can be output 
+   using the :show-process parameter."
   (let ((expanded 

Re: [O] Capture templates - using result from %^g twice?

2016-11-18 Thread Rainer M Krug
Aaron Ecay  writes:

> Hi Rainer,
>
> 2016ko azaroak 18an, Rainer M Krug-ek idatzi zuen:
>> 
>
>>> :SHEET: %(mapconcat #'identity (org-get-tags-at nil t) ":")
>> 
>> Thanks - this looks good to me, but the ="= causes problems and ends the
>> template early. I tried to replace =":"= with =':'= but this did =not
>> work either (invalid-read-syntax).
>> 
>> How can I get this to work?
>
> You need to escape the quotes with a single backslash.

I did it like this:

:SHEET:  %(mapconcat #'identity (org-get-tags-at nil t) \":\")

But it still does not work as, my guess, nothing is returned - the
"field" is empty

Rainer

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] Release 9.0.1

2016-11-18 Thread Bastien Guerry
Hi all,

Org 9.0.1, a bugfix release, is out.

Enjoy!

-- 
 Bastien




Re: [O] Trouble with logbook drawers

2016-11-18 Thread Nicolas Goaziou
Hello,

Michael Welle  writes:

> I have a few repeating tasks with defective logbook drawers:
>
>:LOGBOOK:
>
>:LOGBOOK:
>
>:END:
>...
>:END:
>
> As you can see, two drawers got nested somehow. They both hold data that
> belongs to the task. I can't say if data is missing, but there seems to
> be no duplication of data.
>
> From time to time I fix them manually, but they tend to come back after
> some time. Any hints?

No idea. An ECM would help. Also, what Org version are you using? What
is the value of `org-log-into-drawer'?

Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Nicolas Goaziou
Hello,

Frederick Giasson  writes:

> Hi Nicolas,
>>In end of data:
>>ob-clojure.el:180:1:Warning: the following functions are not known to be
>>defined: nrepl-request:eval, nrepl--merge, nrepl-dict-put
>>
>> Could you look into it? In particular, "nrepl--merge" looks like an
>> internal function from nrepl. Is it safe to use it?
>
> Yes, these functions are part of Cider's nrepl. Yes, they should be
> safe. Also, they are only used in a context where the code block uses
> Cider as the backend, so I guess it is right to use them in that
> context. Thoughts?

They should be declared at the beginning of "ob-clojure.el" (see
nrep-dict-get for example).

Also an internal function means its signature can change, or it can be
removed, without prior notice. If there is no "public" API for
"nrepl--merge", then so be it.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Nicolas Goaziou
Hello,

Frederick Giasson  writes:

> If I have to add it again, should I recreate the commit or simply
> submit another patch?

Could you recreate the commit so it is self-contained?

Regards,

-- 
Nicolas Goaziou



[O] How to find out in Elisp which .bib file is used for the current org buffer?

2016-11-18 Thread Joost Kremers

Hi all,

If you're writing a scientific document in Org, you'll normally 
have a .bib file that you use for your references. What I'd like 
to know is: is there a (robust) way to find out if a specific Org 
buffer has a .bib file associated with it?


In a LaTeX file, you can usually find this out by looking for a 
\bibliography command or, if you use biblatex, for 
\addbibresource. I'm wondering what the canonical way is to 
specify this for an Org file.


TIA

Joost



--
Joost Kremers
Life has its moments



Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Frederick Giasson

Hi Guys,


It looks like this warning results from a defcustom for this variable
not being included in the patch (and AFAICT it should be).


Sorry but I was confused. The documentation for this setting was 
documented in Worg, but it was not yet part of the package.


Here is the commit related to that.

Thanks,

Fred
>From e68c5611f00eb37783205352d68efb7feccae8ab Mon Sep 17 00:00:00 2001
From: Frederick Giasson 
Date: Fri, 18 Nov 2016 10:29:16 -0500
Subject: [PATCH] Adding the defcustom for the
 "org-babel-clojure-sync-nrepl-timeout" variable used to configure the nrepl
 execution timeout.

---
 lisp/ob-clojure.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/lisp/ob-clojure.el b/lisp/ob-clojure.el
index f78dd69..6dc9d90 100644
--- a/lisp/ob-clojure.el
+++ b/lisp/ob-clojure.el
@@ -56,6 +56,15 @@
 (defvar org-babel-default-header-args:clojure '())
 (defvar org-babel-header-args:clojure '((package . :any)))
 
+(defcustom org-babel-clojure-sync-nrepl-timeout 10
+  "Timeout value, in seconds, of a Clojure sync call. 
+   If the value is nil, timeout is disabled."
+  :type 'integer
+  :version "25.1"
+  :package-version '(Org . "9.0")  
+  :safe #'wholenump  
+  :group 'org-babel)
+
 (defcustom org-babel-clojure-backend
   (cond ((featurep 'cider) 'cider)
(t 'slime))
-- 
1.9.5.msysgit.0



Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Frederick Giasson

Hi Nicolas,

   In end of data:
   ob-clojure.el:180:1:Warning: the following functions are not known to be
   defined: nrepl-request:eval, nrepl--merge, nrepl-dict-put

Could you look into it? In particular, "nrepl--merge" looks like an
internal function from nrepl. Is it safe to use it?


Yes, these functions are part of Cider's nrepl. Yes, they should be 
safe. Also, they are only used in a context where the code block uses 
Cider as the backend, so I guess it is right to use them in that 
context. Thoughts?


Thanks,

Fred



Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Frederick Giasson

Hi,


It looks like this warning results from a defcustom for this variable
not being included in the patch (and AFAICT it should be).


Humm, I thought that it was already part of Org-mode 8.x (something I 
submitted a way back). Let me check that.


If I have to add it again, should I recreate the commit or simply submit 
another patch?


Thanks,

Fred



Re: [O] [PATCH] New header parameter :show-process for Org-babel-clojure

2016-11-18 Thread Aaron Ecay
Hi Nicolas, hi all,

2016ko azaroak 17an, Nicolas Goaziou-ek idatzi zuen:
> 
> Hello,
> 
> Frederick Giasson  writes:
> 
>> I am still waiting for FSF's signature. Should come in soon I guess.
> 
> I applied your patch on a local branch, but compilation issues the
> following warnings:
> 
> In toplevel form:
> ob-clojure.el:86:1:Warning: Unused lexical variable 
> `nrepl-sync-request-timeout'
> 
>   In org-babel-execute:clojure:
>   ob-clojure.el:149:34:Warning: reference to free variable
>   `org-babel-clojure-sync-nrepl-timeout'

It looks like this warning results from a defcustom for this variable
not being included in the patch (and AFAICT it should be).

-- 
Aaron Ecay



Re: [O] force italic mode?

2016-11-18 Thread Aaron Ecay
Hi Eric, hi all,

2016ko azaroak 17an, Eric Abrahamsen-ek idatzi zuen:
> 
> John Kitchin  writes:
> 
>> No what Hymie wants is part of the middle of that word italicizes I
>> think. 
> 
> Oh, sorry! Don't know how I missed that. Well, still, same solution:
> 
> fuzzy@@html:@@wuzzy@@html:@@wuzzabear
> 
> So far as I know there's no way to do that *outside* of an
> export-specific snippet, but I would love to be proved wrong.

You can accomplish this by using an entity that expands to nothing.  The
closest entry in org-entities is \zwj (zero width word-joining space):

foo\zwj{}/bar/\zwj{}baz

I have an entry like the following defined in org-entities-user for this
purpose:

("nothing" "" nil "" "" "" "")

It might be worth considering adding to org-entities, but I’ve never
proposed it as it looks like an ugly hack to me.

-- 
Aaron Ecay



Re: [O] Capture templates - using result from %^g twice?

2016-11-18 Thread Aaron Ecay
Hi Rainer,

2016ko azaroak 18an, Rainer M Krug-ek idatzi zuen:
> 

>> :SHEET: %(mapconcat #'identity (org-get-tags-at nil t) ":")
> 
> Thanks - this looks good to me, but the ="= causes problems and ends the
> template early. I tried to replace =":"= with =':'= but this did =not
> work either (invalid-read-syntax).
> 
> How can I get this to work?

You need to escape the quotes with a single backslash.

-- 
Aaron Ecay



Re: [O] Reference to images and export to PDF

2016-11-18 Thread David Pineda
2016-11-18 3:31 GMT-03:00 Eric S Fraga :

> org-latex-pdf-process


The configuration it's by default, I'm yet not modify anything


-- 
David A. Pineda Osorio
F:+56 9 82142267
Ingeniero Civil Electricista
Universidad de Chile


Re: [O] Capture templates - using result from %^g twice?

2016-11-18 Thread Rainer M Krug
Nicolas Goaziou  writes:

> Hello,
>
> Rainer M Krug  writes:
>
>> Hm - I seem to ask strange questions here. Any ideas?
>
> %\2 is not working because it is used to repeat %^{prompt} placeholders,
> not %^g or %^G, per documentation.

Ok - thanks for the clarification.

>
> You could try (untested)
>
>   :SHEET: %(mapconcat #'identity (org-get-tags-at nil t) ":")

Thanks - this looks good to me, but the ="= causes problems and ends the
template early. I tried to replace =":"= with =':'= but this did =not
work either (invalid-read-syntax).

How can I get this to work?

Rainer.

>
>
> Regards,

-- 
Rainer M. Krug
email: Rainerkrugsde
PGP: 0x0F52F982


signature.asc
Description: PGP signature


[O] Trouble with logbook drawers

2016-11-18 Thread Michael Welle
Hello,

I have a few repeating tasks with defective logbook drawers:

   :LOGBOOK:
   
   :LOGBOOK:
   
   :END:
   ...
   :END:

As you can see, two drawers got nested somehow. They both hold data that
belongs to the task. I can't say if data is missing, but there seems to
be no duplication of data.

>From time to time I fix them manually, but they tend to come back after
some time. Any hints? 

Regards
hmw



Re: [O] Capture templates - using result from %^g twice?

2016-11-18 Thread Nicolas Goaziou
Hello,

Rainer M Krug  writes:

> Hm - I seem to ask strange questions here. Any ideas?

%\2 is not working because it is used to repeat %^{prompt} placeholders,
not %^g or %^G, per documentation.

You could try (untested)

  :SHEET: %(mapconcat #'identity (org-get-tags-at nil t) ":")


Regards,

-- 
Nicolas Goaziou



Re: [O] Release 9.0 test failed: test-ob/indented-cached-org-bracket-link

2016-11-18 Thread Nicolas Goaziou
Hello,

David Talmage  writes:

> I built org 9.0 on my Mac today.  'make test' reported one failed test.  I
> don't know if it is important or not.  Please advise me.
>
> 'make test' said:
>
> 1 unexpected results:
>FAILED  test-ob/indented-cached-org-bracket-link

Our build bot doesn't report this error and I cannot reproduce it
either. None of us is using a Mac, though.


> Test test-ob/indented-cached-org-bracket-link condition:
> (ert-test-failed
>  ((should
>(let
>   (...)
> (org-test-with-temp-text "
> * Test
>   #+BEGIN_SRC emacs-lisp :file test.txt :cache yes
> (message \"test\")
>   #+END_SRC" ... ...)))
>   :form
>   (let
>  ((default-directory temporary-file-directory))
> (org-test-with-temp-text "
> * Test
>   #+BEGIN_SRC emacs-lisp :file test.txt :cache yes
> (message \"test\")
>   #+END_SRC"
>  (org-babel-execute-src-block)
>  (string= ... ...)))
>   :value nil))
>FAILED  166/670  test-ob/indented-cached-org-bracket-link

Unfortunately, the backtrace is missing important information. It might
be enlightening to know why (string= ... ...) returns nil, i.e., what
strings are compared.

Regards,

-- 
Nicolas Goaziou



Re: [O] org.texi edits, patch attached

2016-11-18 Thread Nicolas Goaziou
Hello,

Lambda Coder  writes:

> Do you prefer future edits against master or maint branch? It was not clear
> when I asked the very first time.

Documentation fixes usually go to maint, unless they refer to
a master-only feature, obviously.

Regards,

-- 
Nicolas Goaziou