Italics in Emacs on text terminal (rxvt-unicode)


Igor

I'm using Emacs running in urxvt and I can't get italics to work in Emacs despite terminal support.

Here is my current setup:

  • I haven't set it yet $TERM, so it's the default rxvt-unicode-256color.
  • Mine is ~/.Xdefaultsdefined URxvt.font: xft:Inconsolata:size=15as terminal font.
  • echo "\e[3mitalics\e[m"Running in a shell does pay off, so italics in the terminal basically works .italics

In customizing the "italic" face, it doesn't make any difference whether I select italic, oblique, normal, or romanas the value Slantattribute, nor does it if I don't set Slantthe attribute at all. I also tried this in combination with the way it was explicitly defined URxvt.italicFontin mine ~/.Xdefaults, but to no avail.

Bold works fine, italics doesn't work at all. Any ideas?

Riccardo Murri

In short: you can't use the current version of Emacs (checked with 23.2), but see below for possible workarounds.

Longer story: support for italics is coded in the terminfo database as sitm(enter italic) and ritm(exit italic) features (aka ZHand ZRtermbase compatibility); you can check if your terminal supports them by:

infocmp $TERM | egrep '(sitm|ritm)'

If it doesn't exist, your rxvt-unicode-256colorterminal description doesn't provide information to the ncurses library about the terminal's italic capabilities, you may need to add them, otherwise, italic cannot be used by any TTY application.

However, the function for managing the terminal display turn_on_face(in the Emacs source code, in the file src/term.con lines 1919--2012 ) does not provide support for italics: it checks the bold/dim/blink/underline properties of the face. Actually, there is no "italic" property encoded as struct face.

Indeed, my Emacs (version 23.1 on Ubuntu 11.04 natty) displays the underlined font in italics in TTY (correctly in X11) . (This means that if you don't care about underscores, you can change your terminal's terminfo description to use enter/exit italic escape sequences instead of enter/exit underscores and get italics.)

Related


Italics in Emacs on text terminal (rxvt-unicode)

Igor I'm using Emacs running in urxvt and I can't get italics to work in Emacs despite terminal support. Here is my current setup: I haven't set it yet $TERM, so it's the default rxvt-unicode-256color. Mine is ~/.Xdefaultsdefined URxvt.font: xft:Inconsolata:si

italics in emacs

Eastafri I'm a bit new to emacs. I am editing a document in latex and I want to write some words in italics. I want a simple macro where if you put the cursor on a word and press a key combination, the word is surrounded by italics like this \textit{word}. Is

italics in emacs

Eastafri I'm a bit new to emacs. I am editing a document in latex and I want to write some words in italics. I want a simple macro where if you put the cursor on a word and press a key combination, the word is surrounded by italics like this \textit{word}. Is

Select text in tmux under rxvt-unicode (urxvt)

Brian I've only recently started experimenting with a urxvtterminal emulator instead xterm. I'm a heavy tmuxuser so had to get the two to work together seamlessly. I've noticed that when running tmuxinternally urxvt, there is some strange behavior when selecti

Select text in tmux under rxvt-unicode (urxvt)

Brian I've only recently started experimenting with a urxvtterminal emulator instead xterm. I'm a heavy tmuxuser so had to get the two to work together seamlessly. I've noticed that when running tmuxinternally urxvt, there is some strange behavior when selecti

Select text in tmux under rxvt-unicode (urxvt)

Brian I've only recently started experimenting with a urxvtterminal emulator instead xterm. I'm a heavy tmuxuser so had to get the two to work together seamlessly. I've noticed that when running tmuxinternally urxvt, there is some strange behavior when selecti

Select text in tmux under rxvt-unicode (urxvt)

Brian I've only recently started experimenting with a urxvtterminal emulator instead xterm. I'm a heavy tmuxuser so had to get the two to work together seamlessly. I've noticed that when running tmuxinternally urxvt, there is some strange behavior when selecti

Is there a (lightweight) alternative to `rxvt-unicode`?

Buffalo I am currently rxvt-unicodeusing as a terminal emulator. Since I also like the configurability of GNOME and KDE's terminal emulators, I'm wondering if there is some sort of alternative that can replace GNOME or KDE Terminal, but rxvt-unicodewith more f

Is there a (lightweight) alternative to `rxvt-unicode`?

Buffalo I am currently rxvt-unicodeusing as a terminal emulator. Since I also like the configurability of GNOME and KDE's terminal emulators, I'm wondering if there is some sort of alternative that can replace GNOME or KDE Terminal, but rxvt-unicodewith more f

Is there a (lightweight) alternative to `rxvt-unicode`?

Buffalo I am currently rxvt-unicodeusing as a terminal emulator. Since I also like the configurability of GNOME and KDE's terminal emulators, I'm wondering if there is some sort of alternative that would replace GNOME or KDE Terminal, but rxvt-unicodewith more

rxvt-unicode does not display unicode characters

random document I don't understand why rxvt-unicodesome unicode characters are not displayed correctly, like ☁or ☂both ⚡. As shown in the screenshot, these symbols are replaced by a small box: Here is my locale: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE=

rxvt-unicode does not display unicode characters

random document I don't understand why rxvt-unicodesome unicode characters are not displayed correctly, like ☁or ☂both ⚡. As shown in the screenshot, these symbols are replaced by a small box: Here is my locale: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE=

rxvt-unicode does not display unicode characters

random document I don't understand why rxvt-unicodesome unicode characters are not displayed correctly, like ☁or ☂both ⚡. As shown in the screenshot, these symbols are replaced by a small box: Here is my locale: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE=

Separating line numbers from text in Terminal: Emacs

username When I run emacs in terminal mode with the global-linum-mode option enabled, the line numbers are very close to my text, which really annoys the eyes. Is there a way to separate line numbers from text in Emacs? Anton Kovalenko Try setting linum-format

Separating line numbers from text in Terminal: Emacs

username When I run emacs in terminal mode with the global-linum-mode option enabled, the line numbers are very close to my text, which really annoys the eyes. Is there a way to separate line numbers from text in Emacs? Anton Kovalenko Try setting linum-format

Separating line numbers from text in Terminal: Emacs

username When I run emacs in terminal mode with the global-linum-mode option enabled, the line numbers are very close to my text, which really annoys the eyes. Is there a way to separate line numbers from text in Emacs? Anton Kovalenko Try setting linum-format

Separating line numbers from text in Terminal: Emacs

username When I run emacs in terminal mode with the global-linum-mode option enabled, the line numbers are very close to my text, which really annoys the eyes. Is there a way to separate line numbers from text in Emacs? Anton Kovalenko Try setting linum-format

Set new icon for rxvt-unicode

Charles S I am trying to use numix icons for rxvt-unicode. I didn't find an up-to-date discussion on this topic, but the ones I'm following are: https://bbs.archlinux.org/viewtopic.php?id=166210 My /.Xdefaults looks like: URxvt*iconFile: /usr/share/icons/Numix

Map-Shift-Tab in rxvt-unicode

Mark I want to map keybindings Ctrl++ to Shift. I managed to map + as follows. The corresponding entry isTabrxvt-unicodeCtrlTab.Xresources URxvt.keysym.Control-Tab: \033[27;5;9~ Confirm that this mapping is valid using :cat -v $ cat -v ^[[27;5;9~ ^[[27;5;9~T

rxvt-unicode-make fails with missing dependencies

Sebastian I'm trying to learn more about linux by exploring r/unixporn. I'm running on Debian Jessie Xfce and have the following: apt-get install libperl-dev git clone https://github.com/exg/rxvt-unicode.git ./configure --prefix=/usr --enable-everything && mak

Define color codes in rxvt-unicode

Sahinism Using some node.jstools like mochain my urxvtterminal, I have some problems with colored output. As you can see here , some text with color code 90 will disappear in the terminal. tput colorsThe output is: 256 and use the following command: (x=`tput o

Set new icon for rxvt-unicode

Charles S I am trying to use numix icons for rxvt-unicode. I didn't find an up-to-date discussion on this topic, but the ones I'm following are: https://bbs.archlinux.org/viewtopic.php?id=166210 My /.Xdefaults looks like: URxvt*iconFile: /usr/share/icons/Numix

Map-Shift-Tab in rxvt-unicode

Mark I want to map keybindings Ctrl++ to Shift. I managed to map + as follows. The corresponding entry isTabrxvt-unicodeCtrlTab.Xresources URxvt.keysym.Control-Tab: \033[27;5;9~ Confirm that this mapping is valid using :cat -v $ cat -v ^[[27;5;9~ ^[[27;5;9~T

rxvt-unicode-make fails with missing dependencies

Sebastian I'm trying to learn more about linux by exploring r/unixporn. I'm running on Debian Jessie Xfce and have the following: apt-get install libperl-dev git clone https://github.com/exg/rxvt-unicode.git ./configure --prefix=/usr --enable-everything && mak

Set new icon for rxvt-unicode

Charles S I am trying to use numix icons for rxvt-unicode. I didn't find an up-to-date discussion on this topic, but the ones I'm following are: https://bbs.archlinux.org/viewtopic.php?id=166210 My /.Xdefaults looks like: URxvt*iconFile: /usr/share/icons/Numix

How to Change Default Terminal to rxvt in Ubuntu

Guillermo How to set rxvt as default terminal in Ubuntu? judge Install rxvt on your system and run it sudo update-alternatives --config x-terminal-emulator. Then select rxvt, and you're done.

"rxvt" terminal emulator resets settings after logout

Abrit Pal Singh Whenever I log out, rxvt resets to its ugly out-of-the-box look. Then I had to run the following command to restore my settings. xrdb ~/.Xresourses Do I need to do this every time I log out? Please help this is what it looks like after login.