GNU bug report logs - #78750
Add archive-visit-inner-file function

Previous Next

Package: emacs;

Reported by: Kenta USAMI <zonuexe <at> zonu.me>

Date: Tue, 10 Jun 2025 17:20:03 UTC

Severity: normal

To reply to this bug, email your comments to 78750 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#78750; Package emacs. (Tue, 10 Jun 2025 17:20:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kenta USAMI <zonuexe <at> zonu.me>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 10 Jun 2025 17:20:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kenta USAMI <zonuexe <at> zonu.me>
To: bug-gnu-emacs <at> gnu.org
Subject: Add archive-visit-inner-file function
Date: Wed, 11 Jun 2025 02:18:42 +0900
[Message part 1 (text/plain, inline)]
Currently, a buffer for an archive file can be opened by selecting the
entry from archive-mode, but there is no way to access it from Lisp
without manually selecting the entry.

An API like archive-visit-inner-file, introduced in this patch, would be
useful to implement the ability to directly access an archive entry.

My use case is to be able to jump directly to classes and functions
defined in PHP scripts stored inside a Phar archive file.

- https://github.com/emacs-php/archive-phar.el
- https://www.php.net/manual/en/book.phar.php

I'm not hung up on the function names or detailed API of this patch.
[Message part 2 (text/html, inline)]
[0001-lisp-arc-mode.el-Add-archive-visit-inner-file.patch (application/octet-stream, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#78750; Package emacs. (Wed, 11 Jun 2025 12:15:01 GMT) Full text and rfc822 format available.

Message #8 received at 78750 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Kenta USAMI <zonuexe <at> zonu.me>
Cc: 78750 <at> debbugs.gnu.org
Subject: Re: bug#78750: Add archive-visit-inner-file function
Date: Wed, 11 Jun 2025 15:13:36 +0300
> From: Kenta USAMI <zonuexe <at> zonu.me>
> Date: Wed, 11 Jun 2025 02:18:42 +0900
> 
> Currently, a buffer for an archive file can be opened by selecting the
> entry from archive-mode, but there is no way to access it from Lisp
> without manually selecting the entry.
> 
> An API like archive-visit-inner-file, introduced in this patch, would be
> useful to implement the ability to directly access an archive entry.

Thanks, sounds useful.  AFAIU, this will work with any archive
supported by arc-mode.el?

> My use case is to be able to jump directly to classes and functions
> defined in PHP scripts stored inside a Phar archive file.
> 
> - https://github.com/emacs-php/archive-phar.el
> - https://www.php.net/manual/en/book.phar.php
> 
> I'm not hung up on the function names or detailed API of this patch.

Why do we need to have "inner" in the name?  Can we call this API
archive-find-file instead?

Also, would you mind to add one or more tests for this API?




This bug report was last modified 3 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.