unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David De La Harpe Golden <david@harpegolden.net>
To: emacs-devel@gnu.org
Subject: Re: mouse-yank-primary and bug #7699
Date: Thu, 23 Dec 2010 16:38:27 +0000	[thread overview]
Message-ID: <4D137B03.9030801@harpegolden.net> (raw)
In-Reply-To: <E1PVh9n-0004ew-N1@fencepost.gnu.org>

On 23/12/10 09:08, Eli Zaretskii wrote:
>> All this selection stuff is a bit messy now.
 >
>> Ideally x-get-selection should use x-select-request-type and we
>> could reduce the number of function that gets selection on X.
>> However, one would have to check all platforms and all uses of the
>> current routines to do a good refactoring.
>
> One way forward would be for Someone™ to suggest the refactoring on
> X,  and then ask experts for other platforms to adapt the
> platform-specific emulations to that.

That sorta presupposes continuation of the "make other platforms emulate 
x11" approach.  In this area, interposing another layer of 
indirection/abstraction might be more appropriate.

Actually we have half  a (slightly strange) one (interprogram-blah) 
that's used in some areas, but then other places use the x11y layer 
"below" directly.  So there's a "level mixed" api thing going on, and I 
reckon a fair bit of the messy is arising _because_ of that.

Jan just suggested expanding x-get-selection directly, but desire for 
its expansion may be arising mostly because it currently constitutes 
part of said level mixed api.  There shouldn't _be_ those direct calls 
to x-get-selection and x-set-selection in mouse.el and simple.el*, they 
should be hidden behind interprogram-get-selection-function and 
interpogram-set-selection-function (or something), like the way in the 
clipboard case they're hidden behind interprogram-cut-function and 
interprogram-paste-function.

(Alternatively existing stabs at cross platform abstraction should be 
ripped out and the exact x11 api used consistently (whether real or 
emulated on the various platforms) rather than the current muddle, but I 
suspect that's a rather less attractive option for most people)

P.S. there's the multitty can of worms to worry about. Sometimes it 
works out vaguely okay implicitly - the real x11 apis use the current 
frame's x11 display IIRC. Other times I suspect not so much.


(* despite my name being pretty directly attached to some of the 
changes, I don't view them as ideal. Some earlier attempts by myself to 
introduce such an abstraction layer were shot down, possibly because I 
didn't articulate well enough why it was desirable going on necessary)



  parent reply	other threads:[~2010-12-23 16:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21 19:29 mouse-yank-primary and bug #7699 Eli Zaretskii
2010-12-22  1:05 ` David De La Harpe Golden
2010-12-22  1:38   ` Drew Adams
2010-12-22  3:16     ` David De La Harpe Golden
2010-12-22  4:18       ` Drew Adams
2010-12-22 11:13         ` Eli Zaretskii
2010-12-22 15:11           ` Drew Adams
2010-12-22 19:04             ` Eli Zaretskii
2010-12-22 19:09               ` Drew Adams
2010-12-22 11:09   ` Eli Zaretskii
2010-12-22 15:16     ` David De La Harpe Golden
2010-12-22 15:38       ` David De La Harpe Golden
2010-12-22 19:23         ` Eli Zaretskii
2010-12-22 21:37           ` David De La Harpe Golden
2010-12-23  4:01             ` Eli Zaretskii
2010-12-22 19:17       ` Eli Zaretskii
2010-12-22 22:10         ` David De La Harpe Golden
2010-12-23  4:03           ` Eli Zaretskii
2010-12-23  7:32             ` Jan D.
2010-12-23  9:08               ` Eli Zaretskii
2010-12-23 14:28                 ` Stefan Monnier
2010-12-23 16:38                 ` David De La Harpe Golden [this message]
2010-12-22  6:47 ` Jan Djärv

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D137B03.9030801@harpegolden.net \
    --to=david@harpegolden.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).