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

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

Re: [PCL-CVS] Interactive diff on a utf-8 encoded file


From: Jérôme Haguet
Subject: Re: [PCL-CVS] Interactive diff on a utf-8 encoded file
Date: Wed, 10 Sep 2003 10:22:17 +0200

Hello
It does not seems to work.
The following line
(cvs-coding-system buffer-file-coding-system)
return the coding-system of *cvs* buffer.

I replace it with
(cvs-coding-system (find-operation-coding-system 'insert-file-contents
file)))
and it give me so far a good result ...
But I do not know if it is the correct way to do it.

Last detail, the coding-system is still not correctly displayed at the
lower-left corner of the window.

Anyway, thanks for your help.


"Kevin Rodgers" <ihs_4664@yahoo.com> a écrit dans le message de
3F5E223D.6020108@yahoo.com">news:3F5E223D.6020108@yahoo.com...
> Kevin Rodgers wrote:
>
> >  From pcvs.el:
> >
> >
> > ;;; Bugs:
> >
> > ;; - Extracting an old version seems not to recognize encoding
correctly.
> > ;;   That's probably because it's done via a process rather than a file.
> >
> >
> >  > Any idea how to fix this ?
> >
> > Maybe cvs-retrieve-revision can be hacked.  Does this *untested* patch
> > work?
>
> Here's a better patch, that tries to take into account the fact that
> buffer-file-coding-system is buffer local:
>
> *** emacs-21.3/lisp/pcvs.el.orig Sat Sep 22 14:23:16 2001
> --- emacs-21.3/lisp/pcvs.el Tue Sep  9 12:54:51 2003
> ***************
> *** 1515,1526 ****
>    (defun cvs-retrieve-revision (fileinfo rev)
>      "Retrieve the given REVision of the file in FILEINFO into a new
buffer."
>      (let* ((file (cvs-fileinfo->full-path fileinfo))
> ! (buffile (concat file "." rev)))
>        (or (find-buffer-visiting buffile)
>    (with-current-buffer (create-file-buffer buffile)
>      (message "Retrieving revision %s..." rev)
> !   (let ((res (call-process cvs-program nil t nil
> !
>    "-q" "update" "-p" "-r" rev file)))
>        (when (and res (not (and (equal 0 res))))
>          (error "Something went wrong retrieving revision %s: %s" rev
res))
>        (set-buffer-modified-p nil)
> --- 1515,1529 ----
>    (defun cvs-retrieve-revision (fileinfo rev)
>      "Retrieve the given REVision of the file in FILEINFO into a new buffe
r."
>      (let* ((file (cvs-fileinfo->full-path fileinfo))
> ! (buffile (concat file "." rev))
> ! (cvs-coding-system buffer-file-coding-system))
>        (or (find-buffer-visiting buffile)
>    (with-current-buffer (create-file-buffer buffile)
>      (message "Retrieving revision %s..." rev)
> !   (let* ((process-coding-system-alist
> !   (list (cons (regexp-quote cvs-program) cvs-coding-system)))
> ! (res (call-process cvs-program nil t nil
> !
>     "-q" "update" "-p" "-r" rev file)))
>        (when (and res (not (and (equal 0 res))))
>          (error "Something went wrong retrieving revision %s: %s" rev
res))
>        (set-buffer-modified-p nil)
>
> -- 
> Kevin Rodgers
>




reply via email to

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