Re: org-cite-list-bibliography-files

2021-08-03 Thread von der Malsburg, Titus


On 2021-07-28 Wed 15:56, John Kitchin wrote:
> Could it be related to the variable org-mouse-1-follows-link?

This variable is non-nil for me and clicking on ordinary org links works fine 
in my setup.

I also tested it with emacs -Q followed by loading org via straight.el and 
(require 'org), but no luck.

  Titus

>
> Today I added mouse-1 to the keymap that org-ref-cite uses so that might
> also resolve it for you.
>
> John
>
> ---
> Professor John Kitchin (he/him/his)
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> http://kitchingroup.cheme.cmu.edu
>
>
>
> On Wed, Jul 28, 2021 at 9:13 AM Bruce D'Arcus  wrote:
>
>> Titus' second question got lost a bit, but does anyone have an answer?
>>
>> I have the same issue, but was thinking clicking should run
>> org-open-at-point.
>>
>> I know some other people do get clickable links, so am wondering if
>> it's a config issue?
>>
>> On Sun, Jul 25, 2021 at 10:47 AM Titus von der Malsburg
>>  wrote:
>>
>> > 2. The oc-basic processor makes citations look like clickable links
>> (blue, underlined, mouse pointer changes to finger), but when I click on
>> them, nothing happens.  I can only follow a references via
>> `org-open-at-point'.  It would be good to make citations clickable.  I also
>> suggest allowing users to follow links via C-c C-c which currently doesn’t
>> do anything on citations.  The other obvious action that C-c C-c could
>> trigger would be `org-cite-insert'.  Not sure what’s better.
>>
>>


-- 
Jun.-Prof. Dr. Titus von der Malsburg
Psycholinguistics and Cognitive Modeling
Institute of Linguistics, University of Stuttgart
https://tmalsburg.github.io



Re: org-cite-list-bibliography-files

2021-07-30 Thread Nicolas Goaziou
Hello,

Titus von der Malsburg  writes:

> 1. `org-cite-list-bibliography-files' returns the bibliographies
> defined locally and the globally defined bibliographies together.
> I propose to only list the local bibliographies, if defined, and to
> return the global bibliographies otherwise. I think the user needs
> a way to override the global setting if necessary. For example, when
> I work on a manuscript, I’d like to use that manuscript’s dedicated
> bibliography, but ignore my global bibliography. It’s very common to
> work with dedicated bibliographies IME, and the UI of oc-basic doesn’t
> show from which bibliography an entry is coming. So there’s no way to
> reliably select entries from just the dedicated/local bibliography.

As pointed out in this thread, I think using file local variables to set
`org-cite-global-bibliography' to nil is simple and Emacsy enough.

> 2. The oc-basic processor makes citations look like clickable links
> (blue, underlined, mouse pointer changes to finger), but when I click
> on them, nothing happens. I can only follow a references via
> `org-open-at-point'. It would be good to make citations clickable.

Done. Thank you.

> I also suggest allowing users to follow links via C-c C-c which
> currently doesn’t do anything on citations. The other obvious action
> that C-c C-c could trigger would be `org-cite-insert'. Not sure what’s
> better.

Neither. Both actions (follow and insert) already have a top-level
binding. It would be a waste to add C-c C-c to that. We might want to
use it for something different at some point.

Regards,
-- 
Nicolas Goaziou



Re: org-cite-list-bibliography-files

2021-07-28 Thread Bruce D'Arcus
On Wed, Jul 28, 2021 at 10:17 AM von der Malsburg, Titus
 wrote:
>
>
> On 2021-07-28 Wed 15:56, John Kitchin wrote:
> > Could it be related to the variable org-mouse-1-follows-link?
>
> This variable is non-nil for me and clicking on ordinary org links works fine 
> in my setup.

Just confirming: same here.

Bruce



Re: org-cite-list-bibliography-files

2021-07-28 Thread John Kitchin
At least until org-mode supports it natively, here is how I added C-c C-c
support to citations. It is easy to make it do what you want, I chose
follow in this code, (you can insert from the follow menu).

https://github.com/jkitchin/org-ref-cite/blob/main/org-ref-cite-follow.el#L305


John

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



On Wed, Jul 28, 2021 at 10:20 AM Titus von der Malsburg 
wrote:

>
> On 2021-07-28 Wed 15:12, Bruce D'Arcus wrote:
> > Titus' second question got lost a bit, but does anyone have an answer?
> >
> > I have the same issue, but was thinking clicking should run
> org-open-at-point.
>
> To avoid misunderstandings, I agree that a mouse click should run
> org-open-at-point.  However, for C-c C-c it it would perhaps be more useful
> if it would run org-cite-insert.  (On ordinary org links C-c C-c doesn’t
> appear to do anything.)
>
>   Titus
>
> >
> > I know some other people do get clickable links, so am wondering if
> > it's a config issue?
> >
> > On Sun, Jul 25, 2021 at 10:47 AM Titus von der Malsburg
> >  wrote:
> >
> >> 2. The oc-basic processor makes citations look like clickable links
> (blue, underlined, mouse pointer changes to finger), but when I click on
> them, nothing happens.  I can only follow a references via
> `org-open-at-point'.  It would be good to make citations clickable.  I also
> suggest allowing users to follow links via C-c C-c which currently doesn’t
> do anything on citations.  The other obvious action that C-c C-c could
> trigger would be `org-cite-insert'.  Not sure what’s better.
>
>
>


Re: org-cite-list-bibliography-files

2021-07-28 Thread Titus von der Malsburg


On 2021-07-28 Wed 15:12, Bruce D'Arcus wrote:
> Titus' second question got lost a bit, but does anyone have an answer?
>
> I have the same issue, but was thinking clicking should run org-open-at-point.

To avoid misunderstandings, I agree that a mouse click should run 
org-open-at-point.  However, for C-c C-c it it would perhaps be more useful if 
it would run org-cite-insert.  (On ordinary org links C-c C-c doesn’t appear to 
do anything.)

  Titus

>
> I know some other people do get clickable links, so am wondering if
> it's a config issue?
>
> On Sun, Jul 25, 2021 at 10:47 AM Titus von der Malsburg
>  wrote:
>
>> 2. The oc-basic processor makes citations look like clickable links (blue, 
>> underlined, mouse pointer changes to finger), but when I click on them, 
>> nothing happens.  I can only follow a references via `org-open-at-point'.  
>> It would be good to make citations clickable.  I also suggest allowing users 
>> to follow links via C-c C-c which currently doesn’t do anything on 
>> citations.  The other obvious action that C-c C-c could trigger would be 
>> `org-cite-insert'.  Not sure what’s better.




Re: org-cite-list-bibliography-files

2021-07-28 Thread John Kitchin
Could it be related to the variable org-mouse-1-follows-link?

Today I added mouse-1 to the keymap that org-ref-cite uses so that might
also resolve it for you.

John

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



On Wed, Jul 28, 2021 at 9:13 AM Bruce D'Arcus  wrote:

> Titus' second question got lost a bit, but does anyone have an answer?
>
> I have the same issue, but was thinking clicking should run
> org-open-at-point.
>
> I know some other people do get clickable links, so am wondering if
> it's a config issue?
>
> On Sun, Jul 25, 2021 at 10:47 AM Titus von der Malsburg
>  wrote:
>
> > 2. The oc-basic processor makes citations look like clickable links
> (blue, underlined, mouse pointer changes to finger), but when I click on
> them, nothing happens.  I can only follow a references via
> `org-open-at-point'.  It would be good to make citations clickable.  I also
> suggest allowing users to follow links via C-c C-c which currently doesn’t
> do anything on citations.  The other obvious action that C-c C-c could
> trigger would be `org-cite-insert'.  Not sure what’s better.
>
>


Re: org-cite-list-bibliography-files

2021-07-28 Thread Bruce D'Arcus
Titus' second question got lost a bit, but does anyone have an answer?

I have the same issue, but was thinking clicking should run org-open-at-point.

I know some other people do get clickable links, so am wondering if
it's a config issue?

On Sun, Jul 25, 2021 at 10:47 AM Titus von der Malsburg
 wrote:

> 2. The oc-basic processor makes citations look like clickable links (blue, 
> underlined, mouse pointer changes to finger), but when I click on them, 
> nothing happens.  I can only follow a references via `org-open-at-point'.  It 
> would be good to make citations clickable.  I also suggest allowing users to 
> follow links via C-c C-c which currently doesn’t do anything on citations.  
> The other obvious action that C-c C-c could trigger would be 
> `org-cite-insert'.  Not sure what’s better.



Re: org-cite-list-bibliography-files

2021-07-26 Thread John Kitchin
I think it should work like setting header args on src-blocks, where
there is a hierarchy that the most local setting always overrides the
less local setting, described at 
https://orgmode.org/manual/Using-Header-Arguments.html.

This gives you the opportunity for system wide args, e.g. a global set
of bib files via a variable setting,

file-level options via keyword settings

header-level options via property settings

src-block level options

For bibliographies, it is only necessary to go to file-level I think.

Bruce D'Arcus  writes:

> Hi Greg,
>
> On Mon, Jul 26, 2021 at 1:56 AM Greg Minshall  wrote:
>
>> is a reasonable approach: if local, use just that; if no local, use
>> global (if it exists).
>>
>> then, the "alternative" might be: use both local and global?
>
> That should be the default.
>
> But as Emmanual noted last week, there are cases where one might want
> to combine them.
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2021-07/msg00495.html
>
> It's just not the common case.
>
> Bruce


--
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
Pronouns: he/him/his



Re: org-cite-list-bibliography-files

2021-07-26 Thread Eric S Fraga
On Sunday, 25 Jul 2021 at 15:36, Titus von der Malsburg wrote:
> Personally, I can’t think of a use case where you would like to use a
> mix of multiple bibliographies, local and global, 

I do do this often.  I'm not sure why but I tend to have a local
bibliography which I add to as I am writing a paper.  When I am finished
with the paper, I then usually merge all the entries in the local
bibliography into my global bibliography.  But, as I said, I don't know
why I got into the habit of doing this... ;-)

But I don't particularly care which way org decides to handle multiple
bibliographies as I will adapt.

-- 
: Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-598-g604bfd
: Latest paper written in org: https://arxiv.org/abs/2106.05096



Re: org-cite-list-bibliography-files

2021-07-26 Thread Bruce D'Arcus
Hi Greg,

On Mon, Jul 26, 2021 at 1:56 AM Greg Minshall  wrote:

> is a reasonable approach: if local, use just that; if no local, use
> global (if it exists).
>
> then, the "alternative" might be: use both local and global?

That should be the default.

But as Emmanual noted last week, there are cases where one might want
to combine them.

https://lists.gnu.org/archive/html/emacs-orgmode/2021-07/msg00495.html

It's just not the common case.

Bruce



Re: org-cite-list-bibliography-files

2021-07-25 Thread Greg Minshall
Bruce,

from the outside here.  just wondering.

> Maybe this should be flipped, so we can still have the flexibility to
> combine both, but default is local has precedence?
> 
> So in other words, one has to explicitly turn on the global
> bibliography locally.
> 
> org-cite-global-bibliography: t

is a reasonable approach: if local, use just that; if no local, use
global (if it exists).

then, the "alternative" might be: use both local and global?

cheers, Greg



Re: org-cite-list-bibliography-files

2021-07-25 Thread Bruce D'Arcus
On Sun, Jul 25, 2021 at 11:36 AM Titus von der Malsburg
 wrote:

> Sure, that’s always possible.  However, my suspicion is that users in the 
> majority of cases want /just/ the local bibliography when they specify one.  
> If true, a better default would be to only return the local bibliography.  
> Personally, I can’t think of a use case where you would like to use a mix of 
> multiple bibliographies, local and global, especially where there is no way 
> to see from which bibliography each entry is coming.  What about duplicates, 
> for instance, i.e. entries that exist in multiple bibliographies?

Maybe this should be flipped, so we can still have the flexibility to
combine both, but default is local has precedence?

So in other words, one has to explicitly turn on the global
bibliography locally.

org-cite-global-bibliography: t

Bruce



Re: org-cite-list-bibliography-files

2021-07-25 Thread Titus von der Malsburg


On 2021-07-25 Sun 17:14, Bruce D'Arcus wrote:
> On Sun, Jul 25, 2021 at 10:47 AM Titus von der Malsburg
>  wrote:
>>
>>
>> Hi,
>>
>> I’m starting to learn about org’s new capabilities for citations and 
>> bibliographies.  Exciting, and great work!
>>
>> Two suggestions/requests:
>>
>> 1. `org-cite-list-bibliography-files' returns the bibliographies defined 
>> locally and the globally defined bibliographies together.  I propose to only 
>> list the local bibliographies, if defined, and to return the global 
>> bibliographies otherwise.  I think the user needs a way to override the 
>> global setting if necessary.  For example, when I work on a manuscript, I’d 
>> like to use that manuscript’s dedicated bibliography, but ignore my global 
>> bibliography.  It’s very common to work with dedicated bibliographies IME, 
>> and the UI of oc-basic doesn’t show from which bibliography an entry is 
>> coming.  So there’s no way to reliably select entries from just the 
>> dedicated/local bibliography.
>
> There was a thread here last week on this, and we realized that one
> can already override this behavior.
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2021-07/msg00499.html
>
> # Local Variables:
> # org-cite-global-bibliography: nil
> # End:

Sure, that’s always possible.  However, my suspicion is that users in the 
majority of cases want /just/ the local bibliography when they specify one.  If 
true, a better default would be to only return the local bibliography.  
Personally, I can’t think of a use case where you would like to use a mix of 
multiple bibliographies, local and global, especially where there is no way to 
see from which bibliography each entry is coming.  What about duplicates, for 
instance, i.e. entries that exist in multiple bibliographies?

  Titus




Re: org-cite-list-bibliography-files

2021-07-25 Thread Bruce D'Arcus
On Sun, Jul 25, 2021 at 10:47 AM Titus von der Malsburg
 wrote:
>
>
> Hi,
>
> I’m starting to learn about org’s new capabilities for citations and 
> bibliographies.  Exciting, and great work!
>
> Two suggestions/requests:
>
> 1. `org-cite-list-bibliography-files' returns the bibliographies defined 
> locally and the globally defined bibliographies together.  I propose to only 
> list the local bibliographies, if defined, and to return the global 
> bibliographies otherwise.  I think the user needs a way to override the 
> global setting if necessary.  For example, when I work on a manuscript, I’d 
> like to use that manuscript’s dedicated bibliography, but ignore my global 
> bibliography.  It’s very common to work with dedicated bibliographies IME, 
> and the UI of oc-basic doesn’t show from which bibliography an entry is 
> coming.  So there’s no way to reliably select entries from just the 
> dedicated/local bibliography.

There was a thread here last week on this, and we realized that one
can already override this behavior.

https://lists.gnu.org/archive/html/emacs-orgmode/2021-07/msg00499.html

# Local Variables:
# org-cite-global-bibliography: nil
# End:

Bruce



org-cite-list-bibliography-files

2021-07-25 Thread Titus von der Malsburg


Hi,

I’m starting to learn about org’s new capabilities for citations and 
bibliographies.  Exciting, and great work!

Two suggestions/requests:

1. `org-cite-list-bibliography-files' returns the bibliographies defined 
locally and the globally defined bibliographies together.  I propose to only 
list the local bibliographies, if defined, and to return the global 
bibliographies otherwise.  I think the user needs a way to override the global 
setting if necessary.  For example, when I work on a manuscript, I’d like to 
use that manuscript’s dedicated bibliography, but ignore my global 
bibliography.  It’s very common to work with dedicated bibliographies IME, and 
the UI of oc-basic doesn’t show from which bibliography an entry is coming.  So 
there’s no way to reliably select entries from just the dedicated/local 
bibliography.

2. The oc-basic processor makes citations look like clickable links (blue, 
underlined, mouse pointer changes to finger), but when I click on them, nothing 
happens.  I can only follow a references via `org-open-at-point'.  It would be 
good to make citations clickable.  I also suggest allowing users to follow 
links via C-c C-c which currently doesn’t do anything on citations.  The other 
obvious action that C-c C-c could trigger would be `org-cite-insert'.  Not sure 
what’s better.

  Titus