From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sebastian Luque Newsgroups: gmane.emacs.help Subject: Re: looping cursor position in dired Date: Thu, 17 Nov 2005 18:12:54 -0600 Organization: Memorial University of Newfoundland Message-ID: <87k6f6dda1.fsf@gmail.com> References: <1132271668.212323.80520@o13g2000cwo.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1132273295 4521 80.91.229.2 (18 Nov 2005 00:21:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 18 Nov 2005 00:21:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Nov 18 01:21:33 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ectyd-0006vS-9x for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Nov 2005 01:19:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ectyc-0003WE-MG for geh-help-gnu-emacs@m.gmane.org; Thu, 17 Nov 2005 19:19:38 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ectv0-0002gR-Vu for help-gnu-emacs@gnu.org; Thu, 17 Nov 2005 19:15:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ectuy-0002g9-AD for help-gnu-emacs@gnu.org; Thu, 17 Nov 2005 19:15:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ectux-0002g4-Fi for help-gnu-emacs@gnu.org; Thu, 17 Nov 2005 19:15:51 -0500 Original-Received: from [80.91.229.2] (helo=ciao.gmane.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Ectux-0003W7-BZ for help-gnu-emacs@gnu.org; Thu, 17 Nov 2005 19:15:51 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EcttE-0004yU-EJ for help-gnu-emacs@gnu.org; Fri, 18 Nov 2005 01:14:04 +0100 Original-Received: from s0106001111ddbc6e.wp.shawcable.net ([24.77.72.102]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Nov 2005 01:14:04 +0100 Original-Received: from spluque by s0106001111ddbc6e.wp.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Nov 2005 01:14:04 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-To: help-gnu-emacs@gnu.org Original-Lines: 21 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: s0106001111ddbc6e.wp.shawcable.net User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:C/vuCgPs9UcxUKCcyLs9BOq0dKU= 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:31132 Archived-At: "rgb" wrote: [...] > Yes it would be a shame if you did something complicated;) > (defadvice dired-next-line > (before my-buff-wrap activate compile) "With wrapping" > (when (eobp) (goto-char (point-min)))) > (defadvice dired-previous-line > (before my-buff-wrap activate compile) "With wrapping" > (when (bobp) (goto-char (point-max)))) Nice, thanks for both the solution and example of defadvice usage! Thanks, -- Sebastian P. Luque