Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I upgraded recently to OpenSuSE 12.1 from 11.3 and now when I open any files in emacs from inside a screen session, I get a blank buffer. Let's say I open it as:

emacs myFile.txt

it will open to an empty buffer, not the file, and when I attempt to save something, it will ask for a file name to write to. This worked before the upgrade.

I assume screen is the issue here since emacs works fine outside of screen. Is there something I'm missing in the screen settings or is this a bug in something?

share|improve this question
    
What happens if you use emacs -nw myfile.txt? –  Keith Thompson Feb 12 '12 at 2:13
    
Same thing -- I actually have emacs-nox installed, so there is no XEmacs/window forwarding issues. –  tpg2114 Feb 12 '12 at 2:14
    
Are you invoking emacs from a shell or directly from screen? Whichever it is, try it the other way. What happens if you set $TERM to, say, "xterm"? (I'm grasping at atraws here.) –  Keith Thompson Feb 12 '12 at 8:47
    
Are you sure you're opening the file from the right directory? What happens if you try to open myFile.txt from within Emacs? –  Gilles Feb 12 '12 at 15:22
    
@KeithThompson when I changed $TERM inside my screen session from linux, it's default, to xterm it all magically started working! Any idea what that's about? Turn the comment into an answer. –  tpg2114 Feb 12 '12 at 15:48

2 Answers 2

up vote 0 down vote accepted

I'm posting this answer based on the discussion in the comments.

Trial and error indicates that changing $TERM from linux to xterm works around the problem.

I don't know why this would matter. From your description, with TERM=linux it's opening an empty buffer rather than the file, which is not the behavior I'd expect from a bad $TERM setting. And the default $TERM under screen should be "screen" anyway, unless one of your startup scripts changes it.

share|improve this answer

I had a similar issue on my new desktop computer, but my netbook, also running OpenSuSE 12.1 didn't have the problem. It took a while, but I did track down one difference between the two configurations, and it has solved my problem. It was this:

On the Hostname/DNS tab of the Network Settings utility (in YaST), I selected Assign Hostname to Loopback IP.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.