unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: highlight with mouse then shouldn't need kill-ring-save?
       [not found]   ` <87hdl42khp.fsf@jidanni.org>
@ 2005-01-27 22:19     ` Richard Stallman
  2005-01-28  3:41       ` Luc Teirlinck
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Stallman @ 2005-01-27 22:19 UTC (permalink / raw)
  Cc: emacs-devel

    If we highlight a region with the mouse in emacs, it is available on
    the X windows paste buffer.

    But if we just set a mark and then say, go to the end of line, we see
    the region highlighted just the same, in blue, but it is not available
    on the X windows or emacs paste buffer.

Are you using transient mark mode?

Perhaps it would be good in transient mark mode
to set things up so that when the mark is active,
the region is available as a selection.

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

* Re: highlight with mouse then shouldn't need kill-ring-save?
  2005-01-27 22:19     ` highlight with mouse then shouldn't need kill-ring-save? Richard Stallman
@ 2005-01-28  3:41       ` Luc Teirlinck
  2005-01-28 11:34         ` David Kastrup
  2005-01-28 14:13         ` Richard Stallman
  0 siblings, 2 replies; 7+ messages in thread
From: Luc Teirlinck @ 2005-01-28  3:41 UTC (permalink / raw)
  Cc: emacs-devel, jidanni

Richard Stallman wrote:

   Perhaps it would be good in transient mark mode
   to set things up so that when the mark is active,
   the region is available as a selection.

The problem here is that if you use transient-mark-mode (I do) then
you activate the region often, for a variety of reasons, mostly
unrelated to the kill ring.  So if each time the active region got
copied to the kill ring, then the kill ring could easily get clobbered
with unwanted entries.  You can do M-w if you want to put the region
in the kill ring.

Sincerely,

Luc.

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

* Re: highlight with mouse then shouldn't need kill-ring-save?
  2005-01-28  3:41       ` Luc Teirlinck
@ 2005-01-28 11:34         ` David Kastrup
  2005-01-28 12:59           ` Stefan Monnier
  2005-01-28 14:13         ` Richard Stallman
  1 sibling, 1 reply; 7+ messages in thread
From: David Kastrup @ 2005-01-28 11:34 UTC (permalink / raw)
  Cc: jidanni, rms, emacs-devel

Luc Teirlinck <teirllm@dms.auburn.edu> writes:

> Richard Stallman wrote:
>
>    Perhaps it would be good in transient mark mode
>    to set things up so that when the mark is active,
>    the region is available as a selection.
>
> The problem here is that if you use transient-mark-mode (I do) then
> you activate the region often, for a variety of reasons, mostly
> unrelated to the kill ring.  So if each time the active region got
> copied to the kill ring, then the kill ring could easily get clobbered
> with unwanted entries.  You can do M-w if you want to put the region
> in the kill ring.

Making the region available as a selection does not mean copying it to
the kill ring.  IIRC, selections are somewhat of a handshake process,
so it should even be possible to copy the transient region to the kill
ring _only_ when it has been used as an X selection.  I don't know
whether such a behavior would be useful.

Providing a transient region as an X selection would appear
independently useful, and normally what people would expect.  I don't
think that one needs to touch the kill ring for that.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: highlight with mouse then shouldn't need kill-ring-save?
  2005-01-28 11:34         ` David Kastrup
@ 2005-01-28 12:59           ` Stefan Monnier
  2005-01-28 23:36             ` Peter Heslin
  2005-01-30  0:49             ` Dan Jacobson
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Monnier @ 2005-01-28 12:59 UTC (permalink / raw)
  Cc: emacs-devel, Luc Teirlinck, rms, jidanni

> Providing a transient region as an X selection would appear
> independently useful, and normally what people would expect.

I'm not sure if that's really what people expect.  The region is often used
for reasons unrelated to copy/kill/....  E.g. to "undo" only in the region,
or to comment out a chunk of text, or ...

Overwriting some other X selection in those cases may not be what
people want.

This is without considering the potential performance impact (at least if
we use the CUT buffer).

Furthermore, nobody ever complained about having to do M-w to put the region
in the X selection.  The only thing which was brought up is that there is no
visual representation of the X selection: in some cases it's highlighted as
the active region, in other cases it's not highlighted at all, in yet other
cases, the active region is highlighted but has nothing to do with the
X selection.

Maybe we should highlight the X selection with something like the
secondary-selection face, using a separate overlay (independent from the
region), which would get unhighlighted as soon as the X selection is taken
by some other X app.


        Stefan

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

* Re: highlight with mouse then shouldn't need kill-ring-save?
  2005-01-28  3:41       ` Luc Teirlinck
  2005-01-28 11:34         ` David Kastrup
@ 2005-01-28 14:13         ` Richard Stallman
  1 sibling, 0 replies; 7+ messages in thread
From: Richard Stallman @ 2005-01-28 14:13 UTC (permalink / raw)
  Cc: emacs-devel, jidanni

       Perhaps it would be good in transient mark mode
       to set things up so that when the mark is active,
       the region is available as a selection.

    The problem here is that if you use transient-mark-mode (I do) then
    you activate the region often, for a variety of reasons, mostly
    unrelated to the kill ring.  So if each time the active region got
    copied to the kill ring, then the kill ring could easily get clobbered
    with unwanted entries.

We certainly wouldn't want it to be in the kill ring.  But Emacs could
make it available as the selection to other X clients, without putting
it in the kill ring.

Currently Emacs' selection is always from the kill ring, but that does
not HAVE to be so.  Maybe in Transient Mark mode the selection should
be defined as the highlighted region (when and if there is one).

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

* Re: highlight with mouse then shouldn't need kill-ring-save?
  2005-01-28 12:59           ` Stefan Monnier
@ 2005-01-28 23:36             ` Peter Heslin
  2005-01-30  0:49             ` Dan Jacobson
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Heslin @ 2005-01-28 23:36 UTC (permalink / raw)


On 2005-01-28, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>  I'm not sure if that's really what people expect.  The region is often used
>  for reasons unrelated to copy/kill/....  E.g. to "undo" only in the region,
>  or to comment out a chunk of text, or ...

Yes, but if you interrupt your undo or commenting out between the
first step of marking the text and the second step of performing the
undo/commenting action, in order to interact with some other
application, then it's entirely likely that that interruption has
something to do with the text you have just marked, but hesitated to
act on.

>  Overwriting some other X selection in those cases may not be what
>  people want.

Would it be possible to overwrite the X selection only so long as the
mark is active, and restore the previous value when it's deactivated?
(Performance considerations aside ...)

Peter

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

* Re: highlight with mouse then shouldn't need kill-ring-save?
  2005-01-28 12:59           ` Stefan Monnier
  2005-01-28 23:36             ` Peter Heslin
@ 2005-01-30  0:49             ` Dan Jacobson
  1 sibling, 0 replies; 7+ messages in thread
From: Dan Jacobson @ 2005-01-30  0:49 UTC (permalink / raw)


R> Are you using transient mark mode?
Not sure. Wait, .emacs says:
(setq mark-even-if-inactive t)
(setq transient-mark-mode 't highlight-nonselected-windows 't)
Anyways, I like this idea, though all over my head:
S> Maybe we should highlight the X selection with something like the
S> secondary-selection face

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

end of thread, other threads:[~2005-01-30  0:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.13177.1105738759.27204.bug-gnu-emacs@gnu.org>
     [not found] ` <jwvvf9z60io.fsf-monnier+gnu.emacs.bug@gnu.org>
     [not found]   ` <87hdl42khp.fsf@jidanni.org>
2005-01-27 22:19     ` highlight with mouse then shouldn't need kill-ring-save? Richard Stallman
2005-01-28  3:41       ` Luc Teirlinck
2005-01-28 11:34         ` David Kastrup
2005-01-28 12:59           ` Stefan Monnier
2005-01-28 23:36             ` Peter Heslin
2005-01-30  0:49             ` Dan Jacobson
2005-01-28 14:13         ` Richard Stallman

Code repositories for project(s) associated with this public inbox

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

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