all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
@ 2013-08-03 20:46 Chris Seberino
  2013-08-03 21:28 ` Drew Adams
                   ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Chris Seberino @ 2013-08-03 20:46 UTC (permalink / raw)
  To: help-gnu-emacs

I like binding Ctrl-c to kill-ring-save (i.e. copy) which is pretty standard in many situations....

(global-set-key (kbd "C-c") 'kill-ring-save)

My goal is be able to highlight regions with the mouse and use C-c to copy that region for pasting later somewhere else...

It seems to be very flaky.  It seems to *sometimes* work and sometimes not
when I highlight a region with the mouse.

In fact, I was trying to debug and it kept working in lots of different situations which was odd.

cs



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

* RE: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-03 20:46 Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing Chris Seberino
@ 2013-08-03 21:28 ` Drew Adams
  2013-08-04 14:00 ` Emanuel Berg
       [not found] ` <mailman.2461.1375565325.12400.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 24+ messages in thread
From: Drew Adams @ 2013-08-03 21:28 UTC (permalink / raw)
  To: Chris Seberino, help-gnu-emacs

> I like binding Ctrl-c to kill-ring-save (i.e. copy) which is pretty standard
> in many situations....

If you want that, consider using `cua-mode'.

> (global-set-key (kbd "C-c") 'kill-ring-save)

Don't do that.  `C-c' is a prefix key for lots of stuff in Emacs.
Use `cua-mode' if you really must use `C-c' for copying.
See `C-h r g cua bindings'.



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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-03 20:46 Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing Chris Seberino
  2013-08-03 21:28 ` Drew Adams
@ 2013-08-04 14:00 ` Emanuel Berg
  2013-08-04 17:15   ` Drew Adams
       [not found]   ` <mailman.2479.1375636581.12400.help-gnu-emacs@gnu.org>
       [not found] ` <mailman.2461.1375565325.12400.help-gnu-emacs@gnu.org>
  2 siblings, 2 replies; 24+ messages in thread
From: Emanuel Berg @ 2013-08-04 14:00 UTC (permalink / raw)
  To: help-gnu-emacs

Chris Seberino <cseberino@gmail.com> writes:

> (global-set-key (kbd "C-c") 'kill-ring-save)
>
> My goal is be able to highlight regions with the mouse and use
> C-c to copy that region for pasting later somewhere else...
>
> It seems to be very flaky.  It seems to *sometimes* work and
> sometimes not when I highlight a region with the mouse.

You already got the answer, `M-x cua-mode' to get those shortcuts.

But, those are inferior to the Emacs arsenal of killing and
yanking shortcuts: kill a region, a line, a word, a word
backwards, killing but not erasing, etc.

The best thing to do is *not* using cua - that way, you have no
choice but to use the faster, more precise, and more ergonomic
Emacs shortcuts. And those will come to you virtually instantly.

Also, it is best to drop mouse use entirely, for the same (and
other) reasons. If you want to highlight a region, you can use M-h
(repeatedly, if needed), or you can use C-SPC to set the mark, and
then move the cursor with, for example, C-n/p.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* RE: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-04 14:00 ` Emanuel Berg
@ 2013-08-04 17:15   ` Drew Adams
  2013-08-05 20:37     ` Bob Proulx
       [not found]     ` <mailman.2575.1375735073.12400.help-gnu-emacs@gnu.org>
       [not found]   ` <mailman.2479.1375636581.12400.help-gnu-emacs@gnu.org>
  1 sibling, 2 replies; 24+ messages in thread
From: Drew Adams @ 2013-08-04 17:15 UTC (permalink / raw)
  To: Emanuel Berg, help-gnu-emacs

> Also, it is best to drop mouse use entirely, for the same (and
> other) reasons.
>
> If you want to highlight a region, you can use M-h (repeatedly, if
> needed), or you can use C-SPC to set the mark, and then move the
> cursor with, for example, C-n/p.

There you go again.  That's silly  (and irrelevant to the OP question).

It is not "best" to *not* use the mouse to select text, just as it is
not "best" to *use* the mouse to select text.

For some selection use cases, nothing beats the Emacs mouse (which is
not your grandmother's mouse, BTW).  For other use cases, keyboard
selection can be better.

The examples you gave (`M-h' and `C-SPC' + `C-n'...) are not great
arguments for preferring the keyboard to select arbitrary text or even
an arbitrary sexp or a set of contiguous lines.

A better example for your argument might be `C-M-@', but that still
depends on the cursor already being where you want to start the
selection, which is often the case but not always so.  When it is not,
you need to first move it there.

Still, one can reasonably compare (a) repeating `C-M-@' to select
sibling sexps, forward (there is no backward in this case), to (b)
double-clicking the first sexp to select and then clicking `mouse-3' at
the start of a sibling sexp to include (whether the last one in the
series or not and, if not, whether forward or backward - you can extend
the selection by sexps in either direction).

The real point, however, is that it is not necessarily the "best" idea
to advise newbies to adopt your particular preferences as the "best"
way to use Emacs.  It is one thing to say "I prefer XYZ" or "I do it
this way".  It is another thing to preach your way as The One True Way.

All of Emacs might be The One True Way ;-).  But in itself Emacs is
many different ways.  And that's the point of Emacs.

It is extensible and customizable, and its very definition and
features, even out-of-the-box, are themselves the result of extension
and customization by many different people with different preferences,
different ways of working and playing, and different purposes.

Above all editors and programming tools, Emacs offers multiple ways to
skin a cat.  There is no "best" way for everyone and all contexts, and
there is no practical limit to what you can do or how you can interact
with Emacs.

That is the first lesson that Emacs itself teaches.



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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
       [not found] ` <mailman.2461.1375565325.12400.help-gnu-emacs@gnu.org>
@ 2013-08-04 20:02   ` Chris Seberino
  2013-08-05  4:25     ` Rustom Mody
  2013-08-05  9:45     ` Emanuel Berg
  0 siblings, 2 replies; 24+ messages in thread
From: Chris Seberino @ 2013-08-04 20:02 UTC (permalink / raw)
  To: help-gnu-emacs

I love cua-mode!  They polished it much better than my little hacks!  So great.  Thanks alot.


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-04 20:02   ` Chris Seberino
@ 2013-08-05  4:25     ` Rustom Mody
  2013-08-05  9:45     ` Emanuel Berg
  1 sibling, 0 replies; 24+ messages in thread
From: Rustom Mody @ 2013-08-05  4:25 UTC (permalink / raw)
  To: help-gnu-emacs

On Monday, August 5, 2013 1:32:21 AM UTC+5:30, Chris Seberino wrote:
> I love cua-mode!  They polished it much better than my little hacks!  So
> great.  Thanks alot.

Not a habitual user of cua myself.
And yet it has some zany features (that are poorly documented):
For a good intro:
http://vimeo.com/1168225



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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
       [not found]   ` <mailman.2479.1375636581.12400.help-gnu-emacs@gnu.org>
@ 2013-08-05  9:05     ` Emanuel Berg
  2013-08-05 12:06       ` Emanuel Berg
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg @ 2013-08-05  9:05 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams <drew.adams@oracle.com> writes:

> There you go again.

...as did you.

> That's ... irrelevant to the OP question

It might be irrelevant to the OP's *question*, but not to the
OP's *behaviour*, as is indicated by his desire to use the mouse
and the cua keys.

That sounds like he is trying to use Emacs like his previous
editor, be it notepad++ or some integrated editor in an IDE. That
doesn't compute, so now he is trying to configure Emacs to behave
like that, instead.

And I say that's not a good idea. Not in general, and not with
regards to the cua keys, or the mouse.

> It is not "best" to *not* use the mouse to select text, just as
> it is not "best" to *use* the mouse to select text.

You might have something of a point here, if you do lots of
*edits* and *reorganizations* of text, and perhaps especially of
*code*, where you can work on chunks that are already organized
(by syntax, and by indentation) then I actually see the point of
using the mouse, because you could bind buttons to work on those
units.

But, that could be arranged with the keyboard as well (possibly
requiring some extra work to set it up). And moreover, if you do
edits, reorganizations, etc. all the time, and with such a need
for precision - perhaps you should write slower (mentally), and
with a higher degree of presence, rather than developing
Jedi-mouse skills?

That is actually something I hear all the time: "All I do at work
is Copy & Paste." And I *never* do that. (And I don't say you do
it, either, but this is something that I hear over and over, and
it mystifies me.)

> The Emacs mouse ... is not your grandmother's mouse

Isn't that the mouse you like, with your celebration of Engelbart?
Seriously, speaking of him, GNU Parallel just came with a new
release, named 'Engelbart' - after the very same, I take it.

> The examples you gave (`M-h' and `C-SPC' + `C-n'...) are not
> great arguments for preferring the keyboard to select arbitrary
> text or even an arbitrary sexp or a set of contiguous lines.

Those are just examples. The point is not how to do it with the
mouse vs. how to do it with the keyboard. The mouse has buttons
and the keyboard has buttons. The mouse moves around a pointer,
and the keyboard scrolls the buffer, and/or moves around the
cursor. So that far, it is a draw. But the keyboard does something
more: it types. And if you use the keyboard exclusively, you are
always in the position to type. And that is, after all, what you
do with an editor. Moving stuff around (that's already there) is,
while I admit, sometimes necessary, close to if not outright
overhead. The optimal way is to write it correct the first time
around, and you do that with - the keyboard. With practice, it
becomes easier. And I don't think the mouse helps in that process,
actually I think it is the other way around.

> The real point, however, is that it is not necessarily the
> "best" idea to advise newbies to adopt your particular
> preferences as the "best" way to use Emacs.  It is one thing to
> say "I prefer XYZ" or "I do it this way".  It is another thing
> to preach your way as The One True Way.

Well, when I write "A is best", if it makes you feel better, you
may read this as "I prefer A" or "I do it A". I don't see the
difference, really.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-04 20:02   ` Chris Seberino
  2013-08-05  4:25     ` Rustom Mody
@ 2013-08-05  9:45     ` Emanuel Berg
  2013-08-06  2:53       ` Chris Seberino
  1 sibling, 1 reply; 24+ messages in thread
From: Emanuel Berg @ 2013-08-05  9:45 UTC (permalink / raw)
  To: help-gnu-emacs

Chris Seberino <cseberino@gmail.com> writes:

> I love cua-mode!  They polished it much better than my little
> hacks!  So great.  Thanks alot.

You see, Drew, as expected, it didn't matter one bit what I
said. (Although I also mentioned cua-mode.) But if it doesn't
matter one bit, I might as well say it!

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-05  9:05     ` Emanuel Berg
@ 2013-08-05 12:06       ` Emanuel Berg
  2013-08-05 14:32         ` Rustom Mody
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg @ 2013-08-05 12:06 UTC (permalink / raw)
  To: help-gnu-emacs

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

> Well, when I write "A is best", if it makes you feel better, you
> may read this as "I prefer A" or "I do it A". I don't see the
> difference, really.

Actually, I take that back. Preferring is when you either didn't
think beforehand, or you won't bother arguing why you did or said
something.

A chic on the catwalk might prefer green to black.

But when the autonomous left clashes with the police, they wear
black because it makes them look scary, and black is associated
with anarchy and piracy, and it is a practical enough color to
agree upon, and helpful, because in the post-riot trials, if they
all wore black, identification will be tedious (and sometimes
impossible).

So you see, they don't prefer black, or think black is the best
color for a riot, it is, and that's why they use it.

And the girl? Perhaps she actually thinks a green dress matches
her stunning eyes, and she hopes at least someone will notice, and
that this will bring her a moment of joy, and/or even advance her
career.

Dig deep, and there is no preferring.

People should never hesitate conveying their thoughts, and if
caught on the spot, they should as calm and clear as possible
explain why they thought so.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-05 12:06       ` Emanuel Berg
@ 2013-08-05 14:32         ` Rustom Mody
  2013-08-05 16:02           ` Stefan Monnier
                             ` (2 more replies)
  0 siblings, 3 replies; 24+ messages in thread
From: Rustom Mody @ 2013-08-05 14:32 UTC (permalink / raw)
  To: help-gnu-emacs

On Monday, August 5, 2013 5:36:19 PM UTC+5:30, Emanuel Berg wrote:
> Emanuel Berg  writes:
> 
> > Well, when I write "A is best", if it makes you feel better, you
> > may read this as "I prefer A" or "I do it A". I don't see the
> > difference, really.
> 
> Actually, I take that back....

Good for you (and the world)
From recorded history when one bunch of humans have thought it right to kill another, it is because "I prefer A" (for some belief system A) has become unnoticed "A is best" and then "A is one and only"

http://stallman.org/saint.html is fun as long as it stays a joke


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-05 14:32         ` Rustom Mody
@ 2013-08-05 16:02           ` Stefan Monnier
       [not found]           ` <mailman.2542.1375718596.12400.help-gnu-emacs@gnu.org>
  2013-08-05 18:15           ` Emanuel Berg
  2 siblings, 0 replies; 24+ messages in thread
From: Stefan Monnier @ 2013-08-05 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

> http://stallman.org/saint.html is fun as long as it stays a joke

You are hereby excommunicated!


        Stefan "Heretic!"




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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
       [not found]           ` <mailman.2542.1375718596.12400.help-gnu-emacs@gnu.org>
@ 2013-08-05 16:09             ` Rustom Mody
  0 siblings, 0 replies; 24+ messages in thread
From: Rustom Mody @ 2013-08-05 16:09 UTC (permalink / raw)
  To: help-gnu-emacs

On Monday, August 5, 2013 9:32:46 PM UTC+5:30, Stefan Monnier wrote:
> > http://stallman.org/saint.html is fun as long as it stays a joke
> 
> You are hereby excommunicated!
> 
> 
>         Stefan "Heretic!"

So its stake for me?!?
[Ooo I love sizzlers]


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-05 14:32         ` Rustom Mody
  2013-08-05 16:02           ` Stefan Monnier
       [not found]           ` <mailman.2542.1375718596.12400.help-gnu-emacs@gnu.org>
@ 2013-08-05 18:15           ` Emanuel Berg
  2 siblings, 0 replies; 24+ messages in thread
From: Emanuel Berg @ 2013-08-05 18:15 UTC (permalink / raw)
  To: help-gnu-emacs

Rustom Mody <rustompmody@gmail.com> writes:

> Good for you (and the world) From recorded history when one
> bunch of humans have thought it right to kill another, it is
> because "I prefer A" (for some belief system A) has become
> unnoticed "A is best" and then "A is one and only"

I don't know what this has to do with anything, but for the record
I don't think it is right to kill other people, and by the way, I
have never been part of "a bunch of humans", anyway. I remember
doing a math exam just a couple of years back, and 70% of the
students failed, and it made me think because it was the first
time ever that I was part of the majority.

As for killing people, you are very insensitive even fooling
around with such thing. I remember the word from "The Fifth
Element" - time is not important, only life is. And I agree.

> http://stallman.org/saint.html is fun as long as it stays a joke

I didn't know of that page, so the joke is on you. What are you
talking about? I'm not here to have a constant feud with you!

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-04 17:15   ` Drew Adams
@ 2013-08-05 20:37     ` Bob Proulx
       [not found]     ` <mailman.2575.1375735073.12400.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 24+ messages in thread
From: Bob Proulx @ 2013-08-05 20:37 UTC (permalink / raw)
  To: help-gnu-emacs

Drew Adams wrote:
> Emanuel Berg wrote:
> > Also, it is best to drop mouse use entirely, for the same (and
> > other) reasons.
> >
> > If you want to highlight a region, you can use M-h (repeatedly, if
> > needed), or you can use C-SPC to set the mark, and then move the
> > cursor with, for example, C-n/p.
> 
> There you go again.  That's silly  (and irrelevant to the OP question).
> 
> It is not "best" to *not* use the mouse to select text, just as it is
> not "best" to *use* the mouse to select text.

I must throw myself into Emanuel's camp on this.  Because a person
might ask me, "How can I use my gas powered lawn mower as a hedge
trimmer."  (Check Snopes.)  I don't care if that is the OP's original
question or not.  I am most definitely not going to give them the
answer to the question they have asked!  I am however going to try to
direct them as to a better way to do the task in a safe and efficient
way doing it completely different from the way they have asked.

I don't like cua mode either and I dread the inevitable day when it
becomes the Emacs default setting.  I have no problem with people
using word for an editor because using other editors does not affect
me.  Right up until I am overwhelmed by users of other editors who
cause changes to my editor which does affect me.  Sigh.

> For some selection use cases, nothing beats the Emacs mouse (which is
> not your grandmother's mouse, BTW).  For other use cases, keyboard
> selection can be better.
> ...
> The real point, however, is that it is not necessarily the "best" idea
> to advise newbies to adopt your particular preferences as the "best"
> way to use Emacs.  It is one thing to say "I prefer XYZ" or "I do it
> this way".  It is another thing to preach your way as The One True Way.
> ...

When people ask questions on the Internet they often get answers from
the Internet.  Some of those answers will be useful.  Some will be
less useful.  Some will even be dangerous.  This is well known.  The
onus is upon the reader to apply common sense to all.

Because you don't know if the person answering is drunk in a pub or a
skilled expert having given careful thought to the problem.  And even
if the latter the discussion may be confusing and unclear and applied
incorrectly!

In any case I think when people ask questions it is okay to make
suggestions that go beyond the exact question they have asked and to
try to influence them to do something in the way that helps them the
most.  Someone asked me a vi question the other day and I still told
them how I did it in emacs.  They were smart enough to understand the
difference.

Bob



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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
       [not found]     ` <mailman.2575.1375735073.12400.help-gnu-emacs@gnu.org>
@ 2013-08-05 22:28       ` Emanuel Berg
  2013-08-05 23:32       ` Emanuel Berg
  1 sibling, 0 replies; 24+ messages in thread
From: Emanuel Berg @ 2013-08-05 22:28 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:

> I must throw myself into Emanuel's camp on this.

Let's not throw each other into any camps, alright? :) It's enough
to try to write as well-thought posts as possible. (But I saw that
you did that, as well.)

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
       [not found]     ` <mailman.2575.1375735073.12400.help-gnu-emacs@gnu.org>
  2013-08-05 22:28       ` Emanuel Berg
@ 2013-08-05 23:32       ` Emanuel Berg
  1 sibling, 0 replies; 24+ messages in thread
From: Emanuel Berg @ 2013-08-05 23:32 UTC (permalink / raw)
  To: help-gnu-emacs

Bob Proulx <bob@proulx.com> writes:

> I don't like cua mode either and I dread the inevitable day when
> it becomes the Emacs default setting.  I have no problem with
> people using word for an editor ...

Word is usually called a "word processor", because it liters the
files with metadata and format codes. (But, I suppose you could
set it to output plain text files, in what case I can't see how it
should not be considered an editor, in part. A lousy one, but
still.)

> ... because using other editors does not affect me.  Right up
> until I am overwhelmed by users of other editors who cause
> changes to my editor which does affect me.  Sigh.

I *do* have a problem that people use Word and the like. The end
result is never good. They don't enjoy writing it, and they don't
care to make it look good. (I guess this is OK, because I don't
have to write, or read it.) But, all this misery makes for
unhappy, frustrated people. They don't want to do fun things with
me, because all their energies are consumed being frustrated and
angry (or apathetic) at work: with Word, Outlook, and Access. It
really stinks :(

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-05  9:45     ` Emanuel Berg
@ 2013-08-06  2:53       ` Chris Seberino
  2013-08-06 21:51         ` Emanuel Berg
  0 siblings, 1 reply; 24+ messages in thread
From: Chris Seberino @ 2013-08-06  2:53 UTC (permalink / raw)
  To: help-gnu-emacs

On Monday, August 5, 2013 4:45:41 AM UTC-5, Emanuel Berg wrote:

> You see, Drew, as expected, it didn't matter one bit what I
> 
> said.

Thanks for your suggestions.
I did read what you said and I did file it in my the back of my mind for future consideration.  However, dropping (cua-mode t) into .emacs was a 2 second fix for now that I can do while I consider evaluating your suggestion of completely revamping my mouse usage.  That will take a little more time.

cs

cs


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-06  2:53       ` Chris Seberino
@ 2013-08-06 21:51         ` Emanuel Berg
  2013-08-07  7:12           ` Yuri Khan
       [not found]           ` <mailman.2634.1375859551.12400.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 24+ messages in thread
From: Emanuel Berg @ 2013-08-06 21:51 UTC (permalink / raw)
  To: help-gnu-emacs

Chris Seberino <cseberino@gmail.com> writes:

> I did read what you said and I did file it in my the back of my
> mind for future consideration.  However, dropping (cua-mode t)
> into .emacs was a 2 second fix for now that I can do while I
> consider evaluating your suggestion of completely revamping my
> mouse usage.  That will take a little more time.

Well, there are two things to this.

The mouse vs. keyboard is one thing. (I've said so much about that
perhaps it is enough.)

The cua vs. all the Emacs killing and yanking shortcuts is the
other thing.

But they are actually related! With the mouse, you tend to make a
selection. With the cua keys, you *only operate on selections*
(made by the mouse, or the keyboard - doesn't matter) - and this
is the huge limitation compared to the Emacs KY-keys - because
those operate on regions, too, but the also operate on point, and
the text around it.

Bottom line - with the KY-keys, you can kill and yank *without* a
region, or anything at all, actually:

kill-word
backward-kill-word
kill-line (with variation)
kill-sentence
etc.

This is why they are better - because when you have mastered them,
you get everything cua does, *and more*.

Also, they are good because they more or less mirror the
cursor/point navigation commands. They make you think in chunks of
text units, and not in a long string of chars... So, everything
comes at once, intuitively: the muscle memory, or "finger habits",
as some call it.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-06 21:51         ` Emanuel Berg
@ 2013-08-07  7:12           ` Yuri Khan
       [not found]           ` <mailman.2634.1375859551.12400.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 24+ messages in thread
From: Yuri Khan @ 2013-08-07  7:12 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

On Wed, Aug 7, 2013 at 4:51 AM, Emanuel Berg <embe8573@student.uu.se> wrote:

> Also, they are good because they more or less mirror the
> cursor/point navigation commands. They make you think in chunks of
> text units, and not in a long string of chars... So, everything
> comes at once, intuitively: the muscle memory, or "finger habits",
> as some call it.

Not really.

In CUA, selection mirrors navigation: you hold down Shift, all
navigation keys become selection keys. Shift+Left/Right for
characters, Shift+Ctrl+Left/Right for words, Shift+Up/Down for lines,
Shift+PgUp/PgDn for pages. After you’ve selected a region, you can
delete it, cut it, overwrite it (with a character or with a pasted
fragment), or search-and-replace it. This is the Object-Verb order or
the OOP interface.

In classic Emacs, killing bindings are vastly different from
navigation bindings:

C-b/f vs DEL/C-d (characters)
M-b/f vs M-DEL/M-d (words)
C-p/n vs ??/?? (lines; closest is C-S-DEL but different)
C-a/e vs ??/C-k (to start/end of line)
M-a/e vs M-k (sentence)
C-M-b/f vs C-M-k (sexp)
C-M-p/n vs ?? (list)

If anything, the navigation bindings mirror themselves (with modifier
key expanding the scope), and killing keys mirror themselves. This is,
I’d say, Adverb-Verb order. Or a variant of command-line interface
(but different because in CLI adverbs (option switches) come after the
verb).

Some people are more used to one word order, others to another.



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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
       [not found]           ` <mailman.2634.1375859551.12400.help-gnu-emacs@gnu.org>
@ 2013-08-07 11:27             ` Emanuel Berg
  2013-08-07 15:49               ` Yuri Khan
       [not found]               ` <mailman.2643.1375890595.12400.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 24+ messages in thread
From: Emanuel Berg @ 2013-08-07 11:27 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan <yuri.v.khan@gmail.com> writes:

> In CUA, selection mirrors navigation: you hold down Shift, all
> navigation keys become selection keys. Shift+Left/Right for
> characters, Shift+Ctrl+Left/Right for words, Shift+Up/Down for
> lines, Shift+PgUp/PgDn for pages.

And this stinks, because you have to *reach* for the arrow keys,
as is the case for PgUp/PgDn. But as I said, the cua method and
mouse use are linked. If you use the mouse (which I always
disencourage), you are not typing anyway, so then you could bind
what you mention to mouse buttons. (I guess this was the thing
Drew talked about when he said the Emacs mouse isn't just any
mouse.)

> In classic Emacs, killing bindings are vastly different from
> navigation bindings:
>
> C-b/f vs DEL/C-d (characters)
> M-b/f vs M-DEL/M-d (words)
> C-p/n vs ??/?? (lines; closest is C-S-DEL but different)
> C-a/e vs ??/C-k (to start/end of line)
> M-a/e vs M-k (sentence)
> C-M-b/f vs C-M-k (sexp)
> C-M-p/n vs ?? (list)

That doesn't matter because the shortcuts enter the muscle
memory. You don't think to invoke them. What is mirrored is the
break down of the text into logical units, consisting of smaller
units, and so on. Move a word forward, then kill a word forward,
etc. When you get your mind thinking about text/code in that way,
you don't travel Europe as an interrail punk anymore. You know
where you want to go, and that's where you are.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-07 11:27             ` Emanuel Berg
@ 2013-08-07 15:49               ` Yuri Khan
       [not found]               ` <mailman.2643.1375890595.12400.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 24+ messages in thread
From: Yuri Khan @ 2013-08-07 15:49 UTC (permalink / raw)
  To: Emanuel Berg; +Cc: help-gnu-emacs

On Wed, Aug 7, 2013 at 6:27 PM, Emanuel Berg <embe8573@student.uu.se> wrote:
> Yuri Khan <yuri.v.khan@gmail.com> writes:
>
>> In CUA, selection mirrors navigation: you hold down Shift, all
>> navigation keys become selection keys. Shift+Left/Right for
>> characters, Shift+Ctrl+Left/Right for words, Shift+Up/Down for
>> lines, Shift+PgUp/PgDn for pages.
>
> And this stinks, because you have to *reach* for the arrow keys,
> as is the case for PgUp/PgDn.

Yes but some keyboards move the arrow keys below the bottom row, so
you don’t have to reach too far. And Shift+movement keys also enter
the muscle memory, to the point that I have to specifically bind C-M-P
and C-M-N in nxml-mode to functions that extend the region over the
previous (resp. next) XML element.



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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
       [not found]               ` <mailman.2643.1375890595.12400.help-gnu-emacs@gnu.org>
@ 2013-08-08 10:30                 ` Emanuel Berg
  2013-08-09  5:02                   ` Chris Seberino
  0 siblings, 1 reply; 24+ messages in thread
From: Emanuel Berg @ 2013-08-08 10:30 UTC (permalink / raw)
  To: help-gnu-emacs

Yuri Khan <yuri.v.khan@gmail.com> writes:

> Yes but some keyboards move the arrow keys below the bottom row,
> so you don’t have to reach too far.

Perhaps better, still, I like my index fingers to always be at the
F and J buttons. Except when they are hitting other keys, of
course... Maybe "both hands at the middle letter row" is a better
way to describe it.

> And Shift+movement keys also enter the muscle memory

Yes.

> to the point that I have to specifically bind C-M-P and C-M-N in
> nxml-mode to functions that extend the region over the previous
> (resp. next) XML element.

And that is the *coolest* form of muscle memory, when it hooks to
the actual code (or markup) that you write (or edit). In general,
I don't like the notion of writing the same code (markup) every
day (as in "I'm a C programmer", "What languages do you know?",
etc. - I think all programming is the same) - *but* one undeniable
advantage would be that you could be active with the material in
the way you describe.

Well, if you are super-human, I guess it is possible to be that
way with many PLs/markups, memorizing them all, or at least all
the ones you use habitually. Did anyone on the list master this?
Without underrating my own ability, because part of the point is
that the same keystrokes work for (almost) all modes, I do think
that 99% of my shortcut use isn't "task-specific".

Speaking of XML, it is possible that some of what you have learned
there also applies to HTML, and even to the Lisp family. Lispers
always say that XML is a reinvention of the Lisp wheel of nested
lists, and association lists (alists) for unrestricted markup.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-08 10:30                 ` Emanuel Berg
@ 2013-08-09  5:02                   ` Chris Seberino
  2013-08-09 15:08                     ` Emanuel Berg
  0 siblings, 1 reply; 24+ messages in thread
From: Chris Seberino @ 2013-08-09  5:02 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel

I appreciate all your thoughts on Emacs.  After reading your last email to me I now see that I'm already doing a hybrid of CUA mouse stuff and your keyboard
shortcuts.

I have keyboard shortcuts I've used for years to delete words and lines.
I can also highlight regions with the keyboard.

It seems I use the mouse when the region is far away from the cursor and/or the
region is large.

So I guess and hope I have kinda sorta have the best of both worlds!? ;)

cs


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

* Re: Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing
  2013-08-09  5:02                   ` Chris Seberino
@ 2013-08-09 15:08                     ` Emanuel Berg
  0 siblings, 0 replies; 24+ messages in thread
From: Emanuel Berg @ 2013-08-09 15:08 UTC (permalink / raw)
  To: help-gnu-emacs

Chris Seberino <cseberino@gmail.com> writes:

> I appreciate all your thoughts on Emacs.  After reading your
> last email to me I now see that I'm already doing a hybrid of
> CUA mouse stuff and your keyboard shortcuts ...

I'm happy I made you think about this. I guess a lot of people
don't. They go by instinct, and then they continue. That works
most of the time. But if you add a solid dosage of thinking on top
of a sound instinct, it would seem you are unstoppable. That's the
theory, anyway.

> I have keyboard shortcuts I've used for years ...

Yes, this is the old ski jumper/sky diver dilemma. It would seem a
ski jumper is ideal for sky diving. But often, he or she is not
agile enough. Perhaps it is better to just take a guy or girl from
the street, who knows nothing about jumping, and train him or her
from scratch? I don't know. As an optimist, I tend to believe that
you can learn anything, and from any starting point, with
training. Only, with work, family, etc., time for training can be
sparse...

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

end of thread, other threads:[~2013-08-09 15:08 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-03 20:46 Tried to bind Ctrl-c and to kill-ring-save (i.e. copy) and it *sometimes* doesn't work with mouse!?!? Very confusing Chris Seberino
2013-08-03 21:28 ` Drew Adams
2013-08-04 14:00 ` Emanuel Berg
2013-08-04 17:15   ` Drew Adams
2013-08-05 20:37     ` Bob Proulx
     [not found]     ` <mailman.2575.1375735073.12400.help-gnu-emacs@gnu.org>
2013-08-05 22:28       ` Emanuel Berg
2013-08-05 23:32       ` Emanuel Berg
     [not found]   ` <mailman.2479.1375636581.12400.help-gnu-emacs@gnu.org>
2013-08-05  9:05     ` Emanuel Berg
2013-08-05 12:06       ` Emanuel Berg
2013-08-05 14:32         ` Rustom Mody
2013-08-05 16:02           ` Stefan Monnier
     [not found]           ` <mailman.2542.1375718596.12400.help-gnu-emacs@gnu.org>
2013-08-05 16:09             ` Rustom Mody
2013-08-05 18:15           ` Emanuel Berg
     [not found] ` <mailman.2461.1375565325.12400.help-gnu-emacs@gnu.org>
2013-08-04 20:02   ` Chris Seberino
2013-08-05  4:25     ` Rustom Mody
2013-08-05  9:45     ` Emanuel Berg
2013-08-06  2:53       ` Chris Seberino
2013-08-06 21:51         ` Emanuel Berg
2013-08-07  7:12           ` Yuri Khan
     [not found]           ` <mailman.2634.1375859551.12400.help-gnu-emacs@gnu.org>
2013-08-07 11:27             ` Emanuel Berg
2013-08-07 15:49               ` Yuri Khan
     [not found]               ` <mailman.2643.1375890595.12400.help-gnu-emacs@gnu.org>
2013-08-08 10:30                 ` Emanuel Berg
2013-08-09  5:02                   ` Chris Seberino
2013-08-09 15:08                     ` Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.