From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#18547: repeated C-s doesn't wrap back to the top if file is .gz Date: Thu, 25 Sep 2014 01:20:31 +0300 Organization: JURTA Message-ID: <87tx3waceo.fsf@mail.jurta.org> References: <87bnq5hro2.fsf@jidanni.org> <87fvfgbyy3.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1411597415 30693 80.91.229.3 (24 Sep 2014 22:23:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Sep 2014 22:23:35 +0000 (UTC) Cc: 18547@debbugs.gnu.org, =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 25 00:23:27 2014 Return-path: Envelope-to: geb-bug-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 1XWuy4-0000Iq-41 for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Sep 2014 00:23:24 +0200 Original-Received: from localhost ([::1]:35229 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWuy3-0008Dj-Mv for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Sep 2014 18:23:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWuxt-0008Db-S0 for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2014 18:23:20 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWuxn-0006Pi-N9 for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2014 18:23:13 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:59555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWuxn-0006PJ-Jm for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2014 18:23:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XWuxi-0007Sp-7M for bug-gnu-emacs@gnu.org; Wed, 24 Sep 2014 18:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Sep 2014 22:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18547 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18547-submit@debbugs.gnu.org id=B18547.141159732828619 (code B ref 18547); Wed, 24 Sep 2014 22:23:02 +0000 Original-Received: (at 18547) by debbugs.gnu.org; 24 Sep 2014 22:22:08 +0000 Original-Received: from localhost ([127.0.0.1]:51119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWuwq-0007RX-2Q for submit@debbugs.gnu.org; Wed, 24 Sep 2014 18:22:08 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.222.226]:48510 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XWuwn-0007RO-Jc for 18547@debbugs.gnu.org; Wed, 24 Sep 2014 18:22:06 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 9C88C30A4ECC9B; Wed, 24 Sep 2014 15:22:03 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 24 Sep 2014 16:25:30 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:93708 Archived-At: >>> File not found and directory write-protected > [...] >> It fails because you are using a non-standard file name >> "changelog", and not the default "ChangeLog". You can customize >> `change-log-default-name' to "changelog" then isearch will wrap >> to the beginning instead of trying to wrap to a non-existent "ChangeLog". > > I think failing to switch to another file is fine, but it should > still wrap around, and it should not burp at the user about some > non-existing file. Then if there are no files that fit the default naming scheme ChangeLog[.NN], this patch will wrap around in the current buffer. (I'm not sure whether it should go into emacs-24 or trunk): === modified file 'lisp/vc/add-log.el' --- lisp/vc/add-log.el 2014-02-10 01:34:22 +0000 +++ lisp/vc/add-log.el 2014-09-24 22:17:34 +0000 @@ -1097,12 +1097,14 @@ (defun change-log-next-buffer (&optional (ignore-errors (version< (substring b (length name)) (substring a (length name)))))))) - (files (if isearch-forward files (reverse files)))) - (find-file-noselect - (if wrap - (car files) - (cadr (member (file-name-nondirectory (buffer-file-name buffer)) - files)))))) + (files (if isearch-forward files (reverse files))) + (file (if wrap + (car files) + (cadr (member (file-name-nondirectory (buffer-file-name buffer)) + files))))) + (if (file-exists-p file) + (find-file-noselect file) + (current-buffer)))) (defun change-log-fill-forward-paragraph (n) "Cut paragraphs so filling preserves open parentheses at beginning of lines."