unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: "Jérôme Haguet" <jeje66@despammed.com>
Subject: Re: [PCL-CVS] Interactive diff on a utf-8 encoded file
Date: Wed, 10 Sep 2003 10:22:17 +0200	[thread overview]
Message-ID: <3f5edef6$0$20172$626a54ce@news.free.fr> (raw)
In-Reply-To: 3F5E223D.6020108@yahoo.com

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2665 bytes --]

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
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	other threads:[~2003-09-10  8:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-09 16:37 [PCL-CVS] Interactive diff on a utf-8 encoded file Jérôme Haguet
2003-09-09 17:56 ` Kevin Rodgers
2003-09-09 18:55   ` Kevin Rodgers
2003-09-10  8:22     ` Jérôme Haguet [this message]
2003-09-10 22:01       ` Kevin Rodgers
2003-09-11  7:54         ` Jérôme Haguet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='3f5edef6$0$20172$626a54ce@news.free.fr' \
    --to=jeje66@despammed.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).