* Re: master 6aa5068ac71 1/3: Improve treatment of touch screen input by rmc and its callers
[not found] ` <20240617094652.69EE0C1FB5F@vcs2.savannah.gnu.org>
@ 2024-06-19 10:36 ` Arash Esbati
2024-06-19 11:18 ` Po Lu
0 siblings, 1 reply; 4+ messages in thread
From: Arash Esbati @ 2024-06-19 10:36 UTC (permalink / raw)
To: emacs-devel; +Cc: Po Lu
Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:
> branch: master
> commit 6aa5068ac71cb1b8e46c299138f99fea44319146
> Author: Po Lu <luangruo@yahoo.com>
> Commit: Po Lu <luangruo@yahoo.com>
>
> Improve treatment of touch screen input by rmc and its callers
>
> * lisp/emacs-lisp/rmc.el (read-multiple-choice--short-answers):
> Run touch screen event translation on touch screen events
> received, and respond to pinch, tap and scrolling gestures.
>
> * lisp/net/nsm.el (nsm-query-user): Disable use-dialog-box in
> the details window.
>
> * lisp/touch-screen.el (touch-screen-translate-touch): Autoload.
> ---
> lisp/emacs-lisp/rmc.el | 106 +++++++++++++++++++++++++++++++++----------------
> lisp/net/nsm.el | 11 ++++-
> lisp/touch-screen.el | 1 +
> 3 files changed, 81 insertions(+), 37 deletions(-)
>
> diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
> index 378687c0326..883f8bf187f 100644
> --- a/lisp/emacs-lisp/rmc.el
> +++ b/lisp/emacs-lisp/rmc.el
>[...]
> + (cond
> + ((null command)) ; Read another event.
> + ((memq (car-safe command) '(mouse-1 mouse-2))
> + ;; Display the on-screen keyboard if a tap should be
> + ;; registered.
> + (frame-toggle-on-screen-keyboard (selected-frame)
> + nil))
> + ;; Respond to scroll and pinch events as if RMC were
> + ;; not in progress.
> + ((eq (car-safe command) 'touchscreen-scroll)
> + (funcall #'touch-screen-scroll command))
> + ((eq (car-safe command) 'touchscreen-pinch)
> + (funcall #'touch-screen-pinch command))
I think this part now generates:
In end of data:
rmc.el:245:32: Warning: the function ‘touch-screen-pinch’ is not known to be defined.
rmc.el:243:32: Warning: the function ‘touch-screen-scroll’ is not known to be defined.
This on macOS with Emacs from master (e6f4370c).
Best, Arash
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 6aa5068ac71 1/3: Improve treatment of touch screen input by rmc and its callers
2024-06-19 10:36 ` master 6aa5068ac71 1/3: Improve treatment of touch screen input by rmc and its callers Arash Esbati
@ 2024-06-19 11:18 ` Po Lu
2024-06-19 11:42 ` Arash Esbati
0 siblings, 1 reply; 4+ messages in thread
From: Po Lu @ 2024-06-19 11:18 UTC (permalink / raw)
To: Arash Esbati; +Cc: emacs-devel
Arash Esbati <arash@gnu.org> writes:
> Po Lu via Mailing list for Emacs changes <emacs-diffs@gnu.org> writes:
>
>> branch: master
>> commit 6aa5068ac71cb1b8e46c299138f99fea44319146
>> Author: Po Lu <luangruo@yahoo.com>
>> Commit: Po Lu <luangruo@yahoo.com>
>>
>> Improve treatment of touch screen input by rmc and its callers
>>
>> * lisp/emacs-lisp/rmc.el (read-multiple-choice--short-answers):
>> Run touch screen event translation on touch screen events
>> received, and respond to pinch, tap and scrolling gestures.
>>
>> * lisp/net/nsm.el (nsm-query-user): Disable use-dialog-box in
>> the details window.
>>
>> * lisp/touch-screen.el (touch-screen-translate-touch): Autoload.
>> ---
>> lisp/emacs-lisp/rmc.el | 106 +++++++++++++++++++++++++++++++++----------------
>> lisp/net/nsm.el | 11 ++++-
>> lisp/touch-screen.el | 1 +
>> 3 files changed, 81 insertions(+), 37 deletions(-)
>>
>> diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
>> index 378687c0326..883f8bf187f 100644
>> --- a/lisp/emacs-lisp/rmc.el
>> +++ b/lisp/emacs-lisp/rmc.el
>>[...]
>> + (cond
>> + ((null command)) ; Read another event.
>> + ((memq (car-safe command) '(mouse-1 mouse-2))
>> + ;; Display the on-screen keyboard if a tap should be
>> + ;; registered.
>> + (frame-toggle-on-screen-keyboard (selected-frame)
>> + nil))
>> + ;; Respond to scroll and pinch events as if RMC were
>> + ;; not in progress.
>> + ((eq (car-safe command) 'touchscreen-scroll)
>> + (funcall #'touch-screen-scroll command))
>> + ((eq (car-safe command) 'touchscreen-pinch)
>> + (funcall #'touch-screen-pinch command))
>
> I think this part now generates:
>
> In end of data:
> rmc.el:245:32: Warning: the function ‘touch-screen-pinch’ is not known to be defined.
> rmc.el:243:32: Warning: the function ‘touch-screen-scroll’ is not known to be defined.
>
> This on macOS with Emacs from master (e6f4370c).
OK, what if you replace in:
>> + ;; Respond to scroll and pinch events as if RMC were
>> + ;; not in progress.
>> + ((eq (car-safe command) 'touchscreen-scroll)
>> + (funcall #'touch-screen-scroll command))
>> + ((eq (car-safe command) 'touchscreen-pinch)
>> + (funcall #'touch-screen-pinch command))
#'touch-screen-scroll and #'touch-screen-pinch with 'touch-screen-scroll
and 'touch-screen-pinch?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: master 6aa5068ac71 1/3: Improve treatment of touch screen input by rmc and its callers
2024-06-19 11:18 ` Po Lu
@ 2024-06-19 11:42 ` Arash Esbati
2024-06-27 7:45 ` Eli Zaretskii
0 siblings, 1 reply; 4+ messages in thread
From: Arash Esbati @ 2024-06-19 11:42 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
Po Lu <luangruo@yahoo.com> writes:
> OK, what if you replace in:
>
>>> + ;; Respond to scroll and pinch events as if RMC were
>>> + ;; not in progress.
>>> + ((eq (car-safe command) 'touchscreen-scroll)
>>> + (funcall #'touch-screen-scroll command))
>>> + ((eq (car-safe command) 'touchscreen-pinch)
>>> + (funcall #'touch-screen-pinch command))
>
> #'touch-screen-scroll and #'touch-screen-pinch with 'touch-screen-scroll
> and 'touch-screen-pinch?
"Hiding" them from the compiler didn't work, the following change did:
--8<---------------cut here---------------start------------->8---
diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
index 883f8bf187f..a9142a8b46b 100644
--- a/lisp/emacs-lisp/rmc.el
+++ b/lisp/emacs-lisp/rmc.el
@@ -179,6 +179,9 @@ read-multiple-choice
(read-multiple-choice--short-answers
prompt choices help-string show-help)))
+(declare-function touch-screen-scroll "touch-screen" (event))
+(declare-function touch-screen-pinch "touch-screen" (event))
+
(defun read-multiple-choice--short-answers (prompt choices help-string show-help)
(let* ((dialog-p (use-dialog-box-p))
(prompt-choices
--8<---------------cut here---------------end--------------->8---
Best, Arash
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: master 6aa5068ac71 1/3: Improve treatment of touch screen input by rmc and its callers
2024-06-19 11:42 ` Arash Esbati
@ 2024-06-27 7:45 ` Eli Zaretskii
0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-06-27 7:45 UTC (permalink / raw)
To: luangruo, Arash Esbati; +Cc: emacs-devel
> From: Arash Esbati <arash@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Wed, 19 Jun 2024 13:42:17 +0200
>
> Po Lu <luangruo@yahoo.com> writes:
>
> > OK, what if you replace in:
> >
> >>> + ;; Respond to scroll and pinch events as if RMC were
> >>> + ;; not in progress.
> >>> + ((eq (car-safe command) 'touchscreen-scroll)
> >>> + (funcall #'touch-screen-scroll command))
> >>> + ((eq (car-safe command) 'touchscreen-pinch)
> >>> + (funcall #'touch-screen-pinch command))
> >
> > #'touch-screen-scroll and #'touch-screen-pinch with 'touch-screen-scroll
> > and 'touch-screen-pinch?
>
> "Hiding" them from the compiler didn't work, the following change did:
>
> --8<---------------cut here---------------start------------->8---
> diff --git a/lisp/emacs-lisp/rmc.el b/lisp/emacs-lisp/rmc.el
> index 883f8bf187f..a9142a8b46b 100644
> --- a/lisp/emacs-lisp/rmc.el
> +++ b/lisp/emacs-lisp/rmc.el
> @@ -179,6 +179,9 @@ read-multiple-choice
> (read-multiple-choice--short-answers
> prompt choices help-string show-help)))
>
> +(declare-function touch-screen-scroll "touch-screen" (event))
> +(declare-function touch-screen-pinch "touch-screen" (event))
> +
> (defun read-multiple-choice--short-answers (prompt choices help-string show-help)
> (let* ((dialog-p (use-dialog-box-p))
> (prompt-choices
> --8<---------------cut here---------------end--------------->8---
Ping!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-06-27 7:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <171861761168.16246.1990246088317606554@vcs2.savannah.gnu.org>
[not found] ` <20240617094652.69EE0C1FB5F@vcs2.savannah.gnu.org>
2024-06-19 10:36 ` master 6aa5068ac71 1/3: Improve treatment of touch screen input by rmc and its callers Arash Esbati
2024-06-19 11:18 ` Po Lu
2024-06-19 11:42 ` Arash Esbati
2024-06-27 7:45 ` Eli Zaretskii
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).