all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Roshan Shariff <roshan.shariff@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: [PATCH] org-macs: Fix incorrect use of relative paths in org-compile-file
Date: Sat, 05 Aug 2023 10:23:59 +0000	[thread overview]
Message-ID: <87bkfllrcw.fsf@localhost> (raw)
In-Reply-To: <20230805051842.142048-1-roshan.shariff@gmail.com>

Roshan Shariff <roshan.shariff@gmail.com> 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 <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2023-08-05 10:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05  5:18 [PATCH] org-macs: Fix incorrect use of relative paths in org-compile-file Roshan Shariff
2023-08-05 10:23 ` Ihor Radchenko [this message]
2023-08-05 16:15   ` Roshan Shariff
2023-08-06  6:49     ` Ihor Radchenko
2023-08-06 15:07       ` Roshan Shariff
2023-08-06 15:10         ` Ihor Radchenko
2023-08-06 15:26           ` Bastien Guerry
2023-08-08  8:54             ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bkfllrcw.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=roshan.shariff@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.