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

Gary Mills mills at cc.umanitoba.ca
Thu Mar 10 14:18:21 UTC 2011


On Fri, Mar 04, 2011 at 01:48:17PM -0500, Albert Lee wrote:
> 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
> 
> 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.

That's correct.

> 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
> ).

This doesn't actually work because tabs disappear completely.  I need
them either to be expanded to spaces or inserted literally, but not
deleted.

> You'd be better off using an editor with X support.

There are times, like with a serial console, when that isn't possible.

-- 
-Gary Mills-        -Unix Group-        -Computer and Network Services-



More information about the OpenIndiana-discuss mailing list