Re: [wip-cite-new] Quick note about citation insertion

2021-09-26 Thread Bastien
Hi all, I'm marking the upstream bug as closed - feel free to resubmit it if I misread the thread. Thanks, -- Bastien

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Eric S Fraga
Thank you for both the links and the suggestions! Very helpful. I will start playing. :-) -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-579-gfdb98a : Latest paper written in org: https://arxiv.org/abs/2106.05096

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Bruce D'Arcus
On Thu, Jul 8, 2021 at 7:46 AM Nicolas Goaziou wrote: > In this situation, the function I want to encourage re-using is > `org-cite-supported-styles'. `org-cite-basic--complete-style' is so > trivial that I didn't bother exporting it. Okay, I see now. So `org-cite-supported-styles' returns what

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Bruce D'Arcus
On Thu, Jul 8, 2021 at 8:48 AM Eric S Fraga wrote: > ... I have lost track of what is going on in the emacs-sphere > when it comes to completion frameworks. I use ivy/counsel. Is there > somewhere a good summary of the state of play? Would I wish to move to > another framework? You're not the

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Eric S Fraga
On Thursday, 8 Jul 2021 at 07:41, Bruce D'Arcus wrote: > This was very helpful, so I just added a commit making use of it. > > https://github.com/bdarcus/bibtex-actions#org-cite Bruce, this looks very good. I know this is potentially off-topic for this list (not completely: searching for refere

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Bruce D'Arcus
On Thu, Jul 8, 2021 at 7:46 AM Nicolas Goaziou wrote: > In this situation, the function I want to encourage re-using is > `org-cite-supported-styles'. `org-cite-basic--complete-style' is so > trivial that I didn't bother exporting it. OK, I'll take a closer look at that. Bruce

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Nicolas Goaziou
"Bruce D'Arcus" writes: > Just a little thing: > > Why is it: > > org-cite-basic--complete-style > > ... rather than: > > org-cite-basic-complete-style > > I thought you would want to encourage reuse of that one, in > particular? In this situation, the function I want to encourage re-using is `o

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Nicolas Goaziou
Hello, "Bruce D'Arcus" writes: > On Wed, Jul 7, 2021 at 6:59 PM Nicolas Goaziou wrote: > >> For a developer, there are now two ways to create an insert processor. >> >> 1. If you are happy with the global behaviour of "basic", but want to >>improve completion, I added the `org-cite-make-ins

Re: [wip-cite-new] Quick note about citation insertion

2021-07-08 Thread Bruce D'Arcus
On Wed, Jul 7, 2021 at 6:59 PM Nicolas Goaziou wrote: > For a developer, there are now two ways to create an insert processor. > > 1. If you are happy with the global behaviour of "basic", but want to >improve completion, I added the `org-cite-make-insert-processor' >tool. This was very

Re: [wip-cite-new] Quick note about citation insertion

2021-07-07 Thread Bruce D'Arcus
On Wed, Jul 7, 2021 at 6:59 PM Nicolas Goaziou wrote: > For a developer, there are now two ways to create an insert processor. > > 1. If you are happy with the global behaviour of "basic", but want to >improve completion, I added the `org-cite-make-insert-processor' >tool. Just a little

Re: [wip-cite-new] Quick note about citation insertion

2021-07-07 Thread Nicolas Goaziou
Hello, "Bruce D'Arcus" writes: > Nicolas - I saw you pushed some changes, per the discussion. Hey, that was a surpriseĀ ! ;) So, here's an update. Now "oc-basic" provides a reasonable experience for inserting references in a document. It also supports both CSL and BibTeX bibliographies. Therefo

Re: [wip-cite-new] Quick note about citation insertion

2021-07-06 Thread Bruce D'Arcus
On Sat, Jul 3, 2021 at 3:58 AM Nicolas Goaziou wrote: > Anyway, I'll try to provide something a little more useful out of the > box, based on your comment and Bruce D'Arcus suggestion. Nicolas - I saw you pushed some changes, per the discussion. First, my initial thought is the behavior at poin

Re: [wip-cite-new] Quick note about citation insertion

2021-07-05 Thread Eric S Fraga
On Saturday, 3 Jul 2021 at 11:09, Bruce D'Arcus wrote: > On Sat, Jul 3, 2021 at 10:58 AM Eric S Fraga wrote: >> But that's partly why I mentioned ivy-bibtex: solutions already exist >> and there should be no need to re-invent the wheel? > > I kind of disagree. > > There's a middle ground between

Re: [wip-cite-new] Quick note about citation insertion

2021-07-03 Thread Bruce D'Arcus
On Sat, Jul 3, 2021 at 10:58 AM Eric S Fraga wrote: > > Anyway, I'll try to provide something a little more useful out of the > > box, based on your comment and Bruce D'Arcus suggestion. > > But that's partly why I mentioned ivy-bibtex: solutions already exist > and there should be no need to re-

Re: [wip-cite-new] Quick note about citation insertion

2021-07-03 Thread Eric S Fraga
On Saturday, 3 Jul 2021 at 09:58, Nicolas Goaziou wrote: > My tongue in cheek answer was about the weakness of the Org Cite > _Basic_ library. [...] I was merely pointing out that this is not the > scope of the demo for the interface I wrote. Ah ha, there was indeed a basic conceptual misunders

Re: [wip-cite-new] Quick note about citation insertion

2021-07-03 Thread Bruce D'Arcus
On Sat, Jul 3, 2021 at 5:20 AM Nicolas Goaziou wrote: > > First, after adding a style, I can't see how to subsequently remove it > > using this interface, to just have "[cite:@key]". Is that possible? > > Of course. Just select the empty string instead of an entry. It is done > with C-j on Select

Re: [wip-cite-new] Quick note about citation insertion

2021-07-03 Thread Nicolas Goaziou
Hello, "Bruce D'Arcus" writes: > On Fri, Jul 2, 2021 at 4:05 PM Nicolas Goaziou wrote: >> That's expected. "nil" is the name of the processor's fall-back style, >> ignoring any inheritance. It is different from the empty style (""), >> which takes into account inheritance. > > Two things: > >

Re: [wip-cite-new] Quick note about citation insertion

2021-07-03 Thread Bruce D'Arcus
On Fri, Jul 2, 2021 at 4:05 PM Nicolas Goaziou wrote: > "Bruce D'Arcus" writes: > > If I select that, "nil" is added to the citation, so that the result > > is "[cite/nil:@key]". > > That's expected. "nil" is the name of the processor's fall-back style, > ignoring any inheritance. It is differe

Re: [wip-cite-new] Quick note about citation insertion

2021-07-03 Thread Nicolas Goaziou
Hello, Eric S Fraga writes: > On Saturday, 3 Jul 2021 at 00:33, Nicolas Goaziou wrote: >> If you have so many keys, you shouldn't be using Org Cite Basics in the >> first place! > I think there's a conceptual misunderstanding here [...] > My bibliography database contains thousands of entrie

Re: [wip-cite-new] Quick note about citation insertion

2021-07-03 Thread Eric S Fraga
On Saturday, 3 Jul 2021 at 00:33, Nicolas Goaziou wrote: > If you have so many keys, you shouldn't be using Org Cite Basics in the > first place! Nicolas, I think there's a conceptual misunderstanding here (and it could be mine, of course). My bibliography database contains thousands of entries

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Bruce D'Arcus
On Fri, Jul 2, 2021 at 5:21 PM Nicolas Goaziou wrote: > > Hello, > > John Kitchin writes: > > > I would not use a prefix arg here. you should just check what is at the > > point, and if it is a citation then append it after the citation at point, > > and if not insert a new one (maybe after movin

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Bruce D'Arcus
On Fri, Jul 2, 2021 at 6:33 PM Nicolas Goaziou wrote: > The completion table, if required, and the completion mechanism belong > to the insert function. So, you can plug anything you want. You're right. It is likely less work, with better results, for me to adapt what you do with the basic inse

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Nicolas Goaziou
"Bruce D'Arcus" writes: > On Fri, Jul 2, 2021, 5:48 PM Nicolas Goaziou wrote: > Rather than just completing the key, how about something like: > > ("title author date" . "key") > > E.g. look up against the data, and return the key. Well, I guess it's possible to do. Patches welcome! > > It's h

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Bruce D'Arcus
On Fri, Jul 2, 2021, 5:48 PM Nicolas Goaziou wrote: > "Bruce D'Arcus" writes: > > > BTW, you may already be thinking this, but you may as well add completion > > from the files registered with OC at this point. :-) > > > > Only having the completion table populated with in-document keys won't be

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Nicolas Goaziou
"Bruce D'Arcus" writes: > BTW, you may already be thinking this, but you may as well add completion > from the files registered with OC at this point. :-) > > Only having the completion table populated with in-document keys won't be > very useful, particularly in a new document. The completion t

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Nicolas Goaziou
Hello, John Kitchin writes: > I would not use a prefix arg here. you should just check what is at the > point, and if it is a citation then append it after the citation at point, > and if not insert a new one (maybe after moving the point to an appropriate > place if needed). Well, currently, i

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread John Kitchin
I would not use a prefix arg here. you should just check what is at the point, and if it is a citation then append it after the citation at point, and if not insert a new one (maybe after moving the point to an appropriate place if needed). John --- Professor Jo

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Bruce D'Arcus
On Fri, Jul 2, 2021, 4:14 PM Nicolas Goaziou wrote: > "Bruce D'Arcus" writes: > > > 1. I don't see a way to add a key to an existing citation. Editing an > > existing key uses completing-read, rather than > > completing-read-multiple (as for a new citation), and places point > > after the existi

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Nicolas Goaziou
"Bruce D'Arcus" writes: > 1. I don't see a way to add a key to an existing citation. Editing an > existing key uses completing-read, rather than > completing-read-multiple (as for a new citation), and places point > after the existing key means the style editing UI will pop up. Indeed, there's n

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Nicolas Goaziou
Hello, "Bruce D'Arcus" writes: > Looking good Nicolas. > > Just one small thing. > > If I run on a citation, I get a list of styles, including "nil". > > If I select that, "nil" is added to the citation, so that the result > is "[cite/nil:@key]". That's expected. "nil" is the name of the proces

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Bruce D'Arcus
Also: 1. I don't see a way to add a key to an existing citation. Editing an existing key uses completing-read, rather than completing-read-multiple (as for a new citation), and places point after the existing key means the style editing UI will pop up. 2. If I use CRM to add multiple keys, for rea

Re: [wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Bruce D'Arcus
Looking good Nicolas. Just one small thing. If I run on a citation, I get a list of styles, including "nil". If I select that, "nil" is added to the citation, so that the result is "[cite/nil:@key]". On Fri, Jul 2, 2021 at 12:11 PM Nicolas Goaziou wrote: > > Hello, > > I just added an interfa

[wip-cite-new] Quick note about citation insertion

2021-07-02 Thread Nicolas Goaziou
Hello, I just added an interface to unify functions responsible for inserting citations in a buffer. The default binding is . I also plugged a rather crude function with that interface. In order to use it, you can evaluate: (setq org-cite-insert-processor 'basic) Internally, this will bind t