Bug 14615

Summary: [PATCH] Emacs scrambles the screen on the console
Product: Ports & Packages Reporter: Kevin Street <street>
Component: Individual Port(s)Assignee: taoka
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Kevin Street 1999-10-31 00:30:00 UTC
	Emacs run on the console is unusable because it scrambles the
	screen.  Problem caused by the late August (?) changes to -current
	which replaced libtermcap with a symlink to libncurses.

	Emacs tries to decode the string returned from tgetstr itself.
	Since the change in current the string is now in terminfo format
	rather than termcap format.
 
	The following patch forces Emacs to use the library
	versions of tparm and tgoto to do the decoding rather than 
	rolling its own.  It works by using the module intended for 
	Emacs running on terminfo machines (ie. it uses terminfo.c 
	rather than tparam.c).  I tried this (briefly) on -current 
	and -stable and it seems to work ok. 

	See also pr bin/14202 from Peter S. Housel.

Fix: Install the following as ports/editors/emacs20/patches/patch-ce
	or merge this patch with patch-ca since they both affect
	src/Makefile.in	

	Note: similar patches are likely needed for the other emacs ports.
How-To-Repeat: 
	Build the emacs port on current after the libtermcap changes.
	Run emacs on a text console.  Move the cursor.
Comment 1 Dag-Erling Smørgrav freebsd_committer freebsd_triage 1999-11-11 08:29:06 UTC
Responsible Changed
From-To: freebsd-ports->jseger

Proposed patch has been tested by several people (including yours truly) and 
found to work as advertised. Over to maintainer. 

Comment 2 Inagaki Kentaro 1999-11-11 09:56:34 UTC
From: Kevin Street <street@iname.com>
Subject: ports/14615: Emacs scrambles the screen on the console
Date: Sat, 30 Oct 1999 19:27:51 -0400 (EDT)

> 	Note: similar patches are likely needed for the other emacs ports.

Patch for editors/mule-common and editors/emacs20-dl.
It's good.

This is patches/patch-za.

--- src/s/freebsd.h.orig	Sun Oct 31 15:51:09 1999
+++ src/s/freebsd.h	Sun Oct 31 15:52:57 1999
@@ -43,7 +43,11 @@
 
 #define LIBS_DEBUG
 #define LIBS_SYSTEM -lutil -lcrypt -lxpg4
-#define LIBS_TERMCAP -ltermcap
+
+#ifdef HAVE_LIBNCURSES
+#define TERMINFO
+#define LIBS_TERMCAP -lncurses
+#endif
 
 #define SYSV_SYSTEM_DIR
 

----
Kentaro Inagaki
Comment 3 jseger freebsd_committer freebsd_triage 1999-11-25 22:21:58 UTC
Responsible Changed
From-To: jseger->taoka

Fix committed for emacs20, thanks.  Turned over to mule MAINTAINER for fixing the same bug 
with mule ports. 
Comment 4 taoka freebsd_committer freebsd_triage 2000-01-04 00:19:34 UTC
State Changed
From-To: open->closed

Committed the patch for editors/mule-common, thanks!