From: Leo <sdl.web@gmail.com>
To: Glenn Morris <rgm@gnu.org>
Cc: Chong Yidong <cyd@stupidchicken.com>,
8463@debbugs.gnu.org, Richard Stallman <rms@gnu.org>
Subject: bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer
Date: Thu, 09 Jun 2011 12:47:00 +0800 [thread overview]
Message-ID: <m1oc271uij.fsf@gmail.com> (raw)
In-Reply-To: <kjoc2hupbr.fsf@fencepost.gnu.org> (Glenn Morris's message of "Wed, 01 Jun 2011 19:03:36 -0400")
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
next prev parent reply other threads:[~2011-06-09 4:47 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-10 8:14 bug#8463: 24.0.50; [PATCH] Direct Edit in *Occur* Buffer Leo
2011-04-15 1:11 ` Stefan Monnier
2011-05-28 23:05 ` Chong Yidong
2011-05-29 4:04 ` Leo
2011-05-30 14:04 ` Andrew W. Nosenko
2011-05-30 23:10 ` Richard Stallman
2011-06-01 23:03 ` Glenn Morris
2011-06-03 2:36 ` Leo
2011-06-03 15:38 ` Stefan Monnier
2011-06-04 21:34 ` Chong Yidong
2011-06-05 9:30 ` Štěpán Němec
2011-06-06 15:34 ` Stefan Monnier
2011-06-09 4:47 ` Leo [this message]
2011-06-09 5:14 ` Glenn Morris
2011-06-09 9:44 ` Leo
2011-06-09 9:54 ` Eli Zaretskii
2011-06-09 9:58 ` Leo
2011-06-09 9:42 ` Leo
2011-06-09 18:09 ` Glenn Morris
2011-06-10 13:59 ` Stefan Monnier
2011-06-10 16:14 ` Ted Zlatanov
2011-06-11 9:58 ` Andrew W. Nosenko
2011-06-11 18:00 ` Juri Linkov
2011-06-12 23:10 ` Andrew W. Nosenko
2011-06-18 19:35 ` Chong Yidong
2011-06-18 20:36 ` Andrew W. Nosenko
2011-09-09 11:39 ` Juri Linkov
2011-09-14 19:04 ` Juri Linkov
2011-09-17 21:28 ` Chong Yidong
2011-09-18 19:33 ` Juri Linkov
2011-09-19 18:52 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m1oc271uij.fsf@gmail.com \
--to=sdl.web@gmail.com \
--cc=8463@debbugs.gnu.org \
--cc=cyd@stupidchicken.com \
--cc=rgm@gnu.org \
--cc=rms@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.