GNU bug report logs - #10939
24.0.94; backward-delete-char-untabify read-only error

Previous Next

Package: emacs;

Reported by: Leo <sdl.web <at> gmail.com>

Date: Sun, 4 Mar 2012 13:34:01 UTC

Severity: normal

Found in version 24.0.94

Done: Leo <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10939 in the body.
You can then email your comments to 10939 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10939; Package emacs. (Sun, 04 Mar 2012 13:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 04 Mar 2012 13:34:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; backward-delete-char-untabify read-only error
Date: Sun, 04 Mar 2012 21:32:27 +0800
1. (setq backward-delete-char-untabify-method 'hungry)
2. (setq enable-recursive-minibuffers t)
3. M-: and then type some spaces
4. M-x backward-delete-char-untabify

You should see something like:
  delete-backward-char: Text is read-only

This patch fixes it:

diff --git a/lisp/simple.el b/lisp/simple.el
index c14d0d70..0faf54bc 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3458,8 +3458,10 @@ (defun backward-delete-char-untabify (arg &optional killp)
                      ((eq backward-delete-char-untabify-method 'all)
                       " \t\n\r")))
          (n (if skip
-                (let ((wh (- (point) (save-excursion (skip-chars-backward skip)
-                                                     (point)))))
+                (let* ((oldpt (point))
+                       (wh (- oldpt (save-excursion
+                                      (skip-chars-backward skip)
+                                      (constrain-to-field nil oldpt)))))
                   (+ arg (if (zerop wh) 0 (1- wh))))
               arg)))
     ;; Avoid warning about delete-backward-char




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10939; Package emacs. (Sun, 04 Mar 2012 14:58:02 GMT) Full text and rfc822 format available.

Message #8 received at 10939 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: 10939 <at> debbugs.gnu.org
Subject: Re: bug#10939: 24.0.94; backward-delete-char-untabify read-only error
Date: Sun, 04 Mar 2012 09:56:29 -0500
> @@ -3458,8 +3458,10 @@ (defun backward-delete-char-untabify (arg &optional killp)
>                       ((eq backward-delete-char-untabify-method 'all)
>                        " \t\n\r")))
>           (n (if skip
> -                (let ((wh (- (point) (save-excursion (skip-chars-backward skip)
> -                                                     (point)))))
> +                (let* ((oldpt (point))
> +                       (wh (- oldpt (save-excursion
> +                                      (skip-chars-backward skip)
> +                                      (constrain-to-field nil oldpt)))))
>                    (+ arg (if (zerop wh) 0 (1- wh))))
>                arg)))
>      ;; Avoid warning about delete-backward-char

Looks good, please install,


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10939; Package emacs. (Mon, 05 Mar 2012 10:42:02 GMT) Full text and rfc822 format available.

Message #11 received at 10939 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10939 <at> debbugs.gnu.org
Subject: Re: bug#10939: 24.0.94; backward-delete-char-untabify read-only error
Date: Mon, 05 Mar 2012 18:40:14 +0800
On 2012-03-04 22:56 +0800, Stefan Monnier wrote:
> Looks good, please install,
>
>
>         Stefan

I want to try out the C-c C-a command in *VC-log* buffer. But getting
this "bzr: ERROR: Unrecognized bug debbugs:10939. Commit refused.".

Debugger entered--Lisp error: (error #("Running bzr commit -m * ... --fixes debbugs:10939 lisp/ChangeLog lisp/simple.el...FAILED (status 3)" 22 24 (fontified t) 36 44 (face log-edit-header fontified t) 44 49 (face log-edit-header fontified t)))
  signal(error (#("Running bzr commit -m * ... --fixes debbugs:10939 lisp/ChangeLog lisp/simple.el...FAILED (status 3)" 22 24 (fontified t) 36 44 (face log-edit-header fontified t) 44 49 (face log-edit-header fontified t))))
  error("Running %s...FAILED (%s)" #("bzr commit -m * ... --fixes debbugs:10939 lisp/ChangeLog lisp/simple.el" 14 16 (fontified t) 28 36 (fontified t face log-edit-header) 36 41 (fontified t face log-edit-header)) "status 3")
  vc-do-command("*vc*" 0 "bzr" ("/Users/Shared/sources/EmacsBZR/trunk/lisp/ChangeLog" "/Users/Shared/sources/EmacsBZR/trunk/lisp/simple.el") "commit" "-m" #("* lisp/simple.el (backward-delete-char-untabify): Constrain point to\nfield.\n" 0 2 (fontified t) 2 16 (fontified t) 16 76 (fontified t)) "--fixes" #("debbugs:10939" 0 8 (fontified t face log-edit-header) 8 13 (fontified t face log-edit-header)))
  apply(vc-do-command "*vc*" 0 "bzr" ("/Users/Shared/sources/EmacsBZR/trunk/lisp/ChangeLog" "/Users/Shared/sources/EmacsBZR/trunk/lisp/simple.el") "commit" ("-m" #("* lisp/simple.el (backward-delete-char-untabify): Constrain point to\nfield.\n" 0 2 (fontified t) 2 16 (fontified t) 16 76 (fontified t)) "--fixes" #("debbugs:10939" 0 8 (fontified t face log-edit-header) 8 13 (fontified t face log-edit-header))))
  vc-bzr-command("commit" nil 0 ("/Users/Shared/sources/EmacsBZR/trunk/lisp/ChangeLog" "/Users/Shared/sources/EmacsBZR/trunk/lisp/simple.el") "-m" #("* lisp/simple.el (backward-delete-char-untabify): Constrain point to\nfield.\n" 0 2 (fontified t) 2 16 (fontified t) 16 76 (fontified t)) "--fixes" #("debbugs:10939" 0 8 (fontified t face log-edit-header) 8 13 (fontified t face log-edit-header)))
 .........

The vc-diff is:
=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2012-03-05 06:10:11 +0000
+++ lisp/ChangeLog	2012-03-05 10:30:14 +0000
@@ -1,3 +1,8 @@
+2012-03-05  Leo Liu  <sdl.web <at> gmail.com>
+
+	* simple.el (backward-delete-char-untabify): Constrain point to
+	field (Bug#10939).
+
 2012-03-05  Chong Yidong  <cyd <at> gnu.org>
 
 	* simple.el (count-words): If called from Lisp, return the word

=== modified file 'lisp/simple.el'
--- lisp/simple.el	2012-03-05 06:10:11 +0000
+++ lisp/simple.el	2012-03-05 10:28:16 +0000
@@ -3463,8 +3463,10 @@
                      ((eq backward-delete-char-untabify-method 'all)
                       " \t\n\r")))
          (n (if skip
-                (let ((wh (- (point) (save-excursion (skip-chars-backward skip)
-                                                     (point)))))
+                (let* ((oldpt (point))
+                       (wh (- oldpt (save-excursion
+                                      (skip-chars-backward skip)
+                                      (constrain-to-field nil oldpt)))))
                   (+ arg (if (zerop wh) 0 (1- wh))))
               arg)))
     ;; Avoid warning about delete-backward-char

And VC-log buffer has:

Fixes: debbugs:10939

* lisp/simple.el (backward-delete-char-untabify): Constrain point to
field.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10939; Package emacs. (Mon, 05 Mar 2012 15:06:02 GMT) Full text and rfc822 format available.

Message #14 received at 10939 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo <sdl.web <at> gmail.com>
Cc: 10939 <at> debbugs.gnu.org
Subject: Re: bug#10939: 24.0.94; backward-delete-char-untabify read-only error
Date: Mon, 05 Mar 2012 10:03:50 -0500
>> Looks good, please install,
> I want to try out the C-c C-a command in *VC-log* buffer. But getting
> this "bzr: ERROR: Unrecognized bug debbugs:10939. Commit refused.".

You need to add "bugtracker_debbugs_url = http://debbugs.gnu.org/{id}"
to your ~/.bazaar/bazaar.conf (in the [DEFAULTS] section).


        Stefan




Reply sent to Leo <sdl.web <at> gmail.com>:
You have taken responsibility. (Mon, 05 Mar 2012 19:06:01 GMT) Full text and rfc822 format available.

Notification sent to Leo <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Mon, 05 Mar 2012 19:06:02 GMT) Full text and rfc822 format available.

Message #19 received at 10939-done <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: 10939-done <at> debbugs.gnu.org
Subject: Re: bug#10939: 24.0.94; backward-delete-char-untabify read-only error
Date: Tue, 06 Mar 2012 03:03:57 +0800
Fixed in 24.1




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 03 Apr 2012 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 49 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.