From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
Cc: emacs-devel@gnu.org, jasonr@gnu.org
Subject: Re: Codepages and shell function on w32
Date: Tue, 02 Jan 2007 16:39:14 +0100 [thread overview]
Message-ID: <459A7CA2.5010005@gmail.com> (raw)
In-Reply-To: <uzm92awau.fsf@gnu.org>
Eli Zaretskii wrote:
>> Date: Mon, 01 Jan 2007 15:20:47 +0100
>> From: "Lennart Borgman (gmail)" <lennart.borgman@gmail.com>
>> CC: Jason Rumney <jasonr@gnu.org>, emacs-devel@gnu.org
>>
>> (shell-mode)
>> (when (eq system-type 'windows-nt)
>> (let* ((shell-file-name prog)
>> (proc (get-buffer-process (current-buffer)))
>> (fullprog (executable-find prog))
>> (cp-out (read (format "cp%s" (w32-get-console-output-codepage))))
>> (cp-out-dos (coding-system-change-eol-conversion cp-out 'dos))
>> (cp-out-unix (coding-system-change-eol-conversion cp-out 'unix))
>> (cp-in (read (format "cp%s" (w32-get-console-codepage))))
>> (cp-in-dos (coding-system-change-eol-conversion cp-in 'dos))
>> (cp-in-unix (coding-system-change-eol-conversion cp-in 'unix)))
>> (cond
>> ((w32-shell-dos-semantics)
>> (set-process-coding-system proc cp-out-dos cp-in-unix))
>> ((string-match "/msys/" fullprog)
>> (message "think it is MSYS...")
>> (set-process-coding-system proc cp-out-dos 'undecided-unix))
>> ((string-match "/cygwin/" fullprog)
>> (message "think it is Cygwin...")
>> (set-process-coding-system proc cp-out-dos 'undecided-unix))
>> (t
>> (message "unrecognized shell program: %s" fullprog))
>> )))))
>> buffer)
>>
>> Is this what you meant Eli?
>>
>
> Something like that, but I doubt that using cp-out with MSYS and
> Cygwin is a good idea, since they don't support that.
>
The only reason to use cp-out-dos for MSYS and Cygwin is that this makes
the output correct for w32 console programs they may run. However I do
not know if it creates some problems since I do not know the char tables
very well. Maybe it is better to just leave the coding system for MSYS
and Cygwin as before?.
Do we agree about the cmdproxy part? How about installing that?
next prev parent reply other threads:[~2007-01-02 15:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-31 13:22 Codepages and shell function on w32 Lennart Borgman (gmail)
2006-12-31 22:04 ` Eli Zaretskii
2007-01-01 3:05 ` Lennart Borgman (gmail)
2007-01-01 5:49 ` Eli Zaretskii
2007-01-01 13:46 ` Lennart Borgman (gmail)
2007-01-01 6:08 ` Jason Rumney
2007-01-01 7:27 ` Eli Zaretskii
2007-01-01 14:20 ` Lennart Borgman (gmail)
2007-01-02 4:26 ` Eli Zaretskii
2007-01-02 15:39 ` Lennart Borgman (gmail) [this message]
2007-01-02 21:53 ` Benjamin Riefenstahl
2007-01-02 22:49 ` Lennart Borgman (gmail)
2007-01-06 0:47 ` Benjamin Riefenstahl
2007-01-06 1:55 ` Lennart Borgman (gmail)
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=459A7CA2.5010005@gmail.com \
--to=lennart.borgman@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=jasonr@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.