all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org, Miles Bader <miles@gnu.org>
Subject: Re: yet more term.el fixes #2
Date: Wed, 22 Sep 2004 19:14:02 -0700	[thread overview]
Message-ID: <200409230214.i8N2E4GK024796@scanner2.ics.uci.edu> (raw)
In-Reply-To: <jwvbrfy1996.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 22 Sep 2004 16:23:52 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> writes:

  > > (insert (string-as-unibyte (substring str i funny)))
  > 
  > I think string-as-unibyte is also an extremely poor choice here and will
  > likely lead to unexpected errors in some cases (it's a function that should
  > have big warning signs all around it, like string-as-multibyte).
  > 
  > Also calling set-buffer-multibyte is to be avoided if possible.
  > 
  > Can you try with
  > 
  >   (insert (decode-coding-string (substring str i funny) locale-coding-system))
  > Also based on your above code, it seems that `str' is a multibyte string,
  > which sounds wrong.  I think that the coding-system used for the process's
  > output should be `binary'.  Can you see what coding-system is used for
  > the process?

In term-exec-1:
 	(coding-system-for-read 'unknown-unix)

  > I suggest a patch like the one below,
[snip]

Did not work. 

It can be made work by binding: 

(default-enable-multibyte-characters t)

when creating the buffer in make-term  (so as to do what
set-buffer-multibyte used to do)

and binding 
(default-enable-multibyte-characters nil)
in term-exec-1. 

Now that this stuff work I found out that pasting non-ASCII text with
the mouse does not work. Pasting works by doing process-send-string
with the data from the kill ring. It seems that the string must be
encoded in some way. Any idea how to deal with that? 

  reply	other threads:[~2004-09-23  2:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-22  3:17 yet more term.el fixes #2 Dan Nicolaescu
2004-09-22  3:42 ` Miles Bader
2004-09-22  4:18   ` Dan Nicolaescu
2004-09-22  4:47     ` Miles Bader
2004-09-22 13:16       ` Stefan Monnier
2004-09-22 17:43         ` Dan Nicolaescu
2004-09-22 20:23           ` Stefan Monnier
2004-09-23  2:14             ` Dan Nicolaescu [this message]
2004-09-23 11:44               ` Stefan
2004-09-23 21:28                 ` Stefan Monnier

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=200409230214.i8N2E4GK024796@scanner2.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=emacs-devel@gnu.org \
    --cc=miles@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.