vedang / pdf-tools

Emacs support library for PDF files.
https://pdftools.wiki
GNU General Public License v3.0
590 stars 83 forks source link

Writing files within archives via tar-mode doesn't work #258

Open piater opened 4 months ago

piater commented 4 months ago

Steps to Reproduce the behaviour

  1. Create a tar archive containing a PDF file, say, archive.tar.
  2. Find the tar archive.
  3. Choose the PDF file contained therein, say, file.pdf.
  4. Alter it, e.g. by adding annotations.
  5. Save it with C-x C-s.

This errors out with a message like the following:

Saving file /path/archive.tar!./file.pdf...
run-hook-with-args-until-success: Opening output file: No such file or directory, /path/archive.tar!./file.pdf

What is the expected behaviour? archive.tar is replaced with a tar archive containing the altered file.pdf, transparently created by tar-mode.

Your pdf-tools install Status: Installed in ‘pdf-tools-20230611.239/’ (unsigned). Version: 20230611.239 Commit: c69e7656a4678fe25afbd29f3503dd19ee7f9896

This is perhaps best fixed jointly with #257 by changing the file-saving logic of pdf-tools.