From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id KLxCEGIc1WIhkQAAbAwnHQ (envelope-from ) for ; Mon, 18 Jul 2022 10:40:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aHA/EGIc1WLcCAAA9RJhRA (envelope-from ) for ; Mon, 18 Jul 2022 10:40:02 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B8059838C for ; Mon, 18 Jul 2022 10:40:01 +0200 (CEST) Received: from localhost ([::1]:59314 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDMIK-0007Up-Ix for larch@yhetil.org; Mon, 18 Jul 2022 04:40:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58604) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDMHe-0007Ud-Rr for emacs-orgmode@gnu.org; Mon, 18 Jul 2022 04:39:18 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:35751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDMHc-0000Wz-Qv for emacs-orgmode@gnu.org; Mon, 18 Jul 2022 04:39:18 -0400 Received: by mail-lj1-x22c.google.com with SMTP id u14so12775889ljh.2 for ; Mon, 18 Jul 2022 01:39:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=WHEDl2RbqXUYQfevzBt49i12y+dBhqkhWHVJDAW4gdQ=; b=jFobYcABXzu5EBLVubzGP5HIUTpTzCK7PoA89gS36/hZaQSCMSRcgImGWbxlhXeWqL OmrEfseJe0zdn74yjxH5Prp6eRdTIy6CXplzRkPhk+KT2PVrJYA3TswDEgVtiWefGSIs zgrzXJ5RlifXgYXMbs/ec8jGx/wD0bjfxQ4KCRhbGNOoZwq9S4UHPv9o+2tSYu1L+nrH sd8hZ1vbnZVddhwbSg1XCIONwBPagwL3Vd0UbmNsyzRKBaS9v9y8X9mAI7x5Q0kDlYo/ CbzSaTEXRQLFdhtIvLTyw5ov2zxfakbLPCvmjMzW4UyTFpqqXI24lGOcRNn9hNfK9SCy rnJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WHEDl2RbqXUYQfevzBt49i12y+dBhqkhWHVJDAW4gdQ=; b=16UO626/5SRoXFVysn0hKHOXGi+amheEmkk5cubeylDE24dBFyoOppJYVGdDh/t8pA ouIsdg43C0BPELZQM0YihylA3BVZyQ35EHVt0cHSHaA13ESLdBTIJbj1PV3oyOcH1Rvz crxuarlal+lo5J8SpjSyi+V5+fNmODpO1hwkFyDHpk//x4JJIibYxKoDzdXvnqNnjRuV xbBI1r4MYUWdSDSthaZEfmyONtrJB2cSCx8W+NsBKuRbDDiY16rsSBt+6kielqTEfPFj pBBs7Rrw0Z7xhhWSU1e7ZSUxzOFkMITR0F6+ysmYqEZTgRZMNAQ+k1g+8jcsdjZGDP8z 8ycA== X-Gm-Message-State: AJIora9KJ3aSsW5Sf6tBvteQSH0LJThJ4jLGi8T6hlZ6DtmFBYdvVRRw GBAkMCsImtZzw51GOsNuh9mQH80NapzTnGbaV3k= X-Google-Smtp-Source: AGRyM1usWHaEQ4+r21xAg0i8Xg1pQFfCivSqY3iMMFiw32PA5VqpNXB+4d8FipL9JedHD/F1R/CaSw8H2pcMUjXeXwQ= X-Received: by 2002:a2e:9941:0:b0:247:dce8:b0ec with SMTP id r1-20020a2e9941000000b00247dce8b0ecmr12437494ljj.404.1658133554793; Mon, 18 Jul 2022 01:39:14 -0700 (PDT) MIME-Version: 1.0 References: <87pmihurhi.fsf@localhost> <874jzhe7rf.fsf@localhost> <87tu7fi96i.fsf@localhost> In-Reply-To: <87tu7fi96i.fsf@localhost> From: Henrik Frisk Date: Mon, 18 Jul 2022 10:39:03 +0200 Message-ID: Subject: Re: org-cature-ref To: Ihor Radchenko Cc: org-mode-email Content-Type: multipart/alternative; boundary="00000000000086128a05e4104d4a" Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=frisk.h@gmail.com; helo=mail-lj1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658133601; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=WHEDl2RbqXUYQfevzBt49i12y+dBhqkhWHVJDAW4gdQ=; b=r94Cn7x3JChoDF23eAmBWZI+44OEQebw7bLQd1qoMXzJzdCE9WFR73ISiE0Reybm6+TeS/ 8JEu7S93VFjByyesdGwCxdMcmeAbqfY7jvaKam4LaOXhsAzMjPUqkFh5AhojS5DEWkf//R 00NGpJvz4Ad3oaSMv/Zfgm1CHBOjKjWcmUdO6aJia5Bki/qJcdsCrpz8fU2PCCxzkH2F46 ziCIDVkLvvTjc5VHWCLuD9OlmQdtE3Io08DAmzr03GYhlziKj8yoduKNLXT4j6rYALXZj4 gBNaN4WSD1INPP80iS7RaTaEuETWyptUzTmLPWBS2fbRmyjQBcNs+OaqtAavJQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658133601; a=rsa-sha256; cv=none; b=cgWkTxCPGYZcDr0EUvXHe0TQkWF0/bT9iQiH/TqHwix+gP9F7wsIVcHY3FDD7ofArLIzlS Xvy7eCPkhsQCpc3JoSvNw3k59GqX1/RgUb29b89x4g+4u08JW64RJ/rvKOMh8eeH2GvobI /iRzWWttaYlrggJ30pFRjBvzF8ZD2qxTvQRg5mHtabCO3UxWKLelIjcr3l1s5Hcc+U7WEB ltqeo4cc865d26qUFmfqsN4ZmzgIUA61PFlN2smgydcAJO7IF+6Ozm5zJVRSgdi0SvX39W Hw1hUx3kfyDXyUvb7ZX96y+E9Wp1NNOPnQ5+Wj12nHZhNe+bvYJaa+h/LMJJvw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jFobYcAB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -5.53 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jFobYcAB; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: B8059838C X-Spam-Score: -5.53 X-Migadu-Scanner: scn0.migadu.com X-TUID: mg95icRu5pEe --00000000000086128a05e4104d4a Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Den m=C3=A5n 18 juli 2022 kl 01:56 skrev Ihor Radchenko : > Henrik Frisk writes: > > >> Could you please provide a bit more details on what you did, what you > >> expected to get, and what you got? > >> > >> Yes, of course! > > > > I saw in another thread recently that you had the bibtex captured as a > code > > block (begin_src bibtex) which I wasn't able to get. In the documentati= on > > at https://github.com/yantar92/org-capture-ref#org819faa2 it says: > > > > "Alternatively it is possible to use org-capture-ref-get-bibtex-field t= o > > get metadata directly (:bibtex-string field will contain formatted BiBT= eX > > entry). > > > > This, I thought, was the way to achieve this. What I get is: > > > > :BOOKMARK:misc: > > :PROPERTIES: > > :TITLE: Something > > :BTYPE: misc > > :ID: Something_org_captur_ref_extrac_9c0 > > :AUTHOR: someone > > :CREATED: [2022-07-12 tis 17:26] > > :HOWPUBLISHED: Github > > :NOTE: Online; accessed 12 juli 2022 > > :RSS: https://something.org > > :URL: https://something.org > > :END: > > Did you try to customize org-capture-ref-capture-template? > > Its default template is > > "%{fetch-bibtex}* TODO %?%{space}%{org-entry}" > "%{extra}" > > %{org-entry} part is responsible for generating property drawer via > org-capture-ref-headline-format-function. > > If you prefer adding bibtex directly, you may want something like > > "%{fetch-bibtex}* TODO %?%(org-capture-ref-get-bibtex-field :title)" > "#+begin_src bibtex" > "%(org-capture-ref-get-bibtex-field :bibtex)" > "#+end_src bibtex" > > That's what I was trying to do, but now it works! This is really brilliant, thank you! Note: it should be: "%(org-capture-ref-get-bibtex-field :bibtex-string)" in the above example. A couple of questions more: 1. In the examples at the beginning of the project's github you have examples that have a combination of prperties and bibtex source, with preperties such as ID and CREATED. These could be helpful but I can't figure out how to add them with my limited knowledge. 2. When you write that there is support for Google Scholar "BiBTeX page", what do you mean? In a Google scholar search, if I click "Cite" and then choose BiBTeX, I don't get the expected result, but maybe you are referring to something else? Again, thank you. This will make my life easier! /henrik --00000000000086128a05e4104d4a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
Den m=C3=A5n 18 juli 2022 kl 01:56 sk= rev Ihor Radchenko <yantar92@gmail= .com>:
He= nrik Frisk <frisk= .h@gmail.com> writes:

>> Could you please provide a bit more details on what you did, what = you
>> expected to get, and what you got?
>>
>> Yes, of course!
>
> I saw in another thread recently that you had the bibtex captured as a= code
> block (begin_src bibtex) which I wasn't able to get. In the docume= ntation
> at https://github.com/yantar92/org-captur= e-ref#org819faa2 it says:
>
> "Alternatively it is possible to use org-capture-ref-get-bibtex-f= ield to
> get metadata directly (:bibtex-string field will contain formatted BiB= TeX
> entry).
>
> This, I thought, was the way to achieve this. What I get is:
>
> :BOOKMARK:misc:
> :PROPERTIES:
> :TITLE:=C2=A0 =C2=A0 Something
> :BTYPE:=C2=A0 =C2=A0 misc
> :ID:=C2=A0 =C2=A0 =C2=A0 =C2=A0Something_org_captur_ref_extrac_9c0
> :AUTHOR:=C2=A0 =C2=A0someone
> :CREATED:=C2=A0 [2022-07-12 tis 17:26]
> :HOWPUBLISHED: Github
> :NOTE:=C2=A0 =C2=A0 =C2=A0Online; accessed 12 juli 2022
> :RSS:=C2=A0 =C2=A0 =C2=A0 https://something.org
> :URL:=C2=A0 =C2=A0 =C2=A0 =C2=A0https://something.org
> :END:

Did you try to customize org-capture-ref-capture-template?

Its default template is

"%{fetch-bibtex}* TODO %?%{space}%{org-entry}"
"%{extra}"

%{org-entry} part is responsible for generating property drawer via
org-capture-ref-headline-format-function.

If you prefer adding bibtex directly, you may want something like

"%{fetch-bibtex}* TODO %?%(org-capture-ref-get-bibtex-field :title)&qu= ot;
"#+begin_src bibtex"
"%(org-capture-ref-get-bibtex-field :bibtex)"
"#+end_src bibtex"

That's what I was trying to do, but now it works!= This is really brilliant, thank you!
Note: it should be:
=
"%(org-capture-ref-get-bibtex-field :bibtex-string)&quo= t;

in the above example.

A couple of questions mor= e:

1. In the exampl= es at the beginning of the project's=C2=A0 github you have examples tha= t have a combination of prperties and bibtex source, with preperties such a= s ID and CREATED. These could be helpful but I can't figure out how to = add them with my limited knowledge.
2. When you write that there = is support for Google Scholar "BiBTeX page", what do you mean? In= a Google scholar search, if I click "Cite" and then choose BiBTe= X, I don't get the expected result, but maybe you are referring to some= thing else?

Again, thank you. This will make my li= fe easier!

/henrik
--00000000000086128a05e4104d4a--