GNU bug report logs - #15402
24.3; Emacs and Mac OS Dock bad launch behavior

Previous Next

Packages: ns, emacs;

Reported by: Constantine Vetoshev <vetoshev <at> gmail.com>

Date: Tue, 17 Sep 2013 15:21:04 UTC

Severity: normal

Found in version 24.3

Done: Jan Djärv <jan.h.d <at> swipnet.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Constantine Vetoshev <vetoshev <at> gmail.com>
Subject: bug#15402: closed (Re: bug#15402: 24.3; Emacs and Mac OS Dock bad
 launch behavior)
Date: Sun, 29 Sep 2013 17:12:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#15402: 24.3; Emacs and Mac OS Dock bad launch behavior

which was filed against the emacs,ns package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 15402 <at> debbugs.gnu.org.

-- 
15402: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15402
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Constantine Vetoshev <vetoshev <at> gmail.com>, 15402-done <at> debbugs.gnu.org
Subject: Re: bug#15402: 24.3; Emacs and Mac OS Dock bad launch behavior
Date: Sun, 29 Sep 2013 19:11:01 +0200
Hello.

Finally got round to fixing this.  Closing.

	Jan D.

19 sep 2013 kl. 23:30 skrev Stefan Monnier <monnier <at> iro.umontreal.ca>:

>>>> This is NOT required when launching Emacs from the command line!
>>> Typically, the difference between the two is that running Emacs from the
>>> command line runs it with environment variables set by your shell's init
>>> scripts, whereas running it from the GUI does not have those
>>> env-vars set.
>>> IOW please compare M-: process-environment RET in the two cases, it will
>>> probably contain a clue.
>> I already checked, LANG is needed to be set properly in the environment, and
>> it isn't when laucnhng from dock.  M-x setenv doesn't help, as it really
>> doesn't setenv anything (should be renamed IMHO).
> 
> IIRC, under Darwin, everything along the lines of locale-coding-system,
> keyboard-codind-system, terminal-coding-system, etc... should always be
> utf-8.  So we probably don't need to look at LANG to make that decision.
> 
> 
>        Stefan


[Message part 3 (message/rfc822, inline)]
From: Constantine Vetoshev <vetoshev <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; Emacs and Mac OS Dock bad launch behavior
Date: Tue, 17 Sep 2013 01:25:18 -0700
[Message part 4 (text/plain, inline)]
When Emacs is launched from its icon in the Mac OS Dock, all modes
derived from term (such as M-x ansi-term) exhibit strange behavior:
printing a long line which contains a Unicode character causes line
truncation and generally puts the terminal in a bad state. Resetting the
terminal fixes the problem.

The problem does NOT occur when Emacs is launched from the command
line, i.e., the terminal modes all work correctly if Emacs is invoked by
running the following at a (non-Emacs) shell:
"/Applications/Emacs.app/Contents/MacOS/Emacs"

The problem does not seem to be related to any Emacs initialization code
in .emacs or init.el. It occurs consistently when all initialization
code is commented out.

Attached is a sample file which causes the problem; just save it, launch a
shell in ansi-term, and cat the file.

In addition, when launched from the Dock, ansi-term requires something
like the following to display Unicode characters correctly:

(defadvice ansi-term (after advice-ansi-term activate)
  (set-buffer-process-coding-system 'utf-8-unix 'utf-8-unix))

This is NOT required when launching Emacs from the command line!

[test.txt (text/plain, attachment)]
[Message part 6 (text/plain, inline)]

In GNU Emacs 24.3.1 (x86_64-apple-darwin12.2.0, NS apple-appkit-1187.34)
 of 2013-03-10 on athena.local
Windowing system distributor `Apple', version 10.3.1187
Configured using:
 `configure '--with-ns''

Important settings:
  value of $LC_COLLATE: C
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t


This bug report was last modified 11 years and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.