unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Stallman <rms@gnu.org>
Cc: user42@zip.com.au, emacs-devel@gnu.org
Subject: Re: po file charset via auto-coding-functions
Date: Wed, 09 Nov 2005 21:09:27 -0500	[thread overview]
Message-ID: <E1Ea1sV-0004la-MO@fencepost.gnu.org> (raw)
In-Reply-To: <E1ETrhy-00088K-00@etlken> (message from Kenichi Handa on Mon, 24 Oct 2005 11:05:06 +0900)

[I sent this message twice but did not get a response.
Could we get the discussion moving again?]

    The current problem is that on extracting vi.po in tar-mode,
    a function registered in file-coding-system-alist is called
    with a filename "vi.po".  So, that function can't check the
    contents of that file because it can't read the contents by
    insert-file-contents.

I see.

    The correct operation in a handler for insert-file-contents
    will be to find a buffer pretending to visit the file, and
    insert that buffer contents.  And, for that, we have to give
    buffer-file-name (e.g. /home/handa/x.tgz!vi.po") not the
    filename itself (e.g. vi.po) to
    find-operation-coding-system.  I think such a change is safe
    because, at least, all current entries in
    file-coding-system-alist checks only the tail of a filename.

If this means passing "/home/handa/x.tgz!vi.po" as the second argument
to find-operation-coding-system, I think it is not clean.  That
argument is documented to be _the same_ in meaning as the argument you
would pass to OPERATION, but this string isn't the same, isn't a valid
argument to insert-file-contents.

If we want to modify the calling convention of
find-operation-coding-system, we should do it in a cleaner way: by
binding a global variable.  That variable would be nil, normally.

I think the variable's value should be a buffer name.
If the variable is non-nil, it means "the file's contents
are already in this buffer".  And all the functions that handle
find-operation-coding-system for various file types should check
the variable.

I think that is a fairly clean solution.
What do you think?

  parent reply	other threads:[~2005-11-10  2:09 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-20 21:06 po file charset via auto-coding-functions Kevin Ryde
2005-10-21  2:18 ` Kenichi Handa
2005-10-21 22:46   ` Kevin Ryde
2005-10-22  1:43     ` Kenichi Handa
2005-10-22  2:01       ` Kevin Ryde
2005-10-22  2:39         ` Kenichi Handa
2005-10-22  2:50           ` Stefan Monnier
2005-10-22 22:44             ` Kevin Ryde
2005-10-24  1:39             ` Kenichi Handa
2005-10-22 15:51           ` Richard M. Stallman
2005-10-24  2:05             ` Kenichi Handa
2005-10-25 15:59               ` Richard M. Stallman
2005-11-02 10:27               ` Richard Stallman
2005-11-10  2:09               ` Richard Stallman [this message]
2005-11-10  3:49                 ` Stefan Monnier
2005-11-10 17:49                   ` Richard M. Stallman
2005-11-10 18:33                     ` Stefan Monnier
2005-11-11  7:42                       ` Richard M. Stallman
2005-11-18 13:08                         ` Kenichi Handa
2005-11-18 17:21                           ` Stefan Monnier
2005-11-19  0:30                             ` Kenichi Handa
2005-11-20  1:16                             ` Juri Linkov
2005-11-29 19:13                               ` Kevin Rodgers
2005-11-30  2:45                                 ` Juri Linkov
2005-11-30 19:01                                 ` Richard M. Stallman
2005-11-19 23:27                           ` Richard M. Stallman
2005-11-20 12:05                             ` Kenichi Handa
2005-12-28 17:01                               ` Richard M. Stallman
2005-12-29 11:47                                 ` Kenichi Handa
2005-12-30  2:18                                   ` Richard M. Stallman
2006-01-04  4:37                                     ` Kenichi Handa
2005-10-22 22:51       ` Kevin Ryde
2005-10-24  1:53         ` Kenichi Handa
2005-10-24  2:04           ` Kevin Ryde
2005-10-24  5:19             ` Kenichi Handa
2005-10-24 14:11               ` Stefan Monnier
2005-10-25  1:03                 ` Kenichi Handa
2005-10-24 23:35               ` Juri Linkov
2005-10-25  6:42                 ` Kenichi Handa
2005-10-25 20:27                 ` Richard M. Stallman
2005-10-21  4:49 ` Richard M. Stallman
2005-10-21 21:07   ` Kevin Ryde

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=E1Ea1sV-0004la-MO@fencepost.gnu.org \
    --to=rms@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=user42@zip.com.au \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).