From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eDqfDe1/32BKXQAAgWs5BA (envelope-from ) for ; Fri, 02 Jul 2021 23:06:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id iMVTCe1/32D+EAAA1q6Kng (envelope-from ) for ; Fri, 02 Jul 2021 21:06:53 +0000 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 34BDD126A3 for ; Fri, 2 Jul 2021 23:06:52 +0200 (CEST) Received: from localhost ([::1]:59454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzQN7-0006JQ-W8 for larch@yhetil.org; Fri, 02 Jul 2021 17:06:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzQMR-0006IV-3g for emacs-orgmode@gnu.org; Fri, 02 Jul 2021 17:06:07 -0400 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:37659) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lzQMO-0005Jw-3P for emacs-orgmode@gnu.org; Fri, 02 Jul 2021 17:06:06 -0400 Received: by mail-wr1-x42a.google.com with SMTP id i94so13977060wri.4 for ; Fri, 02 Jul 2021 14:06:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tFeYiPxsPVveEEazBzT+YB42dqKMwYJTHgxgIyejSDE=; b=rWXAdCFR3MiTL0pTGL20gmtAWcg96kjeuXxnMg2le0be3iEiXQ8m4poiJ1tkPA9Tiz nl1cAxM6c1iop7F0IW7ghB29IjZ5CYzke8MGDFcZT9RROxvsRTmhMGF6FEgeBvt/hd99 nEeP981hpRPsbQTEfhBXXnQ4vaQhDSelP54/95xbljA9m+mv/ZFwPmXzBx1eBZEA8h+l EK6u7H2kycoqrk41jJ/AOpgN+kc8lx21O1xboOquR95gkuwwInBwXoGqhJCvW6FqujgQ +FRkWU1iD2b+UVUhd3g+TKmOBduODdo59DtOvy3l8kj7z/obOOTVQMHlslglVVcWXn7h A4EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tFeYiPxsPVveEEazBzT+YB42dqKMwYJTHgxgIyejSDE=; b=si7Uc5f2FDqTUPbKcGBuLAO+tq+hY7pwpSsup+5pWGy3Htb+U4hJ3JpwNyhhiE3MDj HYFwLDy0SV4R2nxyTlv8q6q04iLT2FftNgcF5Ode2puj67/fFZqFxwqV+sos9DQVOSDV tAbu0d42uQnDbC1oeaIFWKx/jp0iux1JcyZ66blrpsQdeNaqVheoD6DjScMSn8640C4L 1FXEMtCr+rWNzjwGx8AouLiYSmxMq5SQ8karoNyJiiv0Pt3/0jUWBivoB53bzdU3SjYx rXDtmnRa4Z9TFFM4uisIuzTm50x6XJPX9UAHCKzre9T+oehOpMurK9skoefRFXQbORMA VGgA== X-Gm-Message-State: AOAM533qIE+Mgxsowz9v8sVXBN9bxBPMYvbBB5A5wcQnCMJPC92Zi9jV vQ5sgvFgDxiO59JmYxDyyof+4pf2N3eVD/3fsGo= X-Google-Smtp-Source: ABdhPJyZ0LZNF9SrqR6S3rvjjcDFneyadJCi1yntT40e/65pr56VrEz/j1o7ZOfEK3+R7qCgCTzHtFyiXRdGHfOwX9I= X-Received: by 2002:a5d:410b:: with SMTP id l11mr1693386wrp.173.1625259961668; Fri, 02 Jul 2021 14:06:01 -0700 (PDT) MIME-Version: 1.0 References: <87r1ggu25x.fsf@nicolasgoaziou.fr> <877di8tqw9.fsf@nicolasgoaziou.fr> In-Reply-To: From: John Kitchin Date: Fri, 2 Jul 2021 17:05:50 -0400 Message-ID: Subject: Re: [wip-cite-new] Quick note about citation insertion To: "Bruce D'Arcus" Content-Type: multipart/alternative; boundary="000000000000aed7d005c62a526a" Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=johnrkitchin@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode List , Nicolas Goaziou Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625260012; 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=tFeYiPxsPVveEEazBzT+YB42dqKMwYJTHgxgIyejSDE=; b=Hd9Fmoewq8g2axCoiXo4ZsrsDtN0Wf/qXjTlJxYFZo13cYIq/2zyYRasDUW5hQGtLsF07I Tt4nn0wUQhJdrWv/cTA0CtCO4c1pBrXWJ9yAJjpp0mqN82n7XZlYHSEL5BAJA2mshar2Ma 3ETXET5iHvPen42iAKN/EPSbapVqo7DfYSa9fJyS5NFXngsSSZpkhfk1HyLLVxQiEVUtCD zh6Czqnv0sjb062YfIyo/xBHV9F14KbNjf+tdwCQhhhnPXC3QxLqskbKgPtlLWH5Ym2kcz pETkLvjdyL1dnELf41iXqeUQrBjChrnlXnFLcxDORncfw2lKo6UuY1ayulTn/w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625260012; a=rsa-sha256; cv=none; b=T0cMKhQL+Hn4c8qDkInSOWHKYRs33KHNwmI4wICqIXeZhmeF267Kcs66A1cD+0L0gvH0uD PHiZhUpi1HMPmgJUHzkMHgoL3EwAEUPRPdoBrp9xs+YuTU7VyAsEqVmg8rOZeJtmFVugae ZSdJTpZ7b5x2d5X+do8uw1B3m79qKL37WxTY3+mnJZjzT97R5f6dhwyHqXLBGh6I2QjyLs yPf2EaHP8Fk4SETMWyHPccD6dDR0LWgKs6jZ/Wk4hEguOSUa7RoFoZBcgtXTwo4hVanJ2W h3pQQB27OhQbzfCnQh3rdD4n5IAHnLNPtNVRONuqTnni3KXl+HBtPyiuXiEh4Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=rWXAdCFR; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=rWXAdCFR; dmarc=fail reason="SPF not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 34BDD126A3 X-Spam-Score: -1.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: tP2Qh+Wu+Q3+ --000000000000aed7d005c62a526a Content-Type: text/plain; charset="UTF-8" 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 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 Fri, Jul 2, 2021 at 4:59 PM Bruce D'Arcus wrote: > > > 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 existing key means the style editing UI will pop up. >> >> Indeed, there's no way to add a reference to an existing citation. >> I admit I didn't think about it. What about appending a reference when >> the function is called with C-u? > > > Probably that would work. > > 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. > > If you do, ideally it would be extensible/configurable. > > Or is the latter already the case? > > OTOH, IDK how much you feel the need to get everything done before merger, > or whether some pieces can wait? > > Bruce > > --000000000000aed7d005c62a526a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I would not use a prefix arg here. you should just check w= hat is at the point, and if it is a citation then append it after the citat= ion at point, and if not insert a new one (maybe after moving the point to = an appropriate place if needed).=C2=A0




Joh= n

-----------------------------------
Professor John Kitchin (he/= him/his)
Doherty Hall A207F
Department of Chemical Engineering
Car= negie Mellon University
Pittsburgh, PA 15213
412-268-7803


On Fri, Jul 2, 2021 at 4:59 PM Bruce D'= Arcus <bdarcus@gmail.com> wr= ote:


On Fri, Jul 2, 2021, 4:14 PM Nicolas Goaziou <mail@nicolasgoaziou.fr> = wrote:
"Bru= ce D'Arcus" <bdarcus@gmail.com> 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 no way to add a reference to an existing citation.
I admit I didn't think about it. What about appending a reference when<= br> the function is called with C-u?
=
Probably that would work.

BTW, you may already be thinking this, but yo= u may as well add completion from the files registered with OC at this poin= t. :-)

Only having the c= ompletion table populated with in-document keys won't be very useful, p= articularly in a new document.

If you do, ideally it would be extensible/configurable.

Or is the latter already the case?

OTOH, IDK how much you fe= el the need to get everything done before merger, or whether some pieces ca= n wait?

Bruce

--000000000000aed7d005c62a526a--