unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Re: Copy Paste in no-x11 mode (emacs -nw)
@ 2008-09-26 12:26 Simeon Nifos
  2008-09-26 15:00 ` Jonathan Groll
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Simeon Nifos @ 2008-09-26 12:26 UTC (permalink / raw)
  To: help-gnu-emacs

On Fri, Sep 26, 2008 at 12:40 PM,  <help-gnu-emacs-request@gnu.org> wrote:
> Send help-gnu-emacs mailing list submissions to
>        help-gnu-emacs@gnu.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
> or, via email, send a message with subject or body 'help' to
>        help-gnu-emacs-request@gnu.org
>
> You can reach the person managing the list at
>        help-gnu-emacs-owner@gnu.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of help-gnu-emacs digest..."
>
>
Hello,
I will answer to all of you within this single post:

> What are you using to paste in vim.  "p"?  To my knowledge that
> shouldn't work, either.  (And doesn't, on my machine.)

I highlight text with the mouse and then press the middle mouse button
in vim where I want to paste it and it does it without destroying the
format. I had to do some searching for corresponding configuration
of the VIM .vimrc, and also use VIM compiled with clipboard enabled.
If you type
$ vim --version
VIM - Vi IMproved 7.1 (2007 May 12, compiled Oct  5 2007 01:40:01)
Included patches: 1-56
Compiled by buildd@crested.buildd
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv +cscope +cursorshape +dialog_con_gui +diff +digraphs +dnd -ebcdic
+emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path
+folding -footer +fork() +gettext -hangul_input +iconv +insert_expand +jumplist
 +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu
+mksession +modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm
-mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang -mzscheme
+netbeans_intg -osfiletype +path_extra +perl +postscript +printer +profile
+python +quickfix +reltime +rightleft +ruby +scrollbind +signs +smartindent
-sniff +statusline -sun_workshop +syntax +tag_binary +tag_old_static
-tag_any_white +tcl +terminfo +termresponse +textobjects +title +toolbar
+user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace
+wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact
+xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK
-DPNG_NO_MMX_CODE -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
-I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/freetype2 -I/usr/include/libpng12   -DORBIT2=1 -pthread
-DPNG_NO_MMX_CODE -I/usr/include/libgnomeui-2.0
-I/usr/include/libart-2.0 -I/usr/include/gconf/2
-I/usr/include/gnome-keyring-1 -I/usr/include/libgnome-2.0
-I/usr/include/libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0
-I/usr/include/gtk-2.0 -I/usr/include/gnome-vfs-2.0
-I/usr/lib/gnome-vfs-2.0/include -I/usr/include/orbit-2.0
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
-I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0
-I/usr/include/libxml2 -I/usr/include/pango-1.0
-I/usr/include/freetype2 -I/usr/include/gail-1.0
-I/usr/include/atk-1.0 -I/usr/lib/gtk-2.0/include -I/usr/include/cairo
-I/usr/include/libpng12     -O2 -g -Wall    -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBIAN  -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64  -I/usr/lib/perl/5.8/CORE
-I/usr/include/python2.5 -pthread -I/usr/include/tcl8.4
-D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1
-I/usr/lib/ruby/1.8/x86_64-linux
Linking: gcc   -L.  -rdynamic -Wl,-export-dynamic  -Wl,-E
-L/usr/local/lib -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
-lgdk_pixbuf-2.0 -lpangocairo-1.0 -lfontconfig -lXext -lXrender
-lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lpango-1.0
-lcairo -lXfixes -lgobject-2.0 -lgmodule-2.0 -lglib-2.0
-lgnomeui-2 -lbonoboui-2 -lgnomevfs-2 -lgnomecanvas-2 -lgnome-2 -lpopt
-lbonobo-2 -lbonobo-activation -lart_lgpl_2 -lgtk-x11-2.0
-lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lfontconfig
-lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite
-lXdamage -lpango-1.0 -lcairo -lXfixes -lgconf-2 -lgmodule-2.0
-lORBit-2 -lgthread-2.0 -lrt -lgobject-2.0 -lglib-2.0   -lXt -lncurses
-lgpm   -Wl,-E  -L/usr/local/lib
/usr/lib/perl/5.8/auto/DynaLoader/DynaLoader.a
-L/usr/lib/perl/5.8/CORE -lperl -L/usr/lib/python2.5/config
-lpython2.5 -lutil -Xlinker -export-dynamic -L/usr/lib -ltcl8.4 -lieee
-lruby1.8 -lm

this is what I get. Notice +clipboard and similar +clipboard_xterm and
other +mouse_xterm e.t.c. Most vim packages have disabled those
configurations. I am installing vim running in an Ubuntu/Debian based
system:
# apt-get install vim-full

If you have something similar then highlighting text somewhere and
pressing the middle mouse button will get you the copy paste effect
you ask for.

> * All keys work, regardless of terminal settings.
> * I can steal system keybindings (like cmd-h)
> * System integration (copy&paste)
> * Ability to spawn new frames (mostly for `gnus-other-frame')
> * Appearance modifiable by elisp
> * More and nicer colors
> * Tetris looks way better :)
> * Usable fringes (i.e. Edebug doesn't draw over text)
> * Scrollbar (I don't use it, but it's nice visual location info)
>

Nice GDB DEBUGGING interface.

> Speed is the most important thing -nw has, of course.  The looks on the
> other hand are very customizable.  Hiding the toolbar and menubar were
> the first things I did.

Can you tell us how?

Moreover, could you please tell us how to move the border up or down,
left or right separating the 2 windows the original window is splitted
to when one presses C-x 2, or C-x 3?


Guys this is amazing:
=================
Enabling syntax highlighting in vim, if you browse a huge C,C++ file,
you will see that vim slows down significantly even when running on
latest Intel Core 2 Duo processor. On the contrary emacs -nw with
syntax highlighting on is as fast as VIM without syntax highlighting
as if highlighting has no overhead at all.
=================



> If you use screen, you can copy from there just like in emacs:
> Assume screen prefix key is C-p: (default is C-a)
>
> C-p [ ==> SPC ==> C-f or/and C-n ==> >
>
> Now you have a copy of the text in a file named ~/.screen_exchange
> to set it, write in your .screenrc:
>
> ,----
> | bufferfile            $HOME/.screen_exchange
> `----
>
> Note: i think the default if you set nothing is /tmp/.screen_exchange
> but i am not sure.
>
> Now if you define a little function with a global-key like:
>
> ,----
> | (defun tv-yank-from-screen ()
> |   (interactive)
> |   (insert-file-contents "~/.screen_exchange"))
> |
> | (global-set-key (kbd "C-c Y") 'tv-yank-from-screen)
> `----
>
> you can now yank what you want from your terminal :)

Thank you for the long reply, but neither of those C-p or C-a works for me.

Jonathan thanks very very much. Shift-Insert works for me as well
I am running E17. I hate KDE since it is too buggy and very heavy as
a desktop. Not to mention that it crashes frequently and the latest 4.1
is a wrong decision from the very beginning.

> Put in those terms, the problem is then how to get M-w to also place
> the item into the system clipboard (for -nw), I would much rather do
> that than to have to reach for the mouse.

I agree, any ideas?

I would like to do the Shift-Insert thing with the mouse. The usual way,
highlight text and press middle mouse button for the paste. Any ideas?

Thank you all but lets try to get this a bit further since it is a
really useful
feature that is missing and it makes our life harder.




^ permalink raw reply	[flat|nested] 19+ messages in thread
[parent not found: <mailman.19960.1222401724.18990.help-gnu-emacs@gnu.org>]
* Re:Copy Paste in no-x11 mode (emacs -nw)
@ 2008-09-25 19:12 Simeon Nifos
  2008-09-26  8:17 ` Copy " Nikolaj Schumacher
       [not found] ` <mailman.19983.1222417070.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 19+ messages in thread
From: Simeon Nifos @ 2008-09-25 19:12 UTC (permalink / raw)
  To: help-gnu-emacs

> Message: 9
> Date: Thu, 25 Sep 2008 13:43:51 -0400
> From: Dan Espen <daneNO@MORE.mk.SPAMtelcordia.com>
> Subject: Re: Copy Paste in no-x11 mode (emacs -nw)
> To: help-gnu-emacs@gnu.org
> Message-ID: <icskrorui0.fsf@verizon.net>
> Content-Type: text/plain; charset=us-ascii
>
> "Simeon Nifos" <archwndas@googlemail.com> writes:
>
>> Dear list,
>> I like using emacs in nox11 mode. The Eterm terminal provides a great
>> font by default I really enjoy. It is smaller and I can work on more
>> source code than I do with the misc-fixed font of Xterm. So I usually
>> run emacs  with -nw. Unfortunately there is no way to copy paste
>> something from one emacs window to a terminal or from a terminal to
>> the emacs window I am editing. This is a real headache, since one of
>> the most foundamental stuff an editor is supposed to do, is to support
>> copy and paste of text from whatsoever source to the window where
>> editing takes place.
>
> No.

Really? Why not? Why so fundamental things which is common sense
are so easilly thrown into trash from Unixers? I love Unix myself. But ...
it could have been made much better and much popular if it allowed
what a person expects to have out of the box ... And I am not talking
about fancy (or should I call them stupid) KDE stuff.

> Copy/Paste is a function of the terminal, not Emacs, when you run
> Emacs in a terminal.

Hmmm, it seems however that VIM does it. I am working on the same
Eterm, terminal with VIM and the same thing works like a charm. Why
shouldn't it work with the famous EMACS as well? There are more
things in EMACS than there are in VIM, like debug, like autoformating
of text and C++ comments, and LaTeX documents which are enabled
by default in EMACS and not in VIM. If only the copy paste worked.
I would not need to abandon EMACS at all. Now I do.

>> Is there anyway I could activate this "underestimated" feature in the
>> mode I am using emacs? I apologize if this email sounds aggressive but
>> there are some things an editor is supposed to do by default and I
>> cannot understand why they are turned off in emacs.
>
> I don't know why you are having problems doing copy/paste in a terminal.
> You need to supply more information.  What OS are you using, what did you
> do, what happened.  What did you expect to happen.

Can you? I am using Linux. But the same holds for FreeBSD, Solaris.
Look what I get when I try to paste something on the terminal where
EMACS runs; I mean paste something outside emacs from another
emacs window or vim window or the browser. This is what is reported
  down in the command-buffer: "Kill ring is empty"

I do have enabled the following in my .emacs:
====================
(xterm-mouse-mode t)
(mouse-wheel-mode t)
(setq x-select-enable-clipboard t)
=====================

Anything else to try? Can you copy paste in terminal? And it makes no
difference if I use XTerm or Eterm. In both the Kill ring is empty.




^ permalink raw reply	[flat|nested] 19+ messages in thread
* Copy Paste in no-x11 mode (emacs -nw)
@ 2008-09-25 15:06 Simeon Nifos
  2008-09-25 17:43 ` Thierry Volpiatto
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Simeon Nifos @ 2008-09-25 15:06 UTC (permalink / raw)
  To: help-gnu-emacs

Dear list,
I like using emacs in nox11 mode. The Eterm terminal provides a great
font by default I really enjoy. It is smaller and I can work on more
source code than I do with the misc-fixed font of Xterm. So I usually
run emacs  with -nw. Unfortunately there is no way to copy paste
something from one emacs window to a terminal or from a terminal to
the emacs window I am editing. This is a real headache, since one of
the most foundamental stuff an editor is supposed to do, is to support
copy and paste of text from whatsoever source to the window where
editing takes place.

Is there anyway I could activate this "underestimated" feature in the
mode I am using emacs? I apologize if this email sounds aggressive but
there are some things an editor is supposed to do by default and I
cannot understand why they are turned off in emacs.

We all know that emacs and vim documentation (as well the
documentation and manpages of many other Unix apps) is not providing
what is supposed to. Too much text explaining features in an language
only the ones who already know understand without giving any .emacs
examples to help us catch up. Having that in mind is there any full
featured samples .emacs file with comments explaining what is done
here or there which enables in emacs everything that should be enabled
by default, or which provides the features which are mandatory for
editing source code and latex documents?

Best,
S.N.




^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2008-09-27  1:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.19937.1222363379.18990.help-gnu-emacs@gnu.org>
2008-09-25 17:43 ` Copy Paste in no-x11 mode (emacs -nw) Dan Espen
2008-09-26 12:26 Simeon Nifos
2008-09-26 15:00 ` Jonathan Groll
     [not found] ` <mailman.20006.1222441218.18990.help-gnu-emacs@gnu.org>
2008-09-26 15:18   ` Charles Sebold
2008-09-27  1:52     ` Kevin Rodgers
2008-09-26 16:58 ` Nikolaj Schumacher
     [not found] <mailman.19960.1222401724.18990.help-gnu-emacs@gnu.org>
2008-09-26  8:28 ` Sébastien Vauban
2008-09-26 15:29 ` Dan Espen
  -- strict thread matches above, loose matches on Subject: below --
2008-09-25 19:12 Simeon Nifos
2008-09-26  8:17 ` Copy " Nikolaj Schumacher
2008-09-26  9:02   ` Thierry Volpiatto
2008-09-26 12:04     ` Jonathan Groll
     [not found] ` <mailman.19983.1222417070.18990.help-gnu-emacs@gnu.org>
2008-09-26  8:57   ` Joost Kremers
2008-09-26 10:35     ` Thierry Volpiatto
2008-09-25 15:06 Simeon Nifos
2008-09-25 17:43 ` Thierry Volpiatto
2008-09-25 18:40   ` Dan Davison
2008-09-26  8:40     ` Nikolaj Schumacher
2008-09-26  9:22 ` Jonathan Groll
2008-09-26  9:40 ` Peter Dyballa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).