unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to speed up cutting & pasting from/to emacs?
@ 2015-07-12 12:17 Sharon Kimble
  2015-07-12 16:11 ` Ian Zimmerman
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Sharon Kimble @ 2015-07-12 12:17 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 780 bytes --]

I'm involved in a project which involves a lot of pasting into emacs
From the clipboard, which is taking a long time.

--8<---------------cut here---------------start------------->8---
(setq kill-ring-max 300)
(setq save-interprogram-paste-before-kill t)
(setq x-select-enable-clipboard t)
--8<---------------cut here---------------end--------------->8---

That is from my init.org and is the only thing relating to the
clipboard.

How can I speed up the cutting and pasting please?

I've tried using the 'clipmon' program but that causes my emacs to
freeze, and sometimes the whole setup so that I have to reboot!

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: How to speed up cutting & pasting from/to emacs?
       [not found] <mailman.6773.1436703421.904.help-gnu-emacs@gnu.org>
@ 2015-07-12 15:24 ` Raffaele Ricciardi
  0 siblings, 0 replies; 17+ messages in thread
From: Raffaele Ricciardi @ 2015-07-12 15:24 UTC (permalink / raw)
  To: help-gnu-emacs

Here is a possible solution, complete with code. I have not tested it,
but I have solved a similar problem recently.  Anyway, use it at your
own risk, as they say.

You could write a script that transfers the current selection to the
clipboard and then asks Emacs to paste it.  Then you would bind this
script to a keyboard shortcut.  This way, you could select the text to
copy and then press that keyboard shortcut to paste it into Emacs.

I will assume that you have both the `xsel` and the `xbindkeys` programs
on your system.  Apparently, there are two different programs whose name
is `xsel` around...  Mine is version 1.2.0 by Conrad Parker.  I will also
assume that your Emacs instance is running as an *edit server*.

Let's call our script ~/bin/emacs-yank:


--8<---------------cut here---------------start------------->8---
#!/bin/sh

# Copy the current selection to the clipboard.
xsel --output | xsel --input --clipboard

# Ask Emacs to paste from the clipboard.
emacsclient --no-wait --eval "(yank)"
--8<---------------cut here---------------end--------------->8---


Remember to make the script executable:

     chmod +x ~/bin/emacs-yank

Here is the `~/.xbindkeysrc.scm` file to tell `xbindkeys` to bind
Windows+Alt+E to the above script (of course, you must adjust the
absolute path to the script):


--8<---------------cut here---------------start------------->8---
(xbindkey '(mod4 alt e) "/home/lele/bin/emacs-yank")
--8<---------------cut here---------------end--------------->8---


Remember to start `xbindkeys`:

     xbindkeys


That's all.  Good luck.


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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 12:17 How to speed up cutting & pasting from/to emacs? Sharon Kimble
@ 2015-07-12 16:11 ` Ian Zimmerman
  2015-07-12 17:28   ` Sharon Kimble
       [not found]   ` <mailman.6791.1436722135.904.help-gnu-emacs@gnu.org>
  2015-07-12 17:13 ` Emanuel Berg
  2015-07-12 17:35 ` Yuri Khan
  2 siblings, 2 replies; 17+ messages in thread
From: Ian Zimmerman @ 2015-07-12 16:11 UTC (permalink / raw)
  To: help-gnu-emacs

On 2015-07-12 13:17 +0100, Sharon Kimble wrote:

> How can I speed up the cutting and pasting please?
> 
> I've tried using the 'clipmon' program but that causes my emacs to
> freeze, and sometimes the whole setup so that I have to reboot!

Perhaps your problem is related to this:

https://lists.gnu.org/archive/html/gnu-emacs-sources/2008-04/msg00008.html

By the way, I am the author of the eclips.el module mentioned there, and
I guess it does the same thing as clipmon, but from within Emacs.  (Just
guessing here, I don't know clipmon.)  You may like to give eclips a try.

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 12:17 How to speed up cutting & pasting from/to emacs? Sharon Kimble
  2015-07-12 16:11 ` Ian Zimmerman
@ 2015-07-12 17:13 ` Emanuel Berg
  2015-07-12 18:02   ` Ian Zimmerman
  2015-07-12 18:58   ` Sharon Kimble
  2015-07-12 17:35 ` Yuri Khan
  2 siblings, 2 replies; 17+ messages in thread
From: Emanuel Berg @ 2015-07-12 17:13 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> I'm involved in a project which involves a lot of
> pasting into emacs From the clipboard, which is
> taking a long time.

The best answer/method is: don't do it!

What other program(s) are you using, to/from which you
copy/paste? Have you examined if Emacs can do what
these programs do, in what case you don't have that
problem anymore but can rely on kill/yank instead,
which is much more powerful and fast.

Examples, instead of - use: Thunderbird -> Gnus (what
I remember you already use that), Irssi -> ERC, man
pages with man/less in the shell -> M-x man RET,
Iceweasel/Firefox -> Emacs-w3m. And so on.

> How can I speed up the cutting and pasting please?

What do you mean "speed up", exactly? Do you use the
GUI Emacs in X? And in another window, you have
another program with text? Again, the best thing is if
what that program does can be done in Emacs, which is
very likely, and Emacs probably does it better as
well. If this can't be done for whatever reason, you
need a window manager in X with a shortcut to iterate
windows. I use Openbox with which it is possible to
select window with M-TAB (in Emacs' notation). So in
the other program you cut the text. Then hit M-TAB to
go to Emacs. Then hit whatever key you have assigned
to paste it, if it isn't integrated with the kill
ring already, in what case C-y is fine (it doesn't
matter in terms of speed if the "paste from clipboard"
shortcut is as short and close as C-y).

If this is the situation you already have, elaborate
further what you mean by making it faster.

In general,

1) Use Emacs for everything.

2) Don't use the mouse.

3) Use shortcuts that are short and close.

4) Integrate Emacs with external programs by setting
   up (keyboard) shortcuts to go to and from them.
   For example, if the M-TAB window iteration method
   isn't fast enough (if you have tons of windows),
   setup a shortcut in X (with xbindkeys) to go
   directly to the Emacs window, and then setup
   another shortcut to go directly to the program from
   which you copy text. This isn't difficult to do:
   use 'wmctrl'.

Keep on asking until you get it if you get stuck.
Things like this are very important and they are what
makes the difference between fun and productive and
miserable and somewhat less productive, and you don't
want to make that trade.

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 16:11 ` Ian Zimmerman
@ 2015-07-12 17:28   ` Sharon Kimble
       [not found]   ` <mailman.6791.1436722135.904.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 17+ messages in thread
From: Sharon Kimble @ 2015-07-12 17:28 UTC (permalink / raw)
  To: Ian Zimmerman; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1150 bytes --]

Ian Zimmerman <itz@buug.org> writes:

> On 2015-07-12 13:17 +0100, Sharon Kimble wrote:
>
>> How can I speed up the cutting and pasting please?
>> 
>> I've tried using the 'clipmon' program but that causes my emacs to
>> freeze, and sometimes the whole setup so that I have to reboot!
>
> Perhaps your problem is related to this:
>
> https://lists.gnu.org/archive/html/gnu-emacs-sources/2008-04/msg00008.html
>
> By the way, I am the author of the eclips.el module mentioned there, and
> I guess it does the same thing as clipmon, but from within Emacs.  (Just
> guessing here, I don't know clipmon.)  You may like to give eclips a try.

Thanks Ian for your reply.

I would like to try out 'eclips.el' if only I could find it! I googled
for it, and there were no hits for it, so please, where is it? Can you
give me an url, or package details of it on ELPA, which I can't find it
on there either? Plenty of hits for 'eclipse', but none for 'eclips.el'.
So please, where is it?

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: How to speed up cutting & pasting from/to emacs?
       [not found]   ` <mailman.6791.1436722135.904.help-gnu-emacs@gnu.org>
@ 2015-07-12 17:35     ` Rusi
  2015-07-12 18:20       ` Sharon Kimble
  2015-07-12 18:24       ` Ian Zimmerman
  0 siblings, 2 replies; 17+ messages in thread
From: Rusi @ 2015-07-12 17:35 UTC (permalink / raw)
  To: help-gnu-emacs

On Sunday, July 12, 2015 at 10:58:57 PM UTC+5:30, Sharon Kimble wrote:
> Ian Zimmerman writes:
> 
> > On 2015-07-12 13:17 +0100, Sharon Kimble wrote:
> >
> >> How can I speed up the cutting and pasting please?
> >> 
> >> I've tried using the 'clipmon' program but that causes my emacs to
> >> freeze, and sometimes the whole setup so that I have to reboot!
> >
> > Perhaps your problem is related to this:
> >
> > https://lists.gnu.org/archive/html/gnu-emacs-sources/2008-04/msg00008.html
> >
> > By the way, I am the author of the eclips.el module mentioned there, and
> > I guess it does the same thing as clipmon, but from within Emacs.  (Just
> > guessing here, I don't know clipmon.)  You may like to give eclips a try.
> 
> Thanks Ian for your reply.

> 
> I would like to try out 'eclips.el' if only I could find it! I googled
> for it, and there were no hits for it, so please, where is it? Can you
> give me an url, or package details of it on ELPA, which I can't find it
> on there either? Plenty of hits for 'eclipse', but none for 'eclips.el'.
> So please, where is it?

http://lists.gnu.org/archive/html/gnu-emacs-sources/2006-05/msg00057.html
maybe??

[Ian can I guess do better than that 😉 ]


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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 12:17 How to speed up cutting & pasting from/to emacs? Sharon Kimble
  2015-07-12 16:11 ` Ian Zimmerman
  2015-07-12 17:13 ` Emanuel Berg
@ 2015-07-12 17:35 ` Yuri Khan
  2 siblings, 0 replies; 17+ messages in thread
From: Yuri Khan @ 2015-07-12 17:35 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: help-gnu-emacs

On Sun, Jul 12, 2015 at 6:17 PM, Sharon Kimble
<boudiccas@skimble.plus.com> wrote:
> I'm involved in a project which involves a lot of pasting into emacs
> From the clipboard, which is taking a long time.
>
> I've tried using the 'clipmon' program but that causes my emacs to
> freeze, and sometimes the whole setup so that I have to reboot!

It looks like you may be affected by this bug:

http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16737



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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 17:13 ` Emanuel Berg
@ 2015-07-12 18:02   ` Ian Zimmerman
  2015-07-12 18:58   ` Sharon Kimble
  1 sibling, 0 replies; 17+ messages in thread
From: Ian Zimmerman @ 2015-07-12 18:02 UTC (permalink / raw)
  To: help-gnu-emacs

On 2015-07-12 19:13 +0200, Emanuel Berg wrote:

> What do you mean "speed up", exactly? Do you use the GUI Emacs in X?
> And in another window, you have another program with text? Again, the
> best thing is if what that program does can be done in Emacs, which is
> very likely, and Emacs probably does it better as well. If this can't
> be done for whatever reason, you need a window manager in X with a
> shortcut to iterate windows. I use Openbox with which it is possible
> to select window with M-TAB (in Emacs' notation). So in the other
> program you cut the text. Then hit M-TAB to go to Emacs. Then hit
> whatever key you have assigned to paste it, if it isn't integrated
> with the kill ring already, in what case C-y is fine (it doesn't
> matter in terms of speed if the "paste from clipboard" shortcut is as
> short and close as C-y).

There are dragons hiding there.  See

https://lists.debian.org/debian-emacsen/2002/08/msg00008.html

which, AFAIK, is still present in the Emacs I use (23.4).

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 17:35     ` Rusi
@ 2015-07-12 18:20       ` Sharon Kimble
  2015-07-12 18:24       ` Ian Zimmerman
  1 sibling, 0 replies; 17+ messages in thread
From: Sharon Kimble @ 2015-07-12 18:20 UTC (permalink / raw)
  To: Rusi; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1575 bytes --]

Rusi <rustompmody@gmail.com> writes:

> On Sunday, July 12, 2015 at 10:58:57 PM UTC+5:30, Sharon Kimble wrote:
>> Ian Zimmerman writes:
>> 
>> > On 2015-07-12 13:17 +0100, Sharon Kimble wrote:
>> >
>> >> How can I speed up the cutting and pasting please?
>> >> 
>> >> I've tried using the 'clipmon' program but that causes my emacs to
>> >> freeze, and sometimes the whole setup so that I have to reboot!
>> >
>> > Perhaps your problem is related to this:
>> >
>> > https://lists.gnu.org/archive/html/gnu-emacs-sources/2008-04/msg00008.html
>> >
>> > By the way, I am the author of the eclips.el module mentioned there, and
>> > I guess it does the same thing as clipmon, but from within Emacs.  (Just
>> > guessing here, I don't know clipmon.)  You may like to give eclips a try.
>> 
>> Thanks Ian for your reply.
>
>> 
>> I would like to try out 'eclips.el' if only I could find it! I googled
>> for it, and there were no hits for it, so please, where is it? Can you
>> give me an url, or package details of it on ELPA, which I can't find it
>> on there either? Plenty of hits for 'eclipse', but none for 'eclips.el'.
>> So please, where is it?
>
> http://lists.gnu.org/archive/html/gnu-emacs-sources/2006-05/msg00057.html
> maybe??
>
> [Ian can I guess do better than that 😉 ]

Thanks for this Rusi, I've now found the message and copied and pasted
it, so I hope to be using it soon. 

Thanks
Sharon
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 17:35     ` Rusi
  2015-07-12 18:20       ` Sharon Kimble
@ 2015-07-12 18:24       ` Ian Zimmerman
  1 sibling, 0 replies; 17+ messages in thread
From: Ian Zimmerman @ 2015-07-12 18:24 UTC (permalink / raw)
  To: help-gnu-emacs

On 2015-07-12 10:35 -0700, Rusi wrote:

> [Ian can I guess do better than that]

I just put it on github:

https://github.com/nobrowser/eclips

-- 
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 17:13 ` Emanuel Berg
  2015-07-12 18:02   ` Ian Zimmerman
@ 2015-07-12 18:58   ` Sharon Kimble
  2015-07-13  0:32     ` Emanuel Berg
  2015-07-13 15:30     ` Jorge A. Alfaro-Murillo
  1 sibling, 2 replies; 17+ messages in thread
From: Sharon Kimble @ 2015-07-12 18:58 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 3611 bytes --]

Emanuel Berg <embe8573@student.uu.se> writes:

> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
>> I'm involved in a project which involves a lot of
>> pasting into emacs From the clipboard, which is
>> taking a long time.
>
> The best answer/method is: don't do it!
>
> What other program(s) are you using, to/from which you
> copy/paste? Have you examined if Emacs can do what
> these programs do, in what case you don't have that
> problem anymore but can rely on kill/yank instead,
> which is much more powerful and fast.

Primarily 'zim' and pasting to and from 'JabRef', I'm mostly creating
bibtex records from a published bibliography on an article on the web,
which I've opened in w3m. I would use 'eew' if I could only find out how
to use tabs with it! 

>
> Examples, instead of - use: Thunderbird -> Gnus (what
> I remember you already use that), Irssi -> ERC, man
> pages with man/less in the shell -> M-x man RET,
> Iceweasel/Firefox -> Emacs-w3m. And so on.
>
>> How can I speed up the cutting and pasting please?
>
> What do you mean "speed up", exactly? Do you use the
> GUI Emacs in X? And in another window, you have
> another program with text? Again, the best thing is if
> what that program does can be done in Emacs, which is
> very likely, and Emacs probably does it better as
> well. If this can't be done for whatever reason, you
> need a window manager in X with a shortcut to iterate
> windows. I use Openbox with which it is possible to
> select window with M-TAB (in Emacs' notation). So in
> the other program you cut the text. Then hit M-TAB to
> go to Emacs. Then hit whatever key you have assigned
> to paste it, if it isn't integrated with the kill
> ring already, in what case C-y is fine (it doesn't
> matter in terms of speed if the "paste from clipboard"
> shortcut is as short and close as C-y).

By "speed-up" I mean that I have to wait for emacs to catch up with
where I've pasted something. Yes, emacs as a GUI along with using the
mouse.

Knowing that "Openbox" is similar to "fluxbox", exactly *what is*
your command in your "keys" page to access emacs again please? I know
how to *start* a program, but not how to *access* a currently running
program.

>
> If this is the situation you already have, elaborate
> further what you mean by making it faster.
>
> In general,
>
> 1) Use Emacs for everything.

Almost there. 
>
> 2) Don't use the mouse.

I've seen and read about how bad using the mouse is in terms of
potential RSI, but I still find it useful. 
>
> 3) Use shortcuts that are short and close.

Yes, getting there. 
>
> 4) Integrate Emacs with external programs by setting
>    up (keyboard) shortcuts to go to and from them.
>    For example, if the M-TAB window iteration method
>    isn't fast enough (if you have tons of windows),
>    setup a shortcut in X (with xbindkeys) to go
>    directly to the Emacs window, and then setup
>    another shortcut to go directly to the program from
>    which you copy text. This isn't difficult to do:
>    use 'wmctrl'.

I can easily utilise the "keys" program in fluxbox, which I had
forgotten about. 
>
> Keep on asking until you get it if you get stuck.
> Things like this are very important and they are what
> makes the difference between fun and productive and
> miserable and somewhat less productive, and you don't
> want to make that trade.

Will do. :)

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 18:58   ` Sharon Kimble
@ 2015-07-13  0:32     ` Emanuel Berg
  2015-07-13  0:51       ` Emanuel Berg
  2015-07-13 15:05       ` Sharon Kimble
  2015-07-13 15:30     ` Jorge A. Alfaro-Murillo
  1 sibling, 2 replies; 17+ messages in thread
From: Emanuel Berg @ 2015-07-13  0:32 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> Primarily 'zim' and pasting to and from 'JabRef',
> I'm mostly creating bibtex records from a published
> bibliography on an article on the web, which I've
> opened in w3m. I would use 'eew' if I could only
> find out how to use tabs with it!

When you say w3m, you mean Emacs-w3m, right? If not,
look for it in the Debian repos or Ubuntu ditto if you
are using that. On Debian, it is in a package called
"w3m-el-snapshot".

Emacs-w3m is more mature/seasoned than eew so probably
it has more power at this point. But such things can
change quickly.

There are tabs in Emacs-w3m, for sure. Here are some
config for those [1] - and in the directory below,
more on Emacs-w3m in general.

> By "speed-up" I mean that I have to wait for emacs
> to catch up with where I've pasted something.

What do you mean - "catch up"?

> Yes, emacs as a GUI along with using the mouse.
> Knowing that "Openbox" is similar to "fluxbox",
> exactly *what is* your command in your "keys" page
> to access emacs again please? I know how to *start*
> a program, but not how to *access* a currently
> running program.

I don't have any experience with fluxbox, but all
civilized WMs can be interacted with using the program
wmctrl. This should be in your repos as well, so
get it.

It works like this:

1) Type 'xman &' and 'xcalc &'. They should appear as
two neat little windows (for display purposes ONLY as
I wouldn't recommend using them for anything else).

2) Type 'wmctrl -l'. If it works you should see
something like this:

    0x00a00013  0 nl106-137-147 Calculator
    0x0080000e  0 nl106-137-147 xman

If it doesn't work, it means fluxbox is incompatible
with wmctrl, and this method won't work. (I don't
think that will happen.)

By the way, here is a useful alias:

    alias wins='wmctrl -l'

3) Type 'wmctrl -a xman'. The window of xman
should get into focus. Now, try to get to xcalc the
same way. But not exactly the same way! Remember the
output of 'wins' - xcalc wasn't refered to as "xcalc"
but as "Calculator", i.e. that what is appearing in
the title bar of the window of the program. Other than
that it is the same.

4) Now install xbindkeys, and start it with
'xbindkeys'. Confirm that it runs with

    ps -e | grep xbindkeys

(Later, to make it run each time you start X, put
'xbindkeys &' in ~/.xinitrc.)

5) Last, set up the shortcuts in ~/.xbindkeysrc.

"wmctrl -a Calculator"
  alt+k

"wmctrl -a xman"
  alt+w

6) Perhaps one can refresh xbindkeys somehow... If you
find out, tell me. If not, type 'pkill xbindkeys',
confirm it doesn't run, then run it again
with 'xbindkeys'.

7) Now hit Alt+k for xcalc, and Alt+w for xman!

Phew!

> I've seen and read about how bad using the mouse is
> in terms of potential RSI, but I still find
> it useful.

Using the mouse is bad for your arm/hand and eyes,
yes, call it what you want (RSI = Repetitive strain
injury, by the way), but in this context it is bad in
terms of *speed* as you have to move your hands back
and forth from typing position, which is the "asdf"
and "jkl;" keys for the left and right
hand, respectively.

This lack of speed also prolongs the time to do things
which enlarges the otherwise negative effects.
With typing on the other hand, some do it with such
speed they never stop :)

More, the mouse is also inefficient: "That one... no,
not this. This! The one to the left! Your left, yes
that one." Compare that to the professional discussion
in a work shop: "Open the crank with a pin wrench.
The lock ring is left threaded." It is just a whole
other level.

[1] http://user.it.uu.se/~embe8573/conf/emacs-init/w3m/w3m-tabs.el

Examples of the other files mentioned:

    http://user.it.uu.se/~embe8573/conf/.xbindkeysrc
    http://user.it.uu.se/~embe8573/conf/.xinitrc

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-13  0:32     ` Emanuel Berg
@ 2015-07-13  0:51       ` Emanuel Berg
  2015-07-13 15:05       ` Sharon Kimble
  1 sibling, 0 replies; 17+ messages in thread
From: Emanuel Berg @ 2015-07-13  0:51 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <embe8573@student.uu.se> writes:

> 7) Now hit Alt+k for xcalc, and Alt+w for xman!
>
> Phew!

By the way, tell me if you get it to work by following
the instruction.

Perhaps I can turn the post into a tutorial and send
it to the thrice-accursed Linux Magazines, or at least
put it on my homepage.

No idea reinventing the wheel. Except for that you get
better at it, each time a"round"...

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-13  0:32     ` Emanuel Berg
  2015-07-13  0:51       ` Emanuel Berg
@ 2015-07-13 15:05       ` Sharon Kimble
  2015-07-13 23:55         ` Emanuel Berg
  2015-07-27  1:36         ` Emanuel Berg
  1 sibling, 2 replies; 17+ messages in thread
From: Sharon Kimble @ 2015-07-13 15:05 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 4681 bytes --]

Emanuel Berg <embe8573@student.uu.se> writes:

Thanks for this Emanuel, extremely interesting and I've had a quick play
in between doing my housework, and I'm hoping to have a more serious
look later in the week, but at the moment I'm under pressure for writing
my book, plus ensuring I have all the necessary paperwork  and stuff for
two hospital visits this week. So I will get back to it in due course.

Thanks
Sharon.

> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
>> Primarily 'zim' and pasting to and from 'JabRef',
>> I'm mostly creating bibtex records from a published
>> bibliography on an article on the web, which I've
>> opened in w3m. I would use 'eew' if I could only
>> find out how to use tabs with it!
>
> When you say w3m, you mean Emacs-w3m, right? If not,
> look for it in the Debian repos or Ubuntu ditto if you
> are using that. On Debian, it is in a package called
> "w3m-el-snapshot".
>
> Emacs-w3m is more mature/seasoned than eew so probably
> it has more power at this point. But such things can
> change quickly.
>
> There are tabs in Emacs-w3m, for sure. Here are some
> config for those [1] - and in the directory below,
> more on Emacs-w3m in general.
>
>> By "speed-up" I mean that I have to wait for emacs
>> to catch up with where I've pasted something.
>
> What do you mean - "catch up"?
>
>> Yes, emacs as a GUI along with using the mouse.
>> Knowing that "Openbox" is similar to "fluxbox",
>> exactly *what is* your command in your "keys" page
>> to access emacs again please? I know how to *start*
>> a program, but not how to *access* a currently
>> running program.
>
> I don't have any experience with fluxbox, but all
> civilized WMs can be interacted with using the program
> wmctrl. This should be in your repos as well, so
> get it.
>
> It works like this:
>
> 1) Type 'xman &' and 'xcalc &'. They should appear as
> two neat little windows (for display purposes ONLY as
> I wouldn't recommend using them for anything else).
>
> 2) Type 'wmctrl -l'. If it works you should see
> something like this:
>
>     0x00a00013  0 nl106-137-147 Calculator
>     0x0080000e  0 nl106-137-147 xman
>
> If it doesn't work, it means fluxbox is incompatible
> with wmctrl, and this method won't work. (I don't
> think that will happen.)
>
> By the way, here is a useful alias:
>
>     alias wins='wmctrl -l'
>
> 3) Type 'wmctrl -a xman'. The window of xman
> should get into focus. Now, try to get to xcalc the
> same way. But not exactly the same way! Remember the
> output of 'wins' - xcalc wasn't refered to as "xcalc"
> but as "Calculator", i.e. that what is appearing in
> the title bar of the window of the program. Other than
> that it is the same.
>
> 4) Now install xbindkeys, and start it with
> 'xbindkeys'. Confirm that it runs with
>
>     ps -e | grep xbindkeys
>
> (Later, to make it run each time you start X, put
> 'xbindkeys &' in ~/.xinitrc.)
>
> 5) Last, set up the shortcuts in ~/.xbindkeysrc.
>
> "wmctrl -a Calculator"
>   alt+k
>
> "wmctrl -a xman"
>   alt+w
>
> 6) Perhaps one can refresh xbindkeys somehow... If you
> find out, tell me. If not, type 'pkill xbindkeys',
> confirm it doesn't run, then run it again
> with 'xbindkeys'.
>
> 7) Now hit Alt+k for xcalc, and Alt+w for xman!
>
> Phew!
>
>> I've seen and read about how bad using the mouse is
>> in terms of potential RSI, but I still find
>> it useful.
>
> Using the mouse is bad for your arm/hand and eyes,
> yes, call it what you want (RSI = Repetitive strain
> injury, by the way), but in this context it is bad in
> terms of *speed* as you have to move your hands back
> and forth from typing position, which is the "asdf"
> and "jkl;" keys for the left and right
> hand, respectively.
>
> This lack of speed also prolongs the time to do things
> which enlarges the otherwise negative effects.
> With typing on the other hand, some do it with such
> speed they never stop :)
>
> More, the mouse is also inefficient: "That one... no,
> not this. This! The one to the left! Your left, yes
> that one." Compare that to the professional discussion
> in a work shop: "Open the crank with a pin wrench.
> The lock ring is left threaded." It is just a whole
> other level.
>
> [1] http://user.it.uu.se/~embe8573/conf/emacs-init/w3m/w3m-tabs.el
>
> Examples of the other files mentioned:
>
>     http://user.it.uu.se/~embe8573/conf/.xbindkeysrc
>     http://user.it.uu.se/~embe8573/conf/.xinitrc

-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
Debian 8.0, fluxbox 1.3.7, emacs 24.5.50.2

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-12 18:58   ` Sharon Kimble
  2015-07-13  0:32     ` Emanuel Berg
@ 2015-07-13 15:30     ` Jorge A. Alfaro-Murillo
  1 sibling, 0 replies; 17+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2015-07-13 15:30 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble writes:

> Emanuel Berg <embe8573@student.uu.se> writes: 
> 
>> Sharon Kimble <boudiccas@skimble.plus.com> writes: 
>> 
>>> I'm involved in a project which involves a lot of pasting into 
>>> emacs From the clipboard, which is taking a long time. 
>> 
>> The best answer/method is: don't do it! 
>> 
>> What other program(s) are you using, to/from which you 
>> copy/paste?  Have you examined if Emacs can do what these 
>> programs do, in what case you don't have that problem anymore 
>> but can rely on kill/yank instead, which is much more powerful 
>> and fast. 
> 
> Primarily 'zim' and pasting to and from 'JabRef', I'm mostly 
> creating bibtex records from a published bibliography on an 
> article on the web, which I've opened in w3m. I would use 'eew' 
> if I could only find out how to use tabs with it!

Generally (at least for STEAM and medical fields) you can download 
the references of the article in bibtex format from the journal 
website.

I have a bash script ~/bin/emacsbib with the following:

#+BEGIN_SRC shell
  #!/bin/bash
  $HOME/bin/emacsclient -a '' -e "(jaam/bibtex-add-citation 
  \"${1}\")"
#+END_SRC

and then in my .emacs I have:

#+BEGIN_SRC emacs-lisp
  (defun jaam/bibtex-add-citation (filename &optional bibfile)
      (interactive)
      (if bibfile
          (find-file bibfile)
        (find-file (car bibtex-string-files)))
      (read-only-mode 0)
      (goto-char (point-max))
      (re-search-backward "}$" nil t)
      (forward-char 1)
      (delete-blank-lines)
      (insert "\n")
      (insert-file-contents filename))
#+END_SRC

Additionally you should set bibtex-string-files with a list of 
your reference files. Then opening a file from the browser with 
emacsbib yanks the citation to the first entry of 
bibtex-string-files.

This works with almost any journal, in rare (stupid) occasions, 
e.g.  Nature, the journal does not provide bibtex files, but they 
have RIS format. For those occasions I have another script 
~/bin/emacsris with:

#+BEGIN_SRC shell
  #!/bin/bash
  /usr/share/cb2bib/c2btools/ris2bib $1 /tmp/tempbib
  $HOME/bin/emacsbib /tmp/tempbib
#+END_SRC

You need to have the ris2bib script which in debian is part of the 
package cb2bib.

Best,
-- 
Jorge.




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-13 15:05       ` Sharon Kimble
@ 2015-07-13 23:55         ` Emanuel Berg
  2015-07-27  1:36         ` Emanuel Berg
  1 sibling, 0 replies; 17+ messages in thread
From: Emanuel Berg @ 2015-07-13 23:55 UTC (permalink / raw)
  To: help-gnu-emacs

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> Thanks for this Emanuel, extremely interesting and
> I've had a quick play in between doing my housework,
> and I'm hoping to have a more serious look later in
> the week, but at the moment I'm under pressure for
> writing my book, plus ensuring I have all the
> necessary paperwork and stuff for two hospital
> visits this week. So I will get back to it in
> due course.

*Laughter*

Women...

You don't have to worry about anything: it is all fun
and games here at gnu.emacs.help!

But I appreciate the comment tho unnecessary :)

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

* Re: How to speed up cutting & pasting from/to emacs?
  2015-07-13 15:05       ` Sharon Kimble
  2015-07-13 23:55         ` Emanuel Berg
@ 2015-07-27  1:36         ` Emanuel Berg
  1 sibling, 0 replies; 17+ messages in thread
From: Emanuel Berg @ 2015-07-27  1:36 UTC (permalink / raw)
  To: help-gnu-emacs

The tutorial, a bit more polished but otherwise
without news for those who read it the first time
around:

    http://user.it.uu.se/~embe8573/tut/shortcut-to-switch-to-specific-X-program.txt

-- 
underground experts united
http://user.it.uu.se/~embe8573




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

end of thread, other threads:[~2015-07-27  1:36 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-12 12:17 How to speed up cutting & pasting from/to emacs? Sharon Kimble
2015-07-12 16:11 ` Ian Zimmerman
2015-07-12 17:28   ` Sharon Kimble
     [not found]   ` <mailman.6791.1436722135.904.help-gnu-emacs@gnu.org>
2015-07-12 17:35     ` Rusi
2015-07-12 18:20       ` Sharon Kimble
2015-07-12 18:24       ` Ian Zimmerman
2015-07-12 17:13 ` Emanuel Berg
2015-07-12 18:02   ` Ian Zimmerman
2015-07-12 18:58   ` Sharon Kimble
2015-07-13  0:32     ` Emanuel Berg
2015-07-13  0:51       ` Emanuel Berg
2015-07-13 15:05       ` Sharon Kimble
2015-07-13 23:55         ` Emanuel Berg
2015-07-27  1:36         ` Emanuel Berg
2015-07-13 15:30     ` Jorge A. Alfaro-Murillo
2015-07-12 17:35 ` Yuri Khan
     [not found] <mailman.6773.1436703421.904.help-gnu-emacs@gnu.org>
2015-07-12 15:24 ` Raffaele Ricciardi

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