all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#12077: Abort in replace-regexp with an after-change-functions hook
       [not found] <20120727200247.7276.54835.reportbug@susie.zeus.nullprogram.com>
@ 2012-07-28 17:53 ` Rob Browning
  2013-02-19 17:08   ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Browning @ 2012-07-28 17:53 UTC (permalink / raw)
  To: 12077; +Cc: 682995-forwarded, Christopher Wellons, 682995

(If possible, please preserve the 682995-forwarded address in any replies.)

The following bug report was recently filed, and I've tried the example,
and saw the same abort.

You can find additional information here:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=682995


Christopher Wellons <mosquitopsu@gmail.com> writes:

> Package: emacs24
> Version: 24.1+1-4
> Severity: normal
>
> When this expression is evaluated, Emacs will abort.
>
>     (with-temp-buffer
>       (insert "#\n*\n")
>       (goto-char (point-min))
>       (add-hook 'after-change-functions
>                 (lambda (a b c) (re-search-forward "\n" nil t)))
>       (replace-regexp "^\\*" " *"))
>
> It is also provided in an attached file, example.el, in order to make
> this easier to demonstrate.
>
>     emacs -q -l example.el
>
> The abort() occurs in the check at the beginning of
> buf_charpos_to_bytepos() in marker.c, because the point has left the
> buffer bounds. I ran into this bug while trying to perform this
> replace-regexp while in a third-party markdown-mode, and narrowed it
> down to this combination of events.
>
> This bug also appears in emacs23 in both squeeze and sid as well as
> upstream and non-Debian builds of Emacs.

Thanks
-- 
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#12077: Abort in replace-regexp with an after-change-functions hook
  2012-07-28 17:53 ` bug#12077: Abort in replace-regexp with an after-change-functions hook Rob Browning
@ 2013-02-19 17:08   ` Glenn Morris
  2013-02-19 18:04     ` Glenn Morris
  0 siblings, 1 reply; 3+ messages in thread
From: Glenn Morris @ 2013-02-19 17:08 UTC (permalink / raw)
  To: 12077-done

Version: 24.4

Rob Browning wrote:

>> When this expression is evaluated, Emacs will abort.
>>
>>     (with-temp-buffer
>>       (insert "#\n*\n")
>>       (goto-char (point-min))
>>       (add-hook 'after-change-functions
>>                 (lambda (a b c) (re-search-forward "\n" nil t)))
>>       (replace-regexp "^\\*" " *"))

By experiment, this issue is present in at least 22.3 through 24.2.93,
but is fixed in the current trunk.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#12077: Abort in replace-regexp with an after-change-functions hook
  2013-02-19 17:08   ` Glenn Morris
@ 2013-02-19 18:04     ` Glenn Morris
  0 siblings, 0 replies; 3+ messages in thread
From: Glenn Morris @ 2013-02-19 18:04 UTC (permalink / raw)
  To: 12077

Glenn Morris wrote:

>>>     (with-temp-buffer
>>>       (insert "#\n*\n")
>>>       (goto-char (point-min))
>>>       (add-hook 'after-change-functions
>>>                 (lambda (a b c) (re-search-forward "\n" nil t)))
>>>       (replace-regexp "^\\*" " *"))
>
> By experiment, this issue is present in at least 22.3 through 24.2.93,
> but is fixed in the current trunk.

PS if someone feels like checking exactly what fixed this, then if it is
a simple and obviously safe change, it could go in emacs-24. But since
this is a long-standing issue, this is not essential.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-02-19 18:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20120727200247.7276.54835.reportbug@susie.zeus.nullprogram.com>
2012-07-28 17:53 ` bug#12077: Abort in replace-regexp with an after-change-functions hook Rob Browning
2013-02-19 17:08   ` Glenn Morris
2013-02-19 18:04     ` Glenn Morris

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.