unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 38647@debbugs.gnu.org, ynyaaa@gmail.com
Subject: bug#38647: 26.3; image-next-file does not consider archived images
Date: Tue, 04 Aug 2020 02:50:12 +0300	[thread overview]
Message-ID: <87d047cjzv.fsf@mail.linkov.net> (raw)
In-Reply-To: <87d049js2w.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 02 Aug 2020 11:49:11 +0200")

>>> When viewing archived images(zip or tar) with image-mode,
>>> typing 'n' does not show the next image in the archive.
>>> Similar for 'p'.
>>
>> Sounds like a missing feature which would be good to have, thanks.
>>
>> Any takers?
>
> There's some difficulty knowing how to approach this -- the different
> archive modes do so many different odd things.
>
> For instance, if you open the file "guide.png" from a zip buffer,
> buffer-file-name ends up being:
>
> "/home/larsi/tmp/images.zip:guide.png"
>
> In a tar file buffer, you end up with:
>
> "/home/larsi/tmp/images.tgz!./guide.png"
>
> So that has to be regularised first...  but will that break stuff?
>
> Secondly, there doesn't seem to be any general "what's the next file in
> this archive buffer" function?  Or am I missing something?
>
> This seems like a trivial request, but I'm not sure we have the
> infrastructure to make it happen...

All this indicates that instead of using 'directory-files',
'image-next-file' should rely on 'archive-next-line' if the file
is opened from an archive, and on 'dired-next-line' otherwise.

When using 'dired-next-line' the image navigation order will be
exactly the same as the file sorting order in the dired buffer,
thus allowing the users to change the image order from dired.

Also this means that if there is no corresponding dired buffer
already visited, then 'image-next-file' should create an internal
dired buffer just for the sake of file image navigation.





  reply	other threads:[~2020-08-03 23:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-17  7:15 bug#38647: 26.3; image-next-file does not consider archived images ynyaaa
2019-12-17 16:20 ` Eli Zaretskii
2020-08-02  9:49   ` Lars Ingebrigtsen
2020-08-03 23:50     ` Juri Linkov [this message]
2020-08-04  8:05       ` Lars Ingebrigtsen
2020-08-04 23:47         ` Juri Linkov
2020-08-05  9:09           ` Lars Ingebrigtsen
2020-08-05 23:50             ` Juri Linkov
2020-08-06  9:52               ` Lars Ingebrigtsen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=87d047cjzv.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=38647@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=ynyaaa@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).