From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.help Subject: Re: A search problem in emacs Date: Tue, 05 Mar 2013 16:22:45 +0100 Message-ID: <51360DC5.3010606@easy-emacs.de> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1362496955 25904 80.91.229.3 (5 Mar 2013 15:22:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 5 Mar 2013 15:22:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 05 16:23:00 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UCthi-0000lx-Pg for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Mar 2013 16:22:58 +0100 Original-Received: from localhost ([::1]:41642 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCthN-0007Dt-0a for geh-help-gnu-emacs@m.gmane.org; Tue, 05 Mar 2013 10:22:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCth8-0007BL-Rf for help-gnu-emacs@gnu.org; Tue, 05 Mar 2013 10:22:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCth3-0004PF-9Q for help-gnu-emacs@gnu.org; Tue, 05 Mar 2013 10:22:22 -0500 Original-Received: from moutng.kundenserver.de ([212.227.126.186]:55735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCth2-0004Nw-Vx for help-gnu-emacs@gnu.org; Tue, 05 Mar 2013 10:22:17 -0500 Original-Received: from [192.168.178.21] (brln-4dbc6bd8.pool.mediaWays.net [77.188.107.216]) by mrelayeu.kundenserver.de (node=mrbap3) with ESMTP (Nemesis) id 0M89Tt-1Uzn7c00Bd-00vgmV; Tue, 05 Mar 2013 16:22:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 In-Reply-To: X-Provags-ID: V02:K0:FdqOmGW9pCw4kladCirWNezYNJdXMuHAQizZnb7wTPS DOrzbJSlAQ0hgsL4+0ii5nmKM0O7OvMqVG2HQTcXMSn98hBcfa WEDZ49TufCiz5aA6HoLRTeJfzgiFPWjO8KMg5OE61EpkR2/cb1 wNv0qLCuYUuUVkFtWQEcOk6uJsCKhWa0YrrJLTqiYV1dtOAZ1e p7T3eqAxHVSsbl/fH/k5NuIuaj7tGcma9rWL8n3fpjCCLIvqsl Uf5MxE9B6Vs1ULMcrlusft+GpHQdNtRURFTZbb/K9/tRpY1VUH aRbVlBfQtIX0EQ8vEDY1sSPLxpiESNyCcwRsAPf52Q62EiATBs +7hRpZqbyzTSx/jHn4JGQeNXfK94DdhkGKP15pS00 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 212.227.126.186 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:89364 Archived-At: Am 05.03.2013 04:02, schrieb source liu: > Hi, list > > Do you have any suggestions when you are doing search in a buff with > many same words (i come to it when i'm doing search in a xml file) > > xml always have tags, > ============= sample text ============= > something something ...... > =================================== > > what i want to do is to make the curse at the Nth (say 56th) tag, > now i played the trick as vim > > M-x viper-mode , press "/" enter , press "56" "n". > > is there "emacs" ways search of doing so? i've no idea of it > > Don't see it. Maybe try this: M-x NUMBER ar-search-forward RET SEARCH-TERM RET (defun ar-search-forward (count) "Go to the COUNT's occurrence of search-term. " (interactive "p") (let ((string (completing-read "Search: " (car kill-ring)))) (kill-new string) (search-forward string nil t count)))