[OpenIndiana-discuss] Tabs no longer expanded when cutting and pasting

Albert Lee trisk at opensolaris.org
Fri Mar 4 18:48:17 UTC 2011


On Fri, Mar 4, 2011 at 12:28 PM, Gary Mills <mills at cc.umanitoba.ca> wrote:
> I noticed this change with respect to Solaris 10 in both Openindiana
> 148 and Solaris 11 Express: when I cut text in one gnome-terminal
> window and paste it into another, tabs are no longer expanded to
> spaces.  I suppose this is better behavior because you generally want
> to retain the tabs.  However, it's a problem for me when I'm pasting
> into an emacs editor session within that terminal window.  In that
> case, emacs treats the tabs as an indentation command, the same as if
> I had typed them by hand.  The amount of indentation increases with
> each successive tab.
>
> The only solution I've found so far is to type:
>
>    M-x global-set-key<RET> <TAB> self-insert-command
>
> before I paste in the text.  Are there any better solutions?  I know
> that emacs in its own window doesn't have this problem, but there are
> times I need to run it in tty mode.
>

This is just a specific case of the more general problem of pasting
into an application that is not aware of the X selection/clipboard and
expects interactive input. Vim has :set paste for this - the Emacs
equivalent may be M-x fundamental-mode (or
http://stackoverflow.com/questions/986592/any-emacs-command-like-paste-mode-in-vim
). You'd be better off using an editor with X support.

-Albert



More information about the OpenIndiana-discuss mailing list