From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id aWjADG6D32AWZQAAgWs5BA (envelope-from ) for ; Fri, 02 Jul 2021 23:21:50 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IlLYB26D32BeJQAAB5/wlQ (envelope-from ) for ; Fri, 02 Jul 2021 21:21:50 +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 6B8C9A001 for ; Fri, 2 Jul 2021 23:21:49 +0200 (CEST) Received: from localhost ([::1]:45680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzQbc-0000LC-GA for larch@yhetil.org; Fri, 02 Jul 2021 17:21:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzQbA-0000C3-MH for emacs-orgmode@gnu.org; Fri, 02 Jul 2021 17:21:20 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:59661) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzQb8-0006ge-FU for emacs-orgmode@gnu.org; Fri, 02 Jul 2021 17:21:20 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id B949420004; Fri, 2 Jul 2021 21:21:13 +0000 (UTC) From: Nicolas Goaziou To: John Kitchin Subject: Re: [wip-cite-new] Quick note about citation insertion References: <87r1ggu25x.fsf@nicolasgoaziou.fr> <877di8tqw9.fsf@nicolasgoaziou.fr> Date: Fri, 02 Jul 2021 23:21:12 +0200 In-Reply-To: (John Kitchin's message of "Fri, 2 Jul 2021 17:05:50 -0400") Message-ID: <87wnq8s987.fsf@nicolasgoaziou.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=217.70.183.200; envelope-from=mail@nicolasgoaziou.fr; helo=relay7-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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 , Bruce D'Arcus 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=1625260909; 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; bh=nbHHckW6GPTKrGD1tTi4j08eSo7hcaAjHmqAAfsL91E=; b=LpR/XuiFRyPzzhZWASX9wsxNb/DzZYeMgpVA8t3wB6R2MEVhmQ0KG2jRoX9m55/otPSMKI OCsIDJwLMGnu/hpoehHDCmZMr15QgE3bdAnDtmLRZyGqydfvZruFMyAGY8fKlJaHWKhvr7 F9EuaiE9gxWhDJC7ZaiD1iq0CoFPr/xLiua7+/JWLaEe3hnH8a5cI1FTM6ZSxF5FzwVLgv DLuh0+b1rKSQxlHT7xkY6AteO5TqYYTb11mRepUQmkHmZuiRzx0kvfNowGwVSXlVfneQVm B7P1wGYgl+VlXRZOGKjxRwguakBBudhm//8CrpnYlh5G4HG0B4YSyrAKx9slrw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625260909; a=rsa-sha256; cv=none; b=EngL+0rrVSfVS2iWJuES8yQnBuqd96+va+FOci6u2BeV9mtGgRM4Yce3VfocDr+koM+goQ Zde5Fho45lJ8tXoVyX2uBLKcIy0UtE9iyXvMK9SIMEmY0x1p02g23M4Mo78PLLw5RWnwXb KJVb3nV1ArgdEuXuyH3iV5uWJIuE0hZrNbITRNQ9Yu4lK051st/w3SnbvuJy1W5vyqO/k2 uGNAeb6mQGmGplCMmrpyw7jm+Yi0fIHnKsa2LO9uMj6kfQA+2eThMDQD7jc9/baowxXJyO khzSHe4NBjkKD6DpY477fEsaLtLKZHKld73D2h/wY28H48aMBmmTaXJdb1lAnQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=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-Spam-Score: -2.41 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=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: 6B8C9A001 X-Spam-Score: -2.41 X-Migadu-Scanner: scn0.migadu.com X-TUID: 5PpOtRp5P13F 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, if there's a reference at point, the function updates it, which I think is also a valid behaviour. On other parts of the citation, the function updates its style. Styling the citation is probably less important than adding a reference. So I could use C-u for the style, and append a reference when point is not on one of them already. However, I'm not designing a canonical way to handle citations here. Any library (e.g., Org Ref *hint*) is free to use the :insert property and provide a different implementation. Then, for example, (setq org-cite-insert-processor 'org-ref) will be enough to have it occupy the binding :) Regards, -- Nicolas Goaziou