From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id rAkJEg0s4GChGwAAgWs5BA (envelope-from ) for ; Sat, 03 Jul 2021 11:21:17 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SJsoDQ0s4GD8OgAAbx9fmQ (envelope-from ) for ; Sat, 03 Jul 2021 09:21:17 +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 84F0A18B20 for ; Sat, 3 Jul 2021 11:21:16 +0200 (CEST) Received: from localhost ([::1]:56922 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lzbpr-0003km-2e for larch@yhetil.org; Sat, 03 Jul 2021 05:21:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzbpT-0003ke-7M for emacs-orgmode@gnu.org; Sat, 03 Jul 2021 05:20:51 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:45277) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lzbpP-0005Rq-PU for emacs-orgmode@gnu.org; Sat, 03 Jul 2021 05:20:51 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay10.mail.gandi.net (Postfix) with ESMTPSA id E99F6240002; Sat, 3 Jul 2021 09:20:43 +0000 (UTC) From: Nicolas Goaziou To: "Bruce D'Arcus" Subject: Re: [wip-cite-new] Quick note about citation insertion References: <87r1ggu25x.fsf@nicolasgoaziou.fr> <87eecgtral.fsf@nicolasgoaziou.fr> Date: Sat, 03 Jul 2021 11:20:43 +0200 In-Reply-To: (Bruce D'Arcus's message of "Sat, 3 Jul 2021 04:45:46 -0400") Message-ID: <87fswvsqhg.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.178.230; envelope-from=mail@nicolasgoaziou.fr; helo=relay10.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_H3=0.001, RCVD_IN_MSPIKE_WL=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 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=1625304076; 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=gN+0yXwOTkq0Emk4sGdMF/zaDxryOKEsckda8d+ncpE=; b=GoxkidoaS+dgpRInYImxkF5bbqmM9JWcFbk7YI/Wi0FVjqwxXkULnXcxt8Y1VzBzGEG9n4 UN6F6JPm/JZnNpZqa7kxKhdHYdI4HKh3IHzTviwaE8C0UDlyTaaeeMuzosEjejP8m5fTh3 BlCyMcakupBnwk6yZPD9ilMxE6465x8ZPoKTSRed7D0NL7VlUVqEwAq567Su9jUY7Iip5E 8IkgWE8c7kA2JbrFqeA/HMfInoSUN60gRYsVyS8G5bmdgbh3ZU6JRX+8WyeA5a0Ja0s9JR GFcLROgP/tEVIOhcG6/CNx1tDF3GEjSYLk/2KVzYemjSZOFc/MsjWtCqVr/p2w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625304076; a=rsa-sha256; cv=none; b=eu0wSgmeDnp7srVsVFLEHuov+X4V0JIlbim7ChlSK8WwcC2vq8oA390yd9JL5Srfq/6q+j DarjKuYzpZqi3fm/sK8XALxsGNmGJJOM2kxMMTomWmc0L7Q/1v5jYD6JlwhUoTXCQv2MNn C8UGuYHZYPa3uDtfZC6/lJ8uirBpVlf028blRDA1OWUDUafNKsommUsV02vt8ojf79oR59 p5/rlDPwowMI1nA/vuAu2ldcM0AkR70Axkr7N0BnT7E/cCHVECPV65kc56kMovXrKYhKV4 G2DtE82x9VdJAeMKPxS5h4igqKYyvZrADQSMzVXCUnsPFzV5M7fYfTDXKD6ddA== ARC-Authentication-Results: i=1; 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-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: 84F0A18B20 X-Spam-Score: -2.41 X-Migadu-Scanner: scn1.migadu.com X-TUID: NSWw0rT3P3Fd 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: > > 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 Selectrum and `completing-read-default'. I assume this is the same on other completion frameworks. > In my formatting function for OC, which is simpler than your's in some > ways, I have a named "default" style, with that as the > ido-completing-read "initial-value", which is then removed if > selected. > > In practice, what that means is if the user is prompted for the style > but hits return, they select "default", and hence the result is > "[cite:@key]". Your "default" is equivalent to my empty string. But one day, an export processor may use "default" as a name for a different style. Who knows? Moreover, "default" may be ambiguous: does it mean user's or processor's default style? More importantly, we have to deal with the empty string anyway; this is a valid return value from `completing-read'. > Second, the "nil" vs "empty" distinction was obviously not immediately > intuitive to me. I don't have a better name for "nil" ATM though, so > maybe it will be fine. Hopefully people won't have the need to use it > much. Both are necessary. At some point, this will have to be documented. Regards, -- Nicolas Goaziou