emacs-devel
[Top][All Lists]
Advanced

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

Re: error when tty-coding-system is utf-8


From: Luc Teirlinck
Subject: Re: error when tty-coding-system is utf-8
Date: Thu, 2 Jun 2005 17:41:11 -0500 (CDT)

Is gnus-start-date-timer running when your problem occurs?
It runs article-update-date-lapsed which conducts a regexp search
without saving and restoring the match data, as it should.

I believe that the patch below is necessary, _regardless_ of whether
it solves your problem.  Does it?  There may be other similar problems
in gnus or elsewhere.  I could install the patch, if desired.  An
alternative is to automatically restore the match data around _all_
timers, but Richard pointed out that this would lead to
inefficiencies.

===File ~/gnus-art-diff=====================================
*** gnus-art.el 01 Jun 2005 10:13:45 -0500      1.74
--- gnus-art.el 02 Jun 2005 17:21:40 -0500      
***************
*** 3034,3053 ****
  
  (defun article-update-date-lapsed ()
    "Function to be run from a timer to update the lapsed time line."
!   (let (deactivate-mark)
!     (save-excursion
!       (ignore-errors
!       (walk-windows
!        (lambda (w)
!          (set-buffer (window-buffer w))
!          (when (eq major-mode 'gnus-article-mode)
!            (let ((mark (point-marker)))
!              (goto-char (point-min))
!              (when (re-search-forward "^X-Sent:" nil t)
!                (article-date-lapsed t))
!              (goto-char (marker-position mark))
!              (move-marker mark nil))))
!        nil 'visible)))))
  
  (defun gnus-start-date-timer (&optional n)
    "Start a timer to update the X-Sent header in the article buffers.
--- 3034,3054 ----
  
  (defun article-update-date-lapsed ()
    "Function to be run from a timer to update the lapsed time line."
!   (save-match-data
!     (let (deactivate-mark)
!       (save-excursion
!       (ignore-errors
!        (walk-windows
!         (lambda (w)
!           (set-buffer (window-buffer w))
!           (when (eq major-mode 'gnus-article-mode)
!             (let ((mark (point-marker)))
!               (goto-char (point-min))
!               (when (re-search-forward "^X-Sent:" nil t)
!                 (article-date-lapsed t))
!               (goto-char (marker-position mark))
!               (move-marker mark nil))))
!         nil 'visible))))))
  
  (defun gnus-start-date-timer (&optional n)
    "Start a timer to update the X-Sent header in the article buffers.
============================================================




reply via email to

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