unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Something similar to write-file-functions for copy & cut?
@ 2007-06-06 13:27 Lennart Borgman (gmail)
  2007-06-06 13:52 ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2007-06-06 13:27 UTC (permalink / raw)
  To: Emacs Devel

Is there some hook similar to write-file-functions for copy and cut 
operations to the clipboard? I think it would be useful (and I would 
have used it right now if it where available).

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

* Re: Something similar to write-file-functions for copy & cut?
  2007-06-06 13:27 Something similar to write-file-functions for copy & cut? Lennart Borgman (gmail)
@ 2007-06-06 13:52 ` Juanma Barranquero
  2007-06-06 13:59   ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2007-06-06 13:52 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

On 6/6/07, Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote:
> Is there some hook similar to write-file-functions for copy and cut
> operations to the clipboard?

You could (ab)use `buffer-substring-filters'.

             Juanma

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

* Re: Something similar to write-file-functions for copy & cut?
  2007-06-06 13:52 ` Juanma Barranquero
@ 2007-06-06 13:59   ` Lennart Borgman (gmail)
  2007-06-06 14:11     ` Juanma Barranquero
  0 siblings, 1 reply; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2007-06-06 13:59 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Devel

Juanma Barranquero wrote:
> On 6/6/07, Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote:
>> Is there some hook similar to write-file-functions for copy and cut
>> operations to the clipboard?
> 
> You could (ab)use `buffer-substring-filters'.


Thanks. I guess you mean that copy and cut to clipboard call these?

I could try, but would not that affect many other operations too?

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

* Re: Something similar to write-file-functions for copy & cut?
  2007-06-06 13:59   ` Lennart Borgman (gmail)
@ 2007-06-06 14:11     ` Juanma Barranquero
  2007-06-06 14:20       ` Lennart Borgman (gmail)
  0 siblings, 1 reply; 5+ messages in thread
From: Juanma Barranquero @ 2007-06-06 14:11 UTC (permalink / raw)
  To: Lennart Borgman (gmail); +Cc: Emacs Devel

On 6/6/07, Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote:

> I guess you mean that copy and cut to clipboard call these?

They use filter-buffer-substring.

> I could try, but would not that affect many other operations too?

There aren't many operations that use filter-buffer-substring. And if
really needed I suppose you can hack a way to know what command is
being executed.

             Juanma

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

* Re: Something similar to write-file-functions for copy & cut?
  2007-06-06 14:11     ` Juanma Barranquero
@ 2007-06-06 14:20       ` Lennart Borgman (gmail)
  0 siblings, 0 replies; 5+ messages in thread
From: Lennart Borgman (gmail) @ 2007-06-06 14:20 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs Devel

Juanma Barranquero wrote:
> On 6/6/07, Lennart Borgman (gmail) <lennart.borgman@gmail.com> wrote:
> 
>> I guess you mean that copy and cut to clipboard call these?
> 
> They use filter-buffer-substring.
> 
>> I could try, but would not that affect many other operations too?
> 
> There aren't many operations that use filter-buffer-substring. And if
> really needed I suppose you can hack a way to know what command is
> being executed.

Ok, thanks. I will just use them as the hook I asked for now.

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

end of thread, other threads:[~2007-06-06 14:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-06 13:27 Something similar to write-file-functions for copy & cut? Lennart Borgman (gmail)
2007-06-06 13:52 ` Juanma Barranquero
2007-06-06 13:59   ` Lennart Borgman (gmail)
2007-06-06 14:11     ` Juanma Barranquero
2007-06-06 14:20       ` Lennart Borgman (gmail)

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