Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23329 - Term emulation issues with xemacs
Summary: Term emulation issues with xemacs
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: XEmacs team
URL: http://forums.gentoo.org/viewtopic.ph...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-06-23 09:33 UTC by Raimondo Giammanco
Modified: 2006-12-09 08:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raimondo Giammanco 2003-06-23 09:33:57 UTC
The problem is descripted in the above URL;
to use the M-x term terminal emulation in xemacs
and being able to invoke commands like top in the
emulation, impossible with M-x shell, the following
steps have to be taken.

1) In ~/.bashrc have something like

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# /etc/skel/.bashrc:
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/skel/.bashrc,v 1.7 2002/11/18
 19:39:22 azarah Exp $

# This file is sourced by all *interactive* bash shells on startup.  This
# file *should generate no output* or it will break the scp and rcp commands.

# colors for ls, etc.
eval `dircolors -b /etc/DIR_COLORS`
alias d="ls --color"
alias ls="ls --color=auto"
alias ll="ls --color -l"

# Change the window title of X terminals 
case $TERM in
	xterm*|rxvtx)
		PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/$
HOME/~}\007"'
		#
		# PS1 must be set here accourfing to the NET
		export PS1='\[\033[01;32m\]\w \$ \[\033[00m\]'
		#
		;;
	screen)
		PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/$HO
ME/~}\033\\"'
		#
		# PS1 must be set here accourfing to the NET
		export PS1='\[\033[01;32m\]\w \$ \[\033[00m\]'
		#
		;;
	emacs|eterm)
		unalias ls
		#
		# PS1 must be set here accourfing to the NET
		export PS1='\w>'
		#
		;;
esac

##uncomment the following to activate bash-completion:
[ -f /etc/profile.d/bash-completion ] && source /etc/profile.d/bash-completion
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

2) in .xemacs/custom.el add 

(when (featurep 'xemacs)
  ;; this fixes awful stair-stepping when you do "M-x term", see:
  ;; http://list-archive.xemacs.org/xemacs-beta/200109/msg00139.html
  (add-hook 'term-exec-hook
            (lambda ()
              (set-buffer-process-coding-system 'binary 'binary))))


Now, this fixed my problem with the terminal emulator (to run there 
gdb, run programs, whatever). The last bit is to have the color,
it shold be possible to use colors with another ansi-color.el, but
I have still to investigate this.

If this problem was specific for my installation, and others 
can access with problems to the M-x term, I apologize 
for the unecessary bug report.


R.G.
Comment 1 Raimondo Giammanco 2003-06-23 10:04:54 UTC
Hello,

Apparently, if you add the following lines to ~/.xemacs/custom.el

----------------------
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
----------------------

You do not need to modify your .bashrc: the ansi commands to
render color and similia are handled by ansi-color.el.

Maybe they could be set in the global xemacs settings in the installation
phase, with an improved ebuild?

A user with a fresh installation and no customizzations should
modify the custom.el and verify that the standard settings
are ok with the xemacs terminal emulation..

R.G.
Comment 2 Maurice van der Pot (RETIRED) gentoo-dev 2004-12-15 12:46:07 UTC
Robert, can you check the status of this one?
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2005-07-21 15:37:06 UTC
Mass re-assign of really stale bugs; xemacs herd, please verify the status and
close them if these issues no longer exist. 
Comment 4 Hans de Graaff gentoo-dev Security 2006-12-09 08:11:04 UTC
I would rather not create a special Gentoo-specific custom.el unless it is really needed to accommodate Gentoo-specific installation requirements. Therefore I'm closing this bug.