bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24368: 25.1; Assertion failure in attach_marker


From: martin rudalics
Subject: bug#24368: 25.1; Assertion failure in attach_marker
Date: Tue, 06 Sep 2016 08:44:52 +0200

I now wrote a better patch for the attach_marker issue (attached).  For
the remainder, the problem is as follows (with emacs -Q): Evaluating

(progn
  (describe-function 'describe-function)
  (let* ((help (get-buffer "*Help*"))
         (marker (with-current-buffer help
                   (copy-marker (point-max)))))
    (goto-char marker)))

fails with (error "Marker points into wrong buffer" #<marker at 271 in *Help*>)
while evaluating

(progn
  (describe-function 'describe-function)
  (let* ((help (get-buffer "*Help*"))
         (marker (with-current-buffer help
                   (copy-marker (point-max)))))
    (set-window-start (selected-window) marker)))

crashes in init_iterator and

(progn
  (describe-function 'describe-function)
  (let* ((help (get-buffer "*Help*"))
         (marker (with-current-buffer help
                   (copy-marker (point-max)))))
    (with-selected-window (get-buffer-window help)
      (set-window-point (get-buffer-window "*scratch*") marker))))

crashes in set_point_both.

We can either make these fail as in the ‘goto-char’ case or handle them
as with attach_marker.

The former is simpler but would have to be motivated somehow.  IMHO
‘goto-char’ should not signal an error in that case - it's perfectly
legitimate to use the position from another buffer's marker as value.

The latter is tedious to implement but inherently more correct.

Your choice ;-)

martin

Attachment: attach_marker.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]