From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: extension for image view to go to next or previous image Date: Fri, 8 Apr 2011 06:55:48 -0700 Message-ID: <3844502E2E6C426BAAEFAAC46C5ACD74@us.oracle.com> References: <293db391-853d-4043-8b0b-aa68dad213bf@t13g2000vbo.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1302270992 10285 80.91.229.12 (8 Apr 2011 13:56:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2011 13:56:32 +0000 (UTC) To: "'chris'" , Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 08 15:56:28 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8CAm-0002WD-55 for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 15:56:28 +0200 Original-Received: from localhost ([127.0.0.1]:55279 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8CAl-00054j-Jy for geh-help-gnu-emacs@m.gmane.org; Fri, 08 Apr 2011 09:56:27 -0400 Original-Received: from [140.186.70.92] (port=60935 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8CAI-0004yu-Cn for help-gnu-emacs@gnu.org; Fri, 08 Apr 2011 09:55:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8CAH-0000wQ-A6 for help-gnu-emacs@gnu.org; Fri, 08 Apr 2011 09:55:58 -0400 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:64198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8CAH-0000vz-4b for help-gnu-emacs@gnu.org; Fri, 08 Apr 2011 09:55:57 -0400 Original-Received: from rcsinet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id p38Dtrh1032432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 8 Apr 2011 13:55:54 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by rcsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id p38DtqBj005817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 8 Apr 2011 13:55:52 GMT Original-Received: from abhmt013.oracle.com (abhmt013.oracle.com [141.146.116.22]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id p38Dtq42016245; Fri, 8 Apr 2011 08:55:52 -0500 Original-Received: from dradamslap1 (/10.159.62.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 08 Apr 2011 06:55:51 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <293db391-853d-4043-8b0b-aa68dad213bf@t13g2000vbo.googlegroups.com> Thread-Index: Acv1lkpDr30+jNa6Thq8Fg9sLb2IZAAW4xoA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-Source-IP: acsmt356.oracle.com [141.146.40.156] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090204.4D9F13E9.0001:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 148.87.113.121 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:80704 Archived-At: > I am frequently viewing images in emacs that are part of a sequence, > therefore I am missing a way to go the next or previous image. I was > wondering if this is possible somehow already? Or maybe somebody can > show me how to do this with elisp? The filenames for these images are > chosen in a way that sorting by name brings them in the right order, > also usually the directory that contains them is open in a dired > buffer, so if necessary, maybe one could retrieve the position of the > current image and then simply get the name of the next image from > there? > > Any help would be greatly appreciated, Here are a couple of ways I would do it - there are no doubt other ways. Essentially, you just need a way to cycle among files. 1. Use Icicles. `C-x C-f', then cycle using `up'/`down'. When a file is an image file the image is displayed. To cycle among only files `foo*', type `foo' then cycle. To cycle among files matching `foo' as a substring, do the same thing, but either cycle using `next'/`prior' or hit `S-TAB' to initiate apropos completion before using `up'/`down' to cycle. You can use `S-SPC' to add other patterns to match, regardless of order - e.g. `C-x C-f foo S-TAB S-SPC bar S-SPC toto' matches file names with `foo', `bar', and `toto', in any order. You can use a regexp for any of the match patterns. If you hit `TAB' or `S-TAB' you see the file names, in *Completions*, that match what you type. By default, for image files you see thumbnail images next to the file names there. You can hit `C-x t' to show only file names or only thumbnails: `C-x t' cycles among the 3 image-candidate display types. 2. Use `image-dired'. Use `right'/`left' + `RET' in the thumbnails buffer to cycle among images.