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 WDdlH+y2gmEjwQAAgWs5BA (envelope-from ) for ; Wed, 03 Nov 2021 17:21:00 +0100 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 aI74Guy2gmGPKAAAbx9fmQ (envelope-from ) for ; Wed, 03 Nov 2021 16:21:00 +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 279171D35C for ; Wed, 3 Nov 2021 17:21:00 +0100 (CET) Received: from localhost ([::1]:49396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1miJ0V-0005fu-5X for larch@yhetil.org; Wed, 03 Nov 2021 12:20:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49140) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miIzf-0005dZ-H7 for emacs-orgmode@gnu.org; Wed, 03 Nov 2021 12:20:07 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:45719) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1miIzd-00053N-Ap for emacs-orgmode@gnu.org; Wed, 03 Nov 2021 12:20:07 -0400 Received: (Authenticated sender: admin@nicolasgoaziou.fr) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id DEA0120013; Wed, 3 Nov 2021 16:20:01 +0000 (UTC) From: Nicolas Goaziou To: Emmanuel Charpentier Subject: Re: [PATCH] c-csl : accept relative CSL filenames References: <923e51a09367741650c05692009e00ae913a28d3.camel@free.fr> Date: Wed, 03 Nov 2021 17:19:56 +0100 In-Reply-To: <923e51a09367741650c05692009e00ae913a28d3.camel@free.fr> (Emmanuel Charpentier's message of "Tue, 19 Oct 2021 20:24:22 +0200") Message-ID: <87bl31tdn7.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.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode 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=1635956460; 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=0bDHqxUvgMAOna0O2xWbvQ2r278G/wYxJ0SPEInuBtI=; b=NKA34mo89ppLR4puD4JqvKg3jU90+zI0bapmKufRRaIUBU+XUt/ciQNWgeSZ3S+WRsvZiN 5uYdp7GWfjZCdb6F2Sy7i6T/8ZW38PZLpox0yz8aQJxYMJTfPYSibOHZ63AjCIf9LrywE6 9ZovwgvekUl5m8SBSAyIAxjLHUd9sBB0c+9uyBfiFyf/LlWVFDOiDU3AJlCWojg3fD/ut9 IMRoVpoXL0BKi+db8N16+A2RKHsPt0+XDIRaIebdkMvhLr2cnQmM78bVAugX/ScX45SXMs IN9dUoCX7R/yWIsXHJRdr0nCzVrjZKOH+ABD9/YjJN+8jn54ZnsmhcAZIEq7Ew== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1635956460; a=rsa-sha256; cv=none; b=pPQqrwhGpVJPibWewFZvqLEvydELWHclmyr/NsTu5A1yxCp1y+zFP8azUXTZCstwaKuYLF MPYyVxfW4mOAP9s7wOyMmHS1eNkp9zR8tsWiPTUhOzLRDHKj6EXaqMQ7AUo/VS8AuyOpXf O3g7WRP82ZYLddVZU5DNWhpU9QP0IeIWFsCbnTSbINAUfY2++ANI+xpKmiWDeOdhRvwl5C BpspWF/SSl4CCDLQBHtsOSzfhKne97Cd5ifIvQ8kulH0s3hZejjwM03tghQN64OfnZsSen N+tD6kt4WIe7K+m7qGtcLJo+MSaFP8q6Edeq4t3+UV+Ww1+3/Q9/xpkLAFfv2w== 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.42 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: 279171D35C X-Spam-Score: -2.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: LF518HPv1vRc Hello, Emmanuel Charpentier writes: > This (minuscule) patch allows to pass a relative (to the buffer's > default directory) file name to denote the CSL style file. Thank you. However, I'm not sure to understand the purpose of the patch. > Rationale : this allows the use of "one-of" styles for "one-of" > projects without overloading a defailt CSL style directory (which may > or may not exist on a given system : think JabRef users...). Also > useful for hacked CSL files specific to a given project. If we expand every relative file name from `default-directory', what happens to `org-cite-csl-styles-dir'? Your patch makes this variable useless, doesn't it? What about using a local `org-cite-csl-styles-dir' instead, using file-local variables? > + ((and (pred (lambda (x) > + (let ((fn (expand-file-name x default-directory))) > + (if (file-exists-p fn) fn nil)))) file) file) This pattern returns the relative file name, not the expanded one. It may not be what you want. Regards, -- Nicolas Goaziou