From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qKiEKmIjzmT7lgAASxT56A (envelope-from ) for ; Sat, 05 Aug 2023 12:24:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id IJhLKWIjzmQx0QAAG6o9tA (envelope-from ) for ; Sat, 05 Aug 2023 12:24:34 +0200 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 2CD935709E for ; Sat, 5 Aug 2023 12:24:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=b8R1Mu+1; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1691231074; 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=BO2ptiVmMPO+KgxOSebxr9w6S0k6q4QfIFjxdRm3B8c=; b=V0ONk9PDZmHg4R3fQnxCU7ML60cb28bOPOCb1+Of9KI7mlPleSgTIZpa+n8QK8F5P/UcjL yf5ZHTUdbeizKTmAY46UmtJD1ocL+EjqKfbzbtsUd3w5yPZkXwt+d4I+xZSXZLu5VP9XpX VpwNSutKp+SCR5Sw2M1VOWN/tHLK0lGByOIHoAHAt9bbsVq28IHp7sdigQVTQPF8zicn5b gECWaX8W4VWNhrJPh/nIQg0PsjELxsv+3ALxCV/c78p6JkTwQMzVG1fitYVrDt0atg5I82 e+Fs6r1kujlH2JGG6q5RxxsLNQxhhQHzRkB/yYlw0di8I4gz1j8OpxGDxadTmw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1691231074; a=rsa-sha256; cv=none; b=JLRH2RAz0KmXaEtP/SXRDLwF9eS/KS5n56gfjzb9sSivJbNQkqYMnom9/5t5ILMzWL2VIf q3ChiobgbRfM4ds9f813Takoy6PHqgRDRjEsMvECClNEElxxIVU1eZ9u+3W5aJBbxXIGQ2 IhMiARULelorbI0qweVxItnO+GeKWd7nkagVJzVGThyUiyhGDUzP/cCsDccsELkt30J/cc CxfiYLgMyUVgBsW6OlFhh5l9QNYNRHjNDzG1qpBqDQ0LdaLONeuPF+wTrVVM5OXuVGGQ9/ FcrdMfSMBtglTUmj/rQk4Tv6e+wcbjlNbWd7UOm/RXTBQSMzq8qMWkBS2rBkVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=b8R1Mu+1; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSERp-000549-3s; Sat, 05 Aug 2023 06:23:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSERm-0004no-07 for emacs-orgmode@gnu.org; Sat, 05 Aug 2023 06:23:46 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qSERi-0006eb-7r for emacs-orgmode@gnu.org; Sat, 05 Aug 2023 06:23:45 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id B468A240101 for ; Sat, 5 Aug 2023 12:23:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1691231014; bh=HRXlqeqGLumCgCkCmRKK/gMeRLuZgCmCMGPSC7Sb1AM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=b8R1Mu+1XRgrNWq+HDn9KacLTLOoygLAr5+eIhkTWiMgEx1hajweHi6vrv22Jdy4Q m6+9U/g2K4vKeEBOKnRrWmdFgZOt+IGDItT+ku6zWfdzoAzwyXbGpokWOUgg5PLMRq CZmg+4lZWZ37B26aczlgQt57dJOE6Eqbcyj3xdpojHePIutxjcR1FDR0i9xhFe9Y2w vbLaDnMhl3+dnAENTlWNe8bYUXPCMP2z7Wh9oYvW11MOBr9ZkV+J+CpUR9dCOU90ib 7cpw7vrdegU9GO3ABgdm7++LbglovExYRiW8PMuBTBwB9G7QLvcdDfN+LuEH2umpT7 RN6C76Q2KgV1Q== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RHzFL0MCLz6tvb; Sat, 5 Aug 2023 12:23:33 +0200 (CEST) From: Ihor Radchenko To: Roshan Shariff Cc: emacs-orgmode@gnu.org Subject: Re: [PATCH] org-macs: Fix incorrect use of relative paths in org-compile-file In-Reply-To: <20230805051842.142048-1-roshan.shariff@gmail.com> References: <20230805051842.142048-1-roshan.shariff@gmail.com> Date: Sat, 05 Aug 2023 10:23:59 +0000 Message-ID: <87bkfllrcw.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=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.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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 2CD935709E X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -9.32 X-Spam-Score: -9.32 X-TUID: pqrp0g94Ir7N Roshan Shariff writes: > * org-macs.el (org-compile-file, org-compile-file-commands): Avoid > converting the source path to be relative to the default-directory, > which breaks for absolute source paths when the current directory is a > symlink. > > Commit 5a8a1d4ff [1] changed org-compile-file to use > `file-relative-name` for the source argument. This was intended to fix > bug [2] by expanding ~ directories in the source path, like a shell. Thanks for the report and for providing a detailed explanation with a patch! I have a few comments. First, minor one: please put two spaces between sentences in the commit message. It is our convention. > - (output (expand-file-name (concat (file-name-base source) "." ext) > - (file-name-directory source))) > + (output (file-name-concat (file-name-directory source) > + (concat (file-name-base source) "." ext))) `file-name-concat' is only available since Emacs 28. Please use `org-file-name-concat'. > - (?f . ,(shell-quote-argument relative-name)) > + (?f . ,(shell-quote-argument source)) This will break user expectations. The PROCESS argument can, for example, be `org-latex-pdf-process', which promises that "%f in the command will be replaced by the relative file name" (see the docstring). -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at