Re: [O] org-ref is not using default bibliography file

2015-12-12 Thread John Kitchin
That probably means some variable should be a list and it isn't, it is just
a string.

On Saturday, December 12, 2015, Kai Chen  wrote:

> Well I was wrong, after I expand my-dropbox-path to full path, the problem
> is still there.
>
> Here are the results, the upper one is with the bibliography link while
> the one at the bottom is without. Only the format changes, one with a
> quoted | but another with a leading :
> Could this be the cause?
>
> === From notes.org ===
> . some text with citations
> bibliography:/home/kai/Dropbox/bibliography/references.bib
>
> #+BEGIN_SRC emacs-lisp
> (org-ref-find-bibliography)
> #+END_SRC
>
> #+RESULTS:
> | /home/kai/Dropbox/bibliography/references.bib |
>
> : /home/kai/Dropbox/bibliography/references.bib
>
>
>
> On Sun, Dec 13, 2015 at 11:11 AM, Kai Chen  > wrote:
>
>> Thanks for your suggestion! The problem lies in a variable I set which
>> points to the directory of my Dropbox folder, to ensure emacs portable on
>> different OS.
>>
>> When I have the bibliography link in the org file, the
>> (org-ref-find-bibliography) will return the absolute path to the .bib file,
>> which in my case is
>> /home/kai/Dropbox/bibliography/references.bib
>> But if I do not have the link, it returns
>> ~/Dropbox/bibliography/references.bib
>>
>> It seems some modules are resolving the '~' while some others are not.
>>
>> Cheers,
>> Kai
>>
>>
>> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin > > wrote:
>>
>>> That sounds odd.
>>>
>>> What is the output of this src block in your file?
>>>
>>> #+BEGIN_SRC emacs-lisp
>>> (org-ref-find-bibliography)
>>> #+END_SRC
>>>
>>>
>>>
>>> Kai Chen writes:
>>>
>>> > Dear list,
>>> >
>>> > I just got to know org-ref, and I followed the github help page to
>>> manually
>>> > install the package and set the default path similar to the
>>> configuration
>>> > provided in the follow link:
>>> > https://github.com/jkitchin/org-ref
>>> >
>>> > And I installed all the dependency packages like helm-bibtex, hydra
>>> etc.
>>> >
>>> > But when I am citing (using "C-c ]") an existing entry which is in the
>>> > default references.bib file, I can see the entry after I stroke the
>>> > command, but after I selected it and pressed enter, when the cursor is
>>> on
>>> > the link, the mini-buffer says:
>>> > !!! No entry found !!!
>>> > But previously the org-ref-helm-insert-cite-link properly showed that
>>> > entry. This can only work when I manually add a bibliography link at
>>> the
>>> > bottom of the file, which means org-ref is not using the default
>>> > bibliography file.
>>> >
>>> > So what should I check to fix this issue?
>>> >
>>> > Thanks for your help!
>>> >
>>> > The following is my configuration of org-ref:
>>> >
>>> > #+BEGIN_SRC emacs-lisp
>>> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>>> >
>>> >   (setq reftex-default-bibliography (concat my-dropbox-path
>>> > "bibliography/references.bib"))
>>> >
>>> >   ;; see org-ref for use of these variables
>>> >   (setq org-ref-bibliography-notes (concat my-dropbox-path
>>> "bibliography/
>>> > notes.org")
>>> > org-ref-default-bibliography (concat my-dropbox-path
>>> > "bibliography/references.bib")
>>> > org-ref-pdf-directory (concat my-dropbox-path
>>> > "bibliography/bibtex-pdfs/"))
>>> >
>>> >   ;; *** helm-bibtex
>>> >
>>> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
>>> > "bibliography/references.bib"))
>>> >   (setq helm-bibtex-library-path (concat my-dropbox-path
>>> > "bibliography/bibtex-pdfs"))
>>> >
>>> >   ;; open pdf with system pdf viewer (works on mac)
>>> >   (when (eq system-type 'darwin)
>>> > (setq helm-bibtex-pdf-open-function
>>> >   (lambda (fpath)
>>> > (start-process "open" "*open*" "open" fpath
>>> >
>>> >   ;; alternative
>>> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>>> >
>>> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
>>> > "bibliography/helm-bibtex-notes"))
>>> >
>>> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>>> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>>> >   (global-set-key [f12] 'org-ref-open-in-browser)
>>> >
>>> >   (add-to-list 'load-path org-ref-path)
>>> >
>>> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
>>> > key-chord
>>> >   ;; in your load-path
>>> >   ;; auto-install dependencies
>>> >   (require 'org-ref)
>>> >
>>> >   ;; optional but very useful libraries in org-ref
>>> >   (require 'doi-utils)
>>> >   (require 'jmax-bibtex)
>>> >   (require 'pubmed)
>>> >   (require 'arxiv)
>>> >   (require 'sci-id)
>>> >
>>> > #+END_SRC
>>>
>>> --
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> 

Re: [O] org-ref is not using default bibliography file

2015-12-12 Thread Kai Chen
Well I was wrong, after I expand my-dropbox-path to full path, the problem
is still there.

Here are the results, the upper one is with the bibliography link while the
one at the bottom is without. Only the format changes, one with a quoted |
but another with a leading :
Could this be the cause?

=== From notes.org ===
. some text with citations
bibliography:/home/kai/Dropbox/bibliography/references.bib

#+BEGIN_SRC emacs-lisp
(org-ref-find-bibliography)
#+END_SRC

#+RESULTS:
| /home/kai/Dropbox/bibliography/references.bib |

: /home/kai/Dropbox/bibliography/references.bib



On Sun, Dec 13, 2015 at 11:11 AM, Kai Chen  wrote:

> Thanks for your suggestion! The problem lies in a variable I set which
> points to the directory of my Dropbox folder, to ensure emacs portable on
> different OS.
>
> When I have the bibliography link in the org file, the
> (org-ref-find-bibliography) will return the absolute path to the .bib file,
> which in my case is
> /home/kai/Dropbox/bibliography/references.bib
> But if I do not have the link, it returns
> ~/Dropbox/bibliography/references.bib
>
> It seems some modules are resolving the '~' while some others are not.
>
> Cheers,
> Kai
>
>
> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin 
> wrote:
>
>> That sounds odd.
>>
>> What is the output of this src block in your file?
>>
>> #+BEGIN_SRC emacs-lisp
>> (org-ref-find-bibliography)
>> #+END_SRC
>>
>>
>>
>> Kai Chen writes:
>>
>> > Dear list,
>> >
>> > I just got to know org-ref, and I followed the github help page to
>> manually
>> > install the package and set the default path similar to the
>> configuration
>> > provided in the follow link:
>> > https://github.com/jkitchin/org-ref
>> >
>> > And I installed all the dependency packages like helm-bibtex, hydra etc.
>> >
>> > But when I am citing (using "C-c ]") an existing entry which is in the
>> > default references.bib file, I can see the entry after I stroke the
>> > command, but after I selected it and pressed enter, when the cursor is
>> on
>> > the link, the mini-buffer says:
>> > !!! No entry found !!!
>> > But previously the org-ref-helm-insert-cite-link properly showed that
>> > entry. This can only work when I manually add a bibliography link at the
>> > bottom of the file, which means org-ref is not using the default
>> > bibliography file.
>> >
>> > So what should I check to fix this issue?
>> >
>> > Thanks for your help!
>> >
>> > The following is my configuration of org-ref:
>> >
>> > #+BEGIN_SRC emacs-lisp
>> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>> >
>> >   (setq reftex-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >
>> >   ;; see org-ref for use of these variables
>> >   (setq org-ref-bibliography-notes (concat my-dropbox-path
>> "bibliography/
>> > notes.org")
>> > org-ref-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib")
>> > org-ref-pdf-directory (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs/"))
>> >
>> >   ;; *** helm-bibtex
>> >
>> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >   (setq helm-bibtex-library-path (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs"))
>> >
>> >   ;; open pdf with system pdf viewer (works on mac)
>> >   (when (eq system-type 'darwin)
>> > (setq helm-bibtex-pdf-open-function
>> >   (lambda (fpath)
>> > (start-process "open" "*open*" "open" fpath
>> >
>> >   ;; alternative
>> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>> >
>> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
>> > "bibliography/helm-bibtex-notes"))
>> >
>> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>> >   (global-set-key [f12] 'org-ref-open-in-browser)
>> >
>> >   (add-to-list 'load-path org-ref-path)
>> >
>> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
>> > key-chord
>> >   ;; in your load-path
>> >   ;; auto-install dependencies
>> >   (require 'org-ref)
>> >
>> >   ;; optional but very useful libraries in org-ref
>> >   (require 'doi-utils)
>> >   (require 'jmax-bibtex)
>> >   (require 'pubmed)
>> >   (require 'arxiv)
>> >   (require 'sci-id)
>> >
>> > #+END_SRC
>>
>> --
>> 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
>>
>>
>
>
> --
> Regards
>
> Multi-Agent System Lab
> University of Science and Technology of China
>
> K.Chen
>



-- 
Regards

Multi-Agent System Lab
University of Science and Technology of China

K.Chen


Re: [O] org-ref is not using default bibliography file

2015-12-12 Thread Kai Chen
Thanks for pointing out!!!

This did the trick for me (using backquote `):

(setq reftex-default-bibliography `(,(concat my-dropbox-path
"bibliography/references.bib")))

Thanks again for your prompt help!

Cheers,
Kai

On Sun, Dec 13, 2015 at 11:59 AM, John Kitchin 
wrote:

> That probably means some variable should be a list and it isn't, it is
> just a string.
>
>
> On Saturday, December 12, 2015, Kai Chen  wrote:
>
>> Well I was wrong, after I expand my-dropbox-path to full path, the
>> problem is still there.
>>
>> Here are the results, the upper one is with the bibliography link while
>> the one at the bottom is without. Only the format changes, one with a
>> quoted | but another with a leading :
>> Could this be the cause?
>>
>> === From notes.org ===
>> . some text with citations
>> bibliography:/home/kai/Dropbox/bibliography/references.bib
>>
>> #+BEGIN_SRC emacs-lisp
>> (org-ref-find-bibliography)
>> #+END_SRC
>>
>> #+RESULTS:
>> | /home/kai/Dropbox/bibliography/references.bib |
>>
>> : /home/kai/Dropbox/bibliography/references.bib
>>
>>
>>
>> On Sun, Dec 13, 2015 at 11:11 AM, Kai Chen 
>> wrote:
>>
>>> Thanks for your suggestion! The problem lies in a variable I set which
>>> points to the directory of my Dropbox folder, to ensure emacs portable on
>>> different OS.
>>>
>>> When I have the bibliography link in the org file, the
>>> (org-ref-find-bibliography) will return the absolute path to the .bib file,
>>> which in my case is
>>> /home/kai/Dropbox/bibliography/references.bib
>>> But if I do not have the link, it returns
>>> ~/Dropbox/bibliography/references.bib
>>>
>>> It seems some modules are resolving the '~' while some others are not.
>>>
>>> Cheers,
>>> Kai
>>>
>>>
>>> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin 
>>> wrote:
>>>
 That sounds odd.

 What is the output of this src block in your file?

 #+BEGIN_SRC emacs-lisp
 (org-ref-find-bibliography)
 #+END_SRC



 Kai Chen writes:

 > Dear list,
 >
 > I just got to know org-ref, and I followed the github help page to
 manually
 > install the package and set the default path similar to the
 configuration
 > provided in the follow link:
 > https://github.com/jkitchin/org-ref
 >
 > And I installed all the dependency packages like helm-bibtex, hydra
 etc.
 >
 > But when I am citing (using "C-c ]") an existing entry which is in the
 > default references.bib file, I can see the entry after I stroke the
 > command, but after I selected it and pressed enter, when the cursor
 is on
 > the link, the mini-buffer says:
 > !!! No entry found !!!
 > But previously the org-ref-helm-insert-cite-link properly showed that
 > entry. This can only work when I manually add a bibliography link at
 the
 > bottom of the file, which means org-ref is not using the default
 > bibliography file.
 >
 > So what should I check to fix this issue?
 >
 > Thanks for your help!
 >
 > The following is my configuration of org-ref:
 >
 > #+BEGIN_SRC emacs-lisp
 >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
 >
 >   (setq reftex-default-bibliography (concat my-dropbox-path
 > "bibliography/references.bib"))
 >
 >   ;; see org-ref for use of these variables
 >   (setq org-ref-bibliography-notes (concat my-dropbox-path
 "bibliography/
 > notes.org")
 > org-ref-default-bibliography (concat my-dropbox-path
 > "bibliography/references.bib")
 > org-ref-pdf-directory (concat my-dropbox-path
 > "bibliography/bibtex-pdfs/"))
 >
 >   ;; *** helm-bibtex
 >
 >   (setq helm-bibtex-bibliography (concat my-dropbox-path
 > "bibliography/references.bib"))
 >   (setq helm-bibtex-library-path (concat my-dropbox-path
 > "bibliography/bibtex-pdfs"))
 >
 >   ;; open pdf with system pdf viewer (works on mac)
 >   (when (eq system-type 'darwin)
 > (setq helm-bibtex-pdf-open-function
 >   (lambda (fpath)
 > (start-process "open" "*open*" "open" fpath
 >
 >   ;; alternative
 >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
 >
 >   (setq helm-bibtex-notes-path (concat my-dropbox-path
 > "bibliography/helm-bibtex-notes"))
 >
 >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
 >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
 >   (global-set-key [f12] 'org-ref-open-in-browser)
 >
 >   (add-to-list 'load-path org-ref-path)
 >
 >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
 > key-chord
 >   ;; in your load-path
 >   ;; auto-install dependencies
 >   (require 'org-ref)
 >
 >   ;; optional but very useful libraries in org-ref
 >   (require 

Re: [O] org-ref is not using default bibliography file

2015-12-12 Thread John Kitchin
does that mean it is working now?

Kai Chen writes:

> Thanks for your suggestion! The problem lies in a variable I set which
> points to the directory of my Dropbox folder, to ensure emacs portable on
> different OS.
>
> When I have the bibliography link in the org file, the
> (org-ref-find-bibliography) will return the absolute path to the .bib file,
> which in my case is
> /home/kai/Dropbox/bibliography/references.bib
> But if I do not have the link, it returns
> ~/Dropbox/bibliography/references.bib
>
> It seems some modules are resolving the '~' while some others are not.
>
> Cheers,
> Kai
>
>
> On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin 
> wrote:
>
>> That sounds odd.
>>
>> What is the output of this src block in your file?
>>
>> #+BEGIN_SRC emacs-lisp
>> (org-ref-find-bibliography)
>> #+END_SRC
>>
>>
>>
>> Kai Chen writes:
>>
>> > Dear list,
>> >
>> > I just got to know org-ref, and I followed the github help page to
>> manually
>> > install the package and set the default path similar to the configuration
>> > provided in the follow link:
>> > https://github.com/jkitchin/org-ref
>> >
>> > And I installed all the dependency packages like helm-bibtex, hydra etc.
>> >
>> > But when I am citing (using "C-c ]") an existing entry which is in the
>> > default references.bib file, I can see the entry after I stroke the
>> > command, but after I selected it and pressed enter, when the cursor is on
>> > the link, the mini-buffer says:
>> > !!! No entry found !!!
>> > But previously the org-ref-helm-insert-cite-link properly showed that
>> > entry. This can only work when I manually add a bibliography link at the
>> > bottom of the file, which means org-ref is not using the default
>> > bibliography file.
>> >
>> > So what should I check to fix this issue?
>> >
>> > Thanks for your help!
>> >
>> > The following is my configuration of org-ref:
>> >
>> > #+BEGIN_SRC emacs-lisp
>> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>> >
>> >   (setq reftex-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >
>> >   ;; see org-ref for use of these variables
>> >   (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
>> > notes.org")
>> > org-ref-default-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib")
>> > org-ref-pdf-directory (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs/"))
>> >
>> >   ;; *** helm-bibtex
>> >
>> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
>> > "bibliography/references.bib"))
>> >   (setq helm-bibtex-library-path (concat my-dropbox-path
>> > "bibliography/bibtex-pdfs"))
>> >
>> >   ;; open pdf with system pdf viewer (works on mac)
>> >   (when (eq system-type 'darwin)
>> > (setq helm-bibtex-pdf-open-function
>> >   (lambda (fpath)
>> > (start-process "open" "*open*" "open" fpath
>> >
>> >   ;; alternative
>> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>> >
>> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
>> > "bibliography/helm-bibtex-notes"))
>> >
>> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>> >   (global-set-key [f12] 'org-ref-open-in-browser)
>> >
>> >   (add-to-list 'load-path org-ref-path)
>> >
>> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
>> > key-chord
>> >   ;; in your load-path
>> >   ;; auto-install dependencies
>> >   (require 'org-ref)
>> >
>> >   ;; optional but very useful libraries in org-ref
>> >   (require 'doi-utils)
>> >   (require 'jmax-bibtex)
>> >   (require 'pubmed)
>> >   (require 'arxiv)
>> >   (require 'sci-id)
>> >
>> > #+END_SRC
>>
>> --
>> 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] Reference cannot be resolved without publishing

2015-12-12 Thread Nicolas Goaziou
Hello,

Alan Schmitt  writes:

> I have the following files I want to export to html:
>
> common.org:
> #+TITLE: Unison Binaries
> #+OPTIONS: toc:nil num:nil
> #+HTML_HEAD: 
>
> * sidebar
>   :PROPERTIES:
>   :CUSTOM_ID: sidebar
>   :HTML_CONTAINER_CLASS: container-sidebar
>   :END:
>
> - [[file:index.org::#OSX][Mac OS X]]
>
> index.org (extract)
> #+INCLUDE: "common.org"
>
> * body
>   :PROPERTIES:
>   :CUSTOM_ID: mainbody
>   :HTML_CONTAINER_CLASS: container-mainbody
>   :END:
>
> ** Unison Binaries
>
> *** Mac OS X
> :PROPERTIES:
> :CUSTOM_ID: OSX
> :END:
>
> When I try to export index.org to index.html, I get:
>
> Reference "#OSX" in file "index.org" cannot be resolved without
> publishing
>
> What does it mean? And why can't the reference be resolved? Should I not
> use CUSTOM_ID for relative links?

Usually, Org cannot resolve an external link if it doesn't know about
the external file, i.e., if it doesn't publish it.

HTML export is a special case because resolving custom-id links is
trivial (the back-end doesn't alter them). So I guess we can use that to
make it work in this special case, even though it will fail in other
back-ends.

I pushed the change in master. Let me know if it works for you.


Regards,

-- 
Nicolas Goaziou



Re: [O] An issue with org-agenda-todo-list-sublevels

2015-12-12 Thread Nicolas Goaziou
Hello,

Marcin Borkowski  writes:

> I have org-agenda-todo-list-sublevels set to nil.  However, given this
> tree:
>
> * DONE task
> ** TODO subtask
>
> it turns out that the todo list in the agenda shows the "subtask" anyway.
>
> Should it be so?  I would guess not.

It's not clear to to me it shouldn't be the case. AFAIU, the point of
`org-agenda-todo-list-sublevels' is not to skip TODO entries but to
limit the tasks you can process at a time.

> The reason I'd like to exclude this "subtask" from displaying is
> something like this: assume that I have a project, halfway done, which
> must be postponed for some reason.  I'd like to be able to do this:
>
> * SOMEDAY cool project
> ** DONE preparation
> ** TODO hard work
>
> where SOMEDAY is a done-type keyword.
>
> And of course, I don't want to be bothered by "hard work" in this case
> in my global todo list.
>
> Is there a way to achieve this?

You can use a dedicated function in `org-agenda-skip-function' for that
(e.g., ignore task if one of its parents is a done task).


Regards,

-- 
Nicolas Goaziou



Re: [O] a new csl - citation style lisp ;)

2015-12-12 Thread Martin Yrjölä
Hi John,

John Kitchin writes:

> Hi everyone,
>
> I got curious enough about citation processing to draft an elisp-based
> citeproc for orgmode. You can see the code here:
>
> https://github.com/jkitchin/org-ref/tree/master/citeproc

I gave it a spin and it was very easy to set up as an org-ref user.
Great work so far. I think an Elisp based implementation has many
strengths like you mentioned in the readme.

> It is loosely based on the xml-CSL file, but in lisp. The principle is
> the same, there is a csl file in lisp that contains formatting
> information, and a processor that works on my org-ref links to replace
> them with formatted citations and entries.

What would be the best way moving forward? How easy would it be to
implement a converter for xml-CSL files? Or would it be better to
support the xml-CSL format directly to avoid duplicate work?

> It certainly isn't complete, bug-free, or stable yet and might still not solve
> note-based styles, but it is pretty powerful already.

Do you already accept bug reports and pull requests on Github?

Best regards,
Martin Yrjölä




[O] proposed change of org-gnus-store-link for nnir groups

2015-12-12 Thread Thomas Alexander Gerds

sometimes after searching for mail with notmuch, I want to save a link
to one of the articles shown in the nnir summary. since nnir groups are
temporary I would like org-gnus-store-link to treat nnir groups
differently and to use the articles orginal group when creating the
link. the following 3 lines change of org-gnus-store-link does this for
me. if this is interesting for others maybe it could be integrated
... if not, I could either advice org-gnus-store-link or add a modified
version to org-store-link-functions. comments?

Thomas

lisp/org-gnus.el
diff --git a/lisp/org-gnus.el b/lisp/org-gnus.el
index c7b46af..b5cf9c9 100644
*** a/lisp/org-gnus.el
Highlight differences
--- a/lisp/org-gnus.el
+++ b/lisp/org-gnus.el
@@ -173,9 +173,12 @@ If `org-store-link' was called with a prefix arg the 
meaning of
   (to (cdr (assq 'To (mail-header-extra header
   newsgroups x-no-archive desc link)
   (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name))
  'nnvirtual)
(setq group (car (nnvirtual-map-article
  (gnus-summary-article-number)
+  (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name))
+   'nnir)
+   (setq group  (nnir-article-group (gnus-summary-article-number
   ;; Remove text properties of subject string to avoid Emacs bug
   ;; #3506
   (set-text-properties 0 (length subject) nil subject)

-- 
sent from nil



Re: [O] Intermixed date in koma-letter export

2015-12-12 Thread Rasmus
Hi,

York Zhao  writes:

>> Anyway, glad that I've got a solution!
>
> Unfortunately, I've just noticed that the "C-s" subtree export also
> exported the
> heading (the "letter1" in my example), which is definitely unacceptable when
> exporting a letter.

#+options: title:nil

Or replace "letter 1" with the actual title or subject of the letter (see
org-koma-letter-prefer-subject for the latter).

Rasmus

-- 
Er du tosset for noge' lårt!




Re: [O] a new csl - citation style lisp ;)

2015-12-12 Thread John Kitchin
>>
>> I got curious enough about citation processing to draft an elisp-based
>> citeproc for orgmode. You can see the code here:
>>
>> https://github.com/jkitchin/org-ref/tree/master/citeproc
>
> I gave it a spin and it was very easy to set up as an org-ref user.
> Great work so far. I think an Elisp based implementation has many
> strengths like you mentioned in the readme.

I am glad to hear that!

>
>> It is loosely based on the xml-CSL file, but in lisp. The principle is
>> the same, there is a csl file in lisp that contains formatting
>> information, and a processor that works on my org-ref links to replace
>> them with formatted citations and entries.
>
> What would be the best way moving forward? How easy would it be to
> implement a converter for xml-CSL files? Or would it be better to
> support the xml-CSL format directly to avoid duplicate work?

I don't know the answer here. We can read the xml-CSL directly into an
elisp data structure that looks similar to my lisp-csl. I thought about
trying to use the xml-csl directly, but they write some logic control
into them, and I didn't want to write code to turn them into functions
(which is what the other citeproc codes must do I guess.)

Also, by going straight to elisp-csl, we can directly write code into
them if we want, which makes them pretty flexible, probably more so than
xml-csl.

It only took a couple of days to get to this, so I am not too committed
to not using the xml-csl files. There are a lot of them already
available. They don't support my space-chomping and punctuation
transposition ideas, or different citation types (cite, citenum,
citeyear, citeauthor, ...) I think, so we would have to adapt them to do
that or provide some other mechanism to pass options to the processor.

>
>> It certainly isn't complete, bug-free, or stable yet and might still not 
>> solve
>> note-based styles, but it is pretty powerful already.
>
> Do you already accept bug reports and pull requests on Github?

Sure. I think this code has some value to org-ref whether it becomes the
citation processing solution in the future or not. It will make it easy
to add nicely formatted citations to emails, text documents, etc...

I am not sure it is particularly stable in structure yet. I still don't
know how easy it will be to modify backend outputs, e.g. to change how
in-text citations are hyperlinked to bibliography entries, or if it
would be easy to have a bibitems list prepared for LaTeX, or to export
as an org-file with footnotes, or otherwise linked references, etc...

We can only learn those things by trying them ;)

>
> Best regards,
> Martin Yrjölä

--
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] An issue with org-agenda-todo-list-sublevels

2015-12-12 Thread Marcin Borkowski

On 2015-12-12, at 09:53, Nicolas Goaziou  wrote:

> Hello,
>
> Marcin Borkowski  writes:
>
>> I have org-agenda-todo-list-sublevels set to nil.  However, given this
>> tree:
>>
>> * DONE task
>> ** TODO subtask
>>
>> it turns out that the todo list in the agenda shows the "subtask" anyway.
>>
>> Should it be so?  I would guess not.
>
> It's not clear to to me it shouldn't be the case. AFAIU, the point of
> `org-agenda-todo-list-sublevels' is not to skip TODO entries but to
> limit the tasks you can process at a time.

I see.

>> The reason I'd like to exclude this "subtask" from displaying is
>> something like this: assume that I have a project, halfway done, which
>> must be postponed for some reason.  I'd like to be able to do this:
>>
>> * SOMEDAY cool project
>> ** DONE preparation
>> ** TODO hard work
>>
>> where SOMEDAY is a done-type keyword.
>>
>> And of course, I don't want to be bothered by "hard work" in this case
>> in my global todo list.
>>
>> Is there a way to achieve this?
>
> You can use a dedicated function in `org-agenda-skip-function' for that
> (e.g., ignore task if one of its parents is a done task).

Wow, thanks, I didn't know about it.  Now that I look into this, should
I use `org-agenda-skip-function' or `org-agenda-skip-function-global'?

Also, how do I check whether one of the parents is done?  I know how to
climb through the hierarchy of headlines, how do I get the TODO keyword?
Is `org-get-todo-state' the right function to do that?

Now that I think of it, maybe I should use a tag for that (like
:project: or something).  I'll have to think about it.

> Regards,

Best,

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



Re: [O] Intermixed date in koma-letter export

2015-12-12 Thread York Zhao
> #+options: title:nil

Thanks a lot! This worked, but still problematic. If I have "#+options:
title:centered" for letter 1 but "#+options: title:nil" for letter 2,
letter 2's
setting will override letter 1's. I.e., letter 1 will have no title now.

Also, I was looking into ox-koma-letter.el trying to find some clue, but I
couldn't find where it handles the "title" option. The closest I've got was
`org-koma-letter-subject-format', which can be set with "#+OPTIONS
subject". But
it seems that the "subject" option works the same as the "title" option,
and has
exactly the same problem.

Thanks


On Sat, Dec 12, 2015 at 5:39 AM, Rasmus  wrote:

> Hi,
>
> York Zhao  writes:
>
> >> Anyway, glad that I've got a solution!
> >
> > Unfortunately, I've just noticed that the "C-s" subtree export also
> > exported the
> > heading (the "letter1" in my example), which is definitely unacceptable
> when
> > exporting a letter.
>
> #+options: title:nil
>
> Or replace "letter 1" with the actual title or subject of the letter (see
> org-koma-letter-prefer-subject for the latter).
>
> Rasmus
>
> --
> Er du tosset for noge' lårt!
>
>
>


[O] org-ref is not using default bibliography file

2015-12-12 Thread Kai Chen
Dear list,

I just got to know org-ref, and I followed the github help page to manually
install the package and set the default path similar to the configuration
provided in the follow link:
https://github.com/jkitchin/org-ref

And I installed all the dependency packages like helm-bibtex, hydra etc.

But when I am citing (using "C-c ]") an existing entry which is in the
default references.bib file, I can see the entry after I stroke the
command, but after I selected it and pressed enter, when the cursor is on
the link, the mini-buffer says:
!!! No entry found !!!
But previously the org-ref-helm-insert-cite-link properly showed that
entry. This can only work when I manually add a bibliography link at the
bottom of the file, which means org-ref is not using the default
bibliography file.

So what should I check to fix this issue?

Thanks for your help!

The following is my configuration of org-ref:

#+BEGIN_SRC emacs-lisp
  (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))

  (setq reftex-default-bibliography (concat my-dropbox-path
"bibliography/references.bib"))

  ;; see org-ref for use of these variables
  (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
notes.org")
org-ref-default-bibliography (concat my-dropbox-path
"bibliography/references.bib")
org-ref-pdf-directory (concat my-dropbox-path
"bibliography/bibtex-pdfs/"))

  ;; *** helm-bibtex

  (setq helm-bibtex-bibliography (concat my-dropbox-path
"bibliography/references.bib"))
  (setq helm-bibtex-library-path (concat my-dropbox-path
"bibliography/bibtex-pdfs"))

  ;; open pdf with system pdf viewer (works on mac)
  (when (eq system-type 'darwin)
(setq helm-bibtex-pdf-open-function
  (lambda (fpath)
(start-process "open" "*open*" "open" fpath

  ;; alternative
  ;; (setq helm-bibtex-pdf-open-function 'org-open-file)

  (setq helm-bibtex-notes-path (concat my-dropbox-path
"bibliography/helm-bibtex-notes"))

  (global-set-key [f10] 'org-ref-open-bibtex-notes)
  (global-set-key [f11] 'org-ref-open-bibtex-pdf)
  (global-set-key [f12] 'org-ref-open-in-browser)

  (add-to-list 'load-path org-ref-path)

  ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
key-chord
  ;; in your load-path
  ;; auto-install dependencies
  (require 'org-ref)

  ;; optional but very useful libraries in org-ref
  (require 'doi-utils)
  (require 'jmax-bibtex)
  (require 'pubmed)
  (require 'arxiv)
  (require 'sci-id)

#+END_SRC


-- 
Regards

Multi-Agent System Lab
University of Science and Technology of China

K.Chen


Re: [O] org-ref is not using default bibliography file

2015-12-12 Thread John Kitchin
That sounds odd.

What is the output of this src block in your file?

#+BEGIN_SRC emacs-lisp
(org-ref-find-bibliography)
#+END_SRC



Kai Chen writes:

> Dear list,
>
> I just got to know org-ref, and I followed the github help page to manually
> install the package and set the default path similar to the configuration
> provided in the follow link:
> https://github.com/jkitchin/org-ref
>
> And I installed all the dependency packages like helm-bibtex, hydra etc.
>
> But when I am citing (using "C-c ]") an existing entry which is in the
> default references.bib file, I can see the entry after I stroke the
> command, but after I selected it and pressed enter, when the cursor is on
> the link, the mini-buffer says:
> !!! No entry found !!!
> But previously the org-ref-helm-insert-cite-link properly showed that
> entry. This can only work when I manually add a bibliography link at the
> bottom of the file, which means org-ref is not using the default
> bibliography file.
>
> So what should I check to fix this issue?
>
> Thanks for your help!
>
> The following is my configuration of org-ref:
>
> #+BEGIN_SRC emacs-lisp
>   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
>
>   (setq reftex-default-bibliography (concat my-dropbox-path
> "bibliography/references.bib"))
>
>   ;; see org-ref for use of these variables
>   (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
> notes.org")
> org-ref-default-bibliography (concat my-dropbox-path
> "bibliography/references.bib")
> org-ref-pdf-directory (concat my-dropbox-path
> "bibliography/bibtex-pdfs/"))
>
>   ;; *** helm-bibtex
>
>   (setq helm-bibtex-bibliography (concat my-dropbox-path
> "bibliography/references.bib"))
>   (setq helm-bibtex-library-path (concat my-dropbox-path
> "bibliography/bibtex-pdfs"))
>
>   ;; open pdf with system pdf viewer (works on mac)
>   (when (eq system-type 'darwin)
> (setq helm-bibtex-pdf-open-function
>   (lambda (fpath)
> (start-process "open" "*open*" "open" fpath
>
>   ;; alternative
>   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
>
>   (setq helm-bibtex-notes-path (concat my-dropbox-path
> "bibliography/helm-bibtex-notes"))
>
>   (global-set-key [f10] 'org-ref-open-bibtex-notes)
>   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
>   (global-set-key [f12] 'org-ref-open-in-browser)
>
>   (add-to-list 'load-path org-ref-path)
>
>   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
> key-chord
>   ;; in your load-path
>   ;; auto-install dependencies
>   (require 'org-ref)
>
>   ;; optional but very useful libraries in org-ref
>   (require 'doi-utils)
>   (require 'jmax-bibtex)
>   (require 'pubmed)
>   (require 'arxiv)
>   (require 'sci-id)
>
> #+END_SRC

--
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] Intermixed date in koma-letter export

2015-12-12 Thread Rasmus
York Zhao  writes:

>> #+options: title:nil
>
> Thanks a lot! This worked, but still problematic. If I have "#+options:
> title:centered" for letter 1 but "#+options: title:nil" for letter 2,
> letter 2's
> setting will override letter 1's. I.e., letter 1 will have no title now.

Use the :EXPORT_OPTIONS: subheading options.

> Also, I was looking into ox-koma-letter.el trying to find some clue, but I
> couldn't find where it handles the "title" option.

Probably in ox.el or ox-latex.el depending on what you have got in mind.

> The closest I've got was `org-koma-letter-subject-format', which can be
> set with "#+OPTIONS subject". But it seems that the "subject" option
> works the same as the "title" option, and has exactly the same problem.

I don't understand this part.  The documentation of ox-koma-letter.el is
at the top of the file.  There’s also a tutorial on Worg.

Rasmus

-- 
Enough with the bla bla!




Re: [O] org-ref is not using default bibliography file

2015-12-12 Thread Kai Chen
Thanks for your suggestion! The problem lies in a variable I set which
points to the directory of my Dropbox folder, to ensure emacs portable on
different OS.

When I have the bibliography link in the org file, the
(org-ref-find-bibliography) will return the absolute path to the .bib file,
which in my case is
/home/kai/Dropbox/bibliography/references.bib
But if I do not have the link, it returns
~/Dropbox/bibliography/references.bib

It seems some modules are resolving the '~' while some others are not.

Cheers,
Kai


On Sun, Dec 13, 2015 at 2:15 AM, John Kitchin 
wrote:

> That sounds odd.
>
> What is the output of this src block in your file?
>
> #+BEGIN_SRC emacs-lisp
> (org-ref-find-bibliography)
> #+END_SRC
>
>
>
> Kai Chen writes:
>
> > Dear list,
> >
> > I just got to know org-ref, and I followed the github help page to
> manually
> > install the package and set the default path similar to the configuration
> > provided in the follow link:
> > https://github.com/jkitchin/org-ref
> >
> > And I installed all the dependency packages like helm-bibtex, hydra etc.
> >
> > But when I am citing (using "C-c ]") an existing entry which is in the
> > default references.bib file, I can see the entry after I stroke the
> > command, but after I selected it and pressed enter, when the cursor is on
> > the link, the mini-buffer says:
> > !!! No entry found !!!
> > But previously the org-ref-helm-insert-cite-link properly showed that
> > entry. This can only work when I manually add a bibliography link at the
> > bottom of the file, which means org-ref is not using the default
> > bibliography file.
> >
> > So what should I check to fix this issue?
> >
> > Thanks for your help!
> >
> > The following is my configuration of org-ref:
> >
> > #+BEGIN_SRC emacs-lisp
> >   (setq org-ref-path (concat my-dropbox-path "software/org-ref/"))
> >
> >   (setq reftex-default-bibliography (concat my-dropbox-path
> > "bibliography/references.bib"))
> >
> >   ;; see org-ref for use of these variables
> >   (setq org-ref-bibliography-notes (concat my-dropbox-path "bibliography/
> > notes.org")
> > org-ref-default-bibliography (concat my-dropbox-path
> > "bibliography/references.bib")
> > org-ref-pdf-directory (concat my-dropbox-path
> > "bibliography/bibtex-pdfs/"))
> >
> >   ;; *** helm-bibtex
> >
> >   (setq helm-bibtex-bibliography (concat my-dropbox-path
> > "bibliography/references.bib"))
> >   (setq helm-bibtex-library-path (concat my-dropbox-path
> > "bibliography/bibtex-pdfs"))
> >
> >   ;; open pdf with system pdf viewer (works on mac)
> >   (when (eq system-type 'darwin)
> > (setq helm-bibtex-pdf-open-function
> >   (lambda (fpath)
> > (start-process "open" "*open*" "open" fpath
> >
> >   ;; alternative
> >   ;; (setq helm-bibtex-pdf-open-function 'org-open-file)
> >
> >   (setq helm-bibtex-notes-path (concat my-dropbox-path
> > "bibliography/helm-bibtex-notes"))
> >
> >   (global-set-key [f10] 'org-ref-open-bibtex-notes)
> >   (global-set-key [f11] 'org-ref-open-bibtex-pdf)
> >   (global-set-key [f12] 'org-ref-open-in-browser)
> >
> >   (add-to-list 'load-path org-ref-path)
> >
> >   ;; make sure you have dash, helm, helm-bibtex, ebib, s, f, hydra and
> > key-chord
> >   ;; in your load-path
> >   ;; auto-install dependencies
> >   (require 'org-ref)
> >
> >   ;; optional but very useful libraries in org-ref
> >   (require 'doi-utils)
> >   (require 'jmax-bibtex)
> >   (require 'pubmed)
> >   (require 'arxiv)
> >   (require 'sci-id)
> >
> > #+END_SRC
>
> --
> 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
>
>


-- 
Regards

Multi-Agent System Lab
University of Science and Technology of China

K.Chen


[O] ox-html, top-row-p

2015-12-12 Thread Fabrice Popineau
Hi,

I get an error in ox-html.el with the latest org-mode when exporting tables
to html :

Debugger entered--Lisp error: (void-variable top-row-p)
  (cond (top-row-p "") (bottom-row-p "") (t (if (= (mod row-number 2) 1) "" "")))
  eval((cond (top-row-p "") (bottom-row-p "") (t (if (= (mod row-number 2) 1) "" ""))) t)
  org-html-table-row((table-row (:type standard :begin 1784 :end 1898
:contents-begin 1785 :contents-end 1897 :post-blank 0 :post-affiliated 1784
:parent ...))

Can anybody confirm or is something wrong on my side ?

Greetings,

Fabrice