From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eH5WOl9whWFqtQAAgWs5BA (envelope-from ) for ; Fri, 05 Nov 2021 18:56:47 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 0F7mNV9whWHgSQAAB5/wlQ (envelope-from ) for ; Fri, 05 Nov 2021 17:56:47 +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 83F9B195C7 for ; Fri, 5 Nov 2021 18:56:47 +0100 (CET) Received: from localhost ([::1]:34382 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mj3SI-0001gz-Kv for larch@yhetil.org; Fri, 05 Nov 2021 13:56:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56714) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj3Rr-0001gf-UT for emacs-orgmode@gnu.org; Fri, 05 Nov 2021 13:56:20 -0400 Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]:40698) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mj3Rq-000291-0L for emacs-orgmode@gnu.org; Fri, 05 Nov 2021 13:56:19 -0400 Received: from [192.168.1.47] (unknown [88.162.223.185]) (Authenticated sender: emm.charpentier@free.fr) by smtp5-g21.free.fr (Postfix) with ESMTPA id 9DE425FFAE; Fri, 5 Nov 2021 18:56:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=free.fr; s=smtp-20201208; t=1636134974; bh=qtrWvebV/6yZv/EXyRbs104i8cCs5H6i8oGkrsXdPqc=; h=Subject:From:To:Date:In-Reply-To:From; b=LvCZrzViXaLhCpnpxZsggkecyGifZR7g1De3cqzXVs0PtFXzJZqa1zjSEiqGbTYte 80wXRatszB1iACqTm1mtfbsenCI7Lg2rwk5bmce8kwxAC+TizSQlQQL+8OUdYnuwaO JDrn+xN4DaoyydQ/QKArtUvtKuAyG+zuVau47Ls8ARMONOqXsZRnz1vzgaN8eAABQA 8FkjAr3mcCfwItVck+omWAoQ/lug5T6JvdLSGNS5fYDKJuk9FjTt2D2TeuJIpHwsr7 G4/o/fBRyBGSKAxBDKS+AfZQiPFiWwb3bib2yct9Z1aAhWRf5sldQmdnrdFBDupG4M nJKXTKYjZfSkA== Message-ID: Subject: Re: [PATCH] c-csl : accept relative CSL filenames From: Emmanuel Charpentier To: post+orgmodeml@guelker.eu, emacs-orgmode@gnu.org Date: Fri, 05 Nov 2021 18:56:09 +0100 In-Reply-To: 87r1bv2b8n.fsf@atlantis Organization: =?ISO-8859-1?Q?Organis=E9?= ? Moi ??? Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.0-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Received-SPF: pass client-ip=2a01:e0c:1:1599::14; envelope-from=emm.charpentier@free.fr; helo=smtp5-g21.free.fr 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, RCVD_IN_DNSWL_NONE=-0.0001, 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: , 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=1636135007; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KCfrf7bN/u3Zlx5o2CjulQFM1rzByeSf2detp3Dji6Q=; b=VRCwRbhQtPsCXigOsuR3WIOY2IhOYx1jLLea9tKRaUHnJuV7Pqf7xNE0lepOVHi83dUdth ENZzMDgPapllN7swsZN9zBj/zwgN932fHl3BQ5e1376LO064vD2HqyjCJUaSccKUdItnXg KxgtELpzU5z2Y9yllHdLVWc9/d89+kvvjtcAjWzdNV06uB7psbYmTkvjJcqI0NnOLgNd3s rb4n+QwvhKbQVvA72qs2Z3jL0hNptLb4puQI9MlEb1rQNvsIeK928qIZaAXsDeJ/xXjGx3 E5KjiTzfCmEdwtvHsE4DA2jt0UNNBTRhDEX7crHcCRfEi+Y/2lG/FZBgKdm9GA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636135007; a=rsa-sha256; cv=none; b=U8Njl8OjqtbAwB1sIGQeFO+P7NeHP8o+fj+FcNeET9mrxDKFNjA0m/qfnGNnlkcAcDCnxU JlAf1z5ka13wiFIS0iNde/hJCRujvXzX5ZgJaV43FspxUorJaFHl1oNvGtLV3KFu5xnibN l5QphLbPGndiBmPTylWY9Zsd+zIE/fyozrCsmyNQPFFpyXiwjn4ZBrdal0EEs4Clg1vNie WAJazgGuCRFZ7KQldGdiuEwCxiWwovGjHIMbgBPqKtieFM8Hl+FD1pdmD0z21M9h+1PfQD duj/4ojAU19ISYhN0sJdmy4sT+GgHC1eqXb0JTtjg8BNFgxQkQfuqu1HzUe0oA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=LvCZrzVi; 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.62 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=free.fr header.s=smtp-20201208 header.b=LvCZrzVi; dmarc=pass (policy=none) header.from=free.fr; 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: 83F9B195C7 X-Spam-Score: -1.62 X-Migadu-Scanner: scn0.migadu.com X-TUID: ezm7r4kM4Ata Quintus' example illustrates why I think my proposed patch is useful (or, rather, will be when corrected :-)), and why the order of research should be from most-specific to less-specific. If a finename is not absolute, search : 1. relatively to the buffer's default directory 2. if 1. unsuccessfull, relatively to`org-cite-csl-styles-dir' 3. if 2. unsuccessfull, relatively to emacs' default directory (BTW : what is this ? How to retrieve it ?) 4. if 3. unsuccessfull, fail. BTW : my current code does *not* work, and I do not understand why my test used to succeed... A better patch will follow ( but not tonight...). HTH, -- Emmanuel Charpentier