Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7769297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T16:07:29+00:00 2026-06-01T16:07:29+00:00

I have GNU Emacs 23 (package emacs23 ) installed on an Ubuntu 10.04 desktop

  • 0

I have GNU Emacs 23 (package emacs23) installed on an Ubuntu 10.04 desktop machine and package emacs23-nox installed on an Ubuntu 10.04 headless server (no X installed). Both installations have the same ~/.emacs file. I run Emacs with -nw on both computers. I don’t have python-mode installed on either machine as my understanding is that this is included in Emacs 23.

On the desktop machine, comments in Python (starting with #) are highlighted in red. On the server, comments appear in plain white text like all other non-highlighted text. Any suggestions as to why comments are not being highlighted correctly on the server (nox) installation?

Update: This appears to be a terminal-related issue. I ssh into the server machine from terminator via the screen replacement byobu. If I run emacs on the server with TERM="xterm-256color" emacs, then comments are highlighted, but all the other colours look very strange.

Update: Adding `export TERM=”xterm-256color” “solved” this. The syntax highlighting now has very strange colours though: purples lilacs and light browns. My green current line highlight bar is now a light pale yellow/green. Comments are highlighted in red though 🙂

Update: Solved. Setting TERM="xterm-color" produces “proper” colors, including highlighting of comments. The server was defaulting to a value of “screen-bce” for TERM which was not highlighting comments.

Update: Unsolved. byobu provides keybindings for various function keys to easily create new screen sessions and switch between them. When TERM is set to xterm-color, these function keys no longer work. So I guess I’ll just have to be happy with unhighlighted comments in Python code in Emacs.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T16:07:31+00:00Added an answer on June 1, 2026 at 4:07 pm

    For me running emacs -nw from inside byobu with TERM=xterm produced the correct colours for syntax highlighting (the comments in python and bash are all red not just the #) and the function keys work. Note I set TERM as part of an alias for running emacs rather than setting it generally in .bashrc:

    alias emacs='TERM=xterm; emacs -nw'

    See also this post: Terminal emacs colors only work with TERM=xterm-256color

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have GNU Emacs 23.4 installed (or, rather, unzipped) into C:\Program Files (x86)\emacs-23.4 on
given all the possible solutions to have a template system with GNU Emacs, what
Running GNU Emacs 22.2.1 on Ubuntu 9.04. When editing python code in emacs, if
I am using GNU emacs 23.1.1 on Fedora 12 I have this in my
gcc 4.6.0 GNU Emacs 23.2.1 I have some c code and at some point
I am on Mac (Lion), using GNU/Emacs version 24.1. I have created a VM,
In emacs (23.3.1, GNU) i have set a theme (doesn't matter which i use
I have problems setting up geben-on-emacs on Windows. I have: GNU Emacs 23.0.60.1 geben
I have emacs 24.1.1, which comes with GNU's python.el in byte-compiled form at emacs/24.1/lisp/progmodes.
I'm using GNU Emacs 22.2.1 and cperl 5.23. I have perl code like this:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.