* Re: master a1a435b3f6: Respect test function when performing local drag-and-drop
@ 2022-06-13 13:51 Eli Zaretskii
2022-06-14 1:04 ` Po Lu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-06-13 13:51 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> + DEFVAR_LISP ("x-dnd-native-test-function", Vx_dnd_native_test_function,
> + doc: /* Function called to determine return when dropping on Emacs itself.
What does it mean "to determine return"? Did you mean "return value"?
or "what to return"?
> +It should accept two arguments POS and ACTION, and return a symbol
> +describing what to return from `x-begin-drag'. POS is a mouse
> +position list detailing the location of the drop, and ACTION is the
> +action specified by the caller of `x-begin-drag'.
This alludes to `x-begin-drag', but it isn't clear how the variable
itself is related to that function.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: master a1a435b3f6: Respect test function when performing local drag-and-drop
2022-06-13 13:51 master a1a435b3f6: Respect test function when performing local drag-and-drop Eli Zaretskii
@ 2022-06-14 1:04 ` Po Lu
2022-06-14 2:32 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Po Lu @ 2022-06-14 1:04 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> What does it mean "to determine return"? Did you mean "return value"?
> or "what to return"?
Yes, sorry.
> This alludes to `x-begin-drag', but it isn't clear how the variable
> itself is related to that function.
It determines the return value of `x-begin-drag' when the drop happens
on a frame instead of a window belonging to another program.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: master a1a435b3f6: Respect test function when performing local drag-and-drop
2022-06-14 1:04 ` Po Lu
@ 2022-06-14 2:32 ` Eli Zaretskii
2022-06-14 2:51 ` Po Lu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-06-14 2:32 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Tue, 14 Jun 2022 09:04:51 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > What does it mean "to determine return"? Did you mean "return value"?
> > or "what to return"?
>
> Yes, sorry.
>
> > This alludes to `x-begin-drag', but it isn't clear how the variable
> > itself is related to that function.
>
> It determines the return value of `x-begin-drag' when the drop happens
> on a frame instead of a window belonging to another program.
My point was that before the doc string talks about x-begin-drag, it
should somehow tell where does this variable come into play with that
function.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: master a1a435b3f6: Respect test function when performing local drag-and-drop
2022-06-14 2:32 ` Eli Zaretskii
@ 2022-06-14 2:51 ` Po Lu
2022-06-14 11:21 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Po Lu @ 2022-06-14 2:51 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> My point was that before the doc string talks about x-begin-drag, it
> should somehow tell where does this variable come into play with that
> function.
How about this?
Function called for the return value of `x-begin-drag' when dropping on a frame.
It should accept two arguments POS and ACTION, and return a symbol
describing what to return from `x-begin-drag' if the drop happens on a
frame. POS is a mouse position list detailing the location of the drop,
and ACTION is the action specified by the caller of `x-begin-drag'.
If nil or a non-symbol value is returned, the drop will be cancelled.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: master a1a435b3f6: Respect test function when performing local drag-and-drop
2022-06-14 2:51 ` Po Lu
@ 2022-06-14 11:21 ` Eli Zaretskii
2022-06-14 11:47 ` Po Lu
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-06-14 11:21 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Tue, 14 Jun 2022 10:51:06 +0800
>
> How about this?
>
> Function called for the return value of `x-begin-drag' when dropping on a frame.
>
> It should accept two arguments POS and ACTION, and return a symbol
> describing what to return from `x-begin-drag' if the drop happens on a
> frame. POS is a mouse position list detailing the location of the drop,
> and ACTION is the action specified by the caller of `x-begin-drag'.
>
> If nil or a non-symbol value is returned, the drop will be cancelled.
Suggest a slight rewording:
Function that determines return value of drag-and-drop on Emacs frames.
If the value is a function, `x-begin-drag' will call it with two
arguments, POS and ACTION, where POS is a mouse position list
that specifies the location of the drop, and ACTION is the action
specified by the caller of `x-begin-drag'. The function should
return a symbol describing what to return from `x-begin-drag' if the
drop happens on an Emacs frame.
If the value is nil, or the function returns a value that is not a
symbol, a drop on an Emacs frame will be canceled.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: master a1a435b3f6: Respect test function when performing local drag-and-drop
2022-06-14 11:21 ` Eli Zaretskii
@ 2022-06-14 11:47 ` Po Lu
0 siblings, 0 replies; 6+ messages in thread
From: Po Lu @ 2022-06-14 11:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> Suggest a slight rewording:
>
> Function that determines return value of drag-and-drop on Emacs frames.
>
> If the value is a function, `x-begin-drag' will call it with two
> arguments, POS and ACTION, where POS is a mouse position list
> that specifies the location of the drop, and ACTION is the action
> specified by the caller of `x-begin-drag'. The function should
> return a symbol describing what to return from `x-begin-drag' if the
> drop happens on an Emacs frame.
>
> If the value is nil, or the function returns a value that is not a
> symbol, a drop on an Emacs frame will be canceled.
Thanks.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-14 11:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-13 13:51 master a1a435b3f6: Respect test function when performing local drag-and-drop Eli Zaretskii
2022-06-14 1:04 ` Po Lu
2022-06-14 2:32 ` Eli Zaretskii
2022-06-14 2:51 ` Po Lu
2022-06-14 11:21 ` Eli Zaretskii
2022-06-14 11:47 ` Po Lu
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.