From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Newsgroups: gmane.emacs.bugs Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer Date: Thu, 09 Jun 2011 12:47:00 +0800 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1307594905 8703 80.91.229.12 (9 Jun 2011 04:48:25 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2011 04:48:25 +0000 (UTC) Cc: Chong Yidong , 8463@debbugs.gnu.org, Richard Stallman To: Glenn Morris Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 09 06:48:20 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QUXAJ-0001tR-Ti for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Jun 2011 06:48:20 +0200 Original-Received: from localhost ([::1]:53339 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUXAI-0007Xi-Nh for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Jun 2011 00:48:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:48093) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUXA4-0007Xb-C6 for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2011 00:48:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QUXA3-0004Dy-FZ for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2011 00:48:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42443) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QUXA3-0004Du-Ci for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2011 00:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QUXA2-0003B1-Kd; Thu, 09 Jun 2011 00:48:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2011 04:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8463 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 8463-submit@debbugs.gnu.org id=B8463.130759485712180 (code B ref 8463); Thu, 09 Jun 2011 04:48:02 +0000 Original-Received: (at 8463) by debbugs.gnu.org; 9 Jun 2011 04:47:37 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QUX9c-0003AO-Dg for submit@debbugs.gnu.org; Thu, 09 Jun 2011 00:47:36 -0400 Original-Received: from mail-px0-f170.google.com ([209.85.212.170]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QUX9a-0003AC-Rs for 8463@debbugs.gnu.org; Thu, 09 Jun 2011 00:47:35 -0400 Original-Received: by pxi19 with SMTP id 19so866049pxi.29 for <8463@debbugs.gnu.org>; Wed, 08 Jun 2011 21:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=6jZCTDIBi6iYiRyWYGvNLBpq9Om024fB5hXzzLx6ac0=; b=LmU5naITqMuDr0gQZ+dSbKtO2KqE0/7z1wGXpYzsRz73b/5LwXqblQl+06oxTKDGZN ct/V4a5Bs+fyh9xsQok+KAUJdfmyVbL2PyTIGpCmDIYbX0F7tsQiOD8t0QsXZ4D2bAGL 0eazt1XqUhX9yTWW8ZjJeo/REbrG+CBlfD6lA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=CWIS126pwCx313tFuOr2iuWQ3P3sc1h5Vu8e2w/jL2lX+EP+RTWJn3iqZ4cUgWFRQ4 iqddk+80kJmR5Ijlxz7yU7g0cRQNSgeo9+mLBPQHbMS91IFhX7JVHntTFNcCJvFurabD s/F6djYSK2OfKqlE/XXKJ3BCieZ5zNPCWUKQQ= Original-Received: by 10.68.65.75 with SMTP id v11mr116376pbs.56.1307594848960; Wed, 08 Jun 2011 21:47:28 -0700 (PDT) Original-Received: from localhost ([123.114.55.183]) by mx.google.com with ESMTPS id p5sm1076069pbd.76.2011.06.08.21.47.15 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 08 Jun 2011 21:47:27 -0700 (PDT) In-Reply-To: (Glenn Morris's message of "Wed, 01 Jun 2011 19:03:36 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3.50 (Mac OS X 10.6.7) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 09 Jun 2011 00:48:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:47052 Archived-At: On 2011-06-02 07:03 +0800, Glenn Morris wrote: > 2. After C-x C-q, If I delete some text in the occur buffer, then use > "undo", when I reach the point at which there is no more to undo, I get: > "Wrong type argument: markerp, nil" rather than "No further undo information". > > Debugger entered--Lisp error: (wrong-type-argument markerp nil) > marker-buffer(nil) > occur-after-change-function(1 40 39) > primitive-undo(1 ((nil font-lock-face underline 1 . 40) (t 0 . 0))) > undo-more(1) > undo(nil) > call-interactively(undo nil nil) This can be fixed with: diff --git a/lisp/replace.el b/lisp/replace.el index 0578ed09..fc2db2ec 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -882,11 +882,11 @@ (define-derived-mode occur-edit-mode occur-mode "Occur-Edit" (defun occur-after-change-function (beg end length) (save-excursion - (goto-char beg) (let* ((m (get-text-property (line-beginning-position) 'occur-target)) (buf (marker-buffer m)) (col (current-column))) (when (= length 0) + (goto-char beg) ;; Apply occur-target property to inserted (e.g. yanked) text. (put-text-property beg end 'occur-target m) ;; Did we insert a newline? Occur Edit mode can't create new The cause: When switching major-mode (in this case occur-edit-mode), an undo entry containing text-property only change is added due to this line in occur-mode: (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) That line seems useless due to change made in revid 22063400b. If no one objects, I intend to also remove it. Leo