From naota@elisp.net Wed Jul 22 11:03:09 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 22 Jul 2009 18:03:09 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.1 required=4.0 tests=FOURLA,MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6MI34qG002145 for ; Wed, 22 Jul 2009 11:03:06 -0700 Received: from mx10.gnu.org ([199.232.76.166]:53171) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MTg9f-0002af-VG for emacs-pretest-bug@gnu.org; Wed, 22 Jul 2009 14:03:04 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MTg9d-0001BJ-DS for emacs-pretest-bug@gnu.org; Wed, 22 Jul 2009 14:03:02 -0400 Received: from s318.xrea.com ([125.53.25.46]:56407) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MTg9c-00019F-5R for emacs-pretest-bug@gnu.org; Wed, 22 Jul 2009 14:03:00 -0400 Received: (qmail 18951 invoked by uid 89); 23 Jul 2009 03:02:54 +0900 Received: from zaq3a55f27d.zaq.ne.jp (HELO yue.localnetwork) (naota@elisp.net@58.85.242.125) by 192.168.1.46 with SMTP; 23 Jul 2009 03:02:54 +0900 From: Naohiro Aota To: emacs-pretest-bug@gnu.org Subject: 23.1.50; [PATCH] keyboard translating with timer doesn't work well Date: Thu, 23 Jul 2009 03:02:51 +0900 Message-ID: <87ws6038ac.fsf@elisp.net> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) I found evaluating the following code outputs "abbbbb ...", and M-x view-lossage after that shows "b b b b b ...". (progn (keyboard-translate ?a ?b) (push ?a unread-command-events) (setq my-timer (run-with-idle-timer 1 t (lambda () (push ?a unread-command-events))))) This result suggests three problems. 1. If a timer handler function uses `sit-for' (or any function push a key to `unread-command-events'), the key would be translated once more. 2. idle-timer function should run "only once for each time Emacs becomes idle", but it seems the above function is called so many times. 3. `view-lossage' shouldn't show such stroke: "b b b b b ...". I don't know this is the right way, but it seems the patch below solves all the problem above. --8<---------------cut here---------------start------------->8--- Index: src/keyboard.c =================================================================== RCS file: /sources/emacs/emacs/src/keyboard.c,v retrieving revision 1.1008 diff -c -r1.1008 keyboard.c *** src/keyboard.c 3 Jul 2009 11:07:11 -0000 1.1008 --- src/keyboard.c 22 Jul 2009 17:20:11 -0000 *************** *** 2988,2993 **** --- 2988,2994 ---- { c = XCAR (Vunread_command_events); Vunread_command_events = XCDR (Vunread_command_events); + goto reread_for_input_method; } /* Read something from current KBOARD's side queue, if possible. */ --8<---------------cut here---------------end--------------->8--- 2009-07-22 Naohiro Aota * keyboard.c (read_char): When event set by a timer, sentinel or filter, skip keyboard translating and key recording. Regards, From rudalics@gmx.at Thu Jul 23 02:23:59 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 23 Jul 2009 09:23:59 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-4.5 required=4.0 tests=AWL,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n6N9NsHV029721 for ; Thu, 23 Jul 2009 02:23:56 -0700 Received: from mx10.gnu.org ([199.232.76.166]:44061) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MTuWo-0000MB-7y for emacs-pretest-bug@gnu.org; Thu, 23 Jul 2009 05:23:54 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MTuWm-0005bR-RA for emacs-pretest-bug@gnu.org; Thu, 23 Jul 2009 05:23:53 -0400 Received: from mail.gmx.net ([213.165.64.20]:46777) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MTuWm-0005bD-A3 for emacs-pretest-bug@gnu.org; Thu, 23 Jul 2009 05:23:52 -0400 Received: (qmail invoked by alias); 23 Jul 2009 09:23:47 -0000 Received: from 62-47-35-164.adsl.highway.telekom.at (EHLO [62.47.35.164]) [62.47.35.164] by mail.gmx.net (mp071) with SMTP; 23 Jul 2009 11:23:47 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18sJP0dnhAs0EupeA0Ger0ByXf0fgdOR8/4fJ71Gl D3ws1M//9URFnT Message-ID: <4A682C21.8030409@gmx.at> Date: Thu, 23 Jul 2009 11:23:45 +0200 From: martin rudalics User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Naohiro Aota , 3904@debbugs.gnu.org CC: emacs-pretest-bug@gnu.org Subject: Re: bug#3904: 23.1.50; [PATCH] keyboard translating with timer doesn't work well References: <87ws6038ac.fsf@elisp.net> In-Reply-To: <87ws6038ac.fsf@elisp.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. > 1. If a timer handler function uses `sit-for' (or any function push a > key to `unread-command-events'), the key would be translated once > more. From the Elisp manual: Timer functions should also avoid calling functions that cause Emacs to wait, such as `sit-for' ... martin From debbugs-submit-bounces@debbugs.gnu.org Sun Dec 20 10:58:12 2009 Received: (at control) by debbugs.gnu.org; 20 Dec 2009 15:58:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NMOAe-0006FH-7M for submit@debbugs.gnu.org; Sun, 20 Dec 2009 10:58:12 -0500 Received: from colin-baker-v0.ics.uci.edu ([128.195.1.153]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NMOAc-0006FB-OB for control@debbugs.gnu.org; Sun, 20 Dec 2009 10:58:11 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nBKFvug3004692 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 20 Dec 2009 07:57:56 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nBKFvuig021746; Sun, 20 Dec 2009 07:57:56 -0800 (PST) Date: Sun, 20 Dec 2009 07:57:56 -0800 (PST) Message-Id: <200912201557.nBKFvuig021746@godzilla.ics.uci.edu> From: Dan Nicolaescu To: control@debbugs.gnu.org Subject: X-Debbugs-No-Ack: yes Lines: 16 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nBKFvug3004692 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-0.155, required 5, autolearn=disabled, ALL_TRUSTED -1.44, MISSING_SUBJECT 1.28) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org tags 3597 + patch tags 3904 + patch tags 4142 + patch tags 4951 + patch tags 4448 + patch tags 4286 + patch tags 2159 + patch tags 2746 + patch tags 1643 + patch tags 1933 + patch tags 3175 + patch tags 3887 + patch tags 4310 + patch tags 4546 + patch quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 15:58:08 2011 Received: (at control) by debbugs.gnu.org; 12 Jul 2011 19:58:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qgj5q-0006e7-Oj for submit@debbugs.gnu.org; Tue, 12 Jul 2011 15:58:07 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qgj5m-0006dc-Db for control@debbugs.gnu.org; Tue, 12 Jul 2011 15:58:03 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Qgj5b-0004bY-5F for control@debbugs.gnu.org; Tue, 12 Jul 2011 21:57:51 +0200 Date: Tue, 12 Jul 2011 21:57:50 +0200 Message-Id: To: control@debbugs.gnu.org From: Lars Magne Ingebrigtsen Subject: control message for bug #3904 X-MailScanner-ID: 1Qgj5b-0004bY-5F X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311105471.84956@65PUDM+46tBetRLmbi/1CA X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) tags 3904 wontfix close 3904 From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 12 16:20:06 2011 Received: (at 3904) by debbugs.gnu.org; 12 Jul 2011 20:20:07 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgjR4-0000Oq-G2 for submit@debbugs.gnu.org; Tue, 12 Jul 2011 16:20:06 -0400 Received: from hermes.netfonds.no ([80.91.224.195]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QgjQr-0000Nr-E2 for 3904@debbugs.gnu.org; Tue, 12 Jul 2011 16:19:53 -0400 Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58] helo=quimbies.gnus.org) by hermes.netfonds.no with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1QgjQf-0005AD-Ea; Tue, 12 Jul 2011 22:19:37 +0200 From: Lars Magne Ingebrigtsen To: martin rudalics Subject: Re: bug#3904: 23.1.50; [PATCH] keyboard translating with timer doesn't work well In-Reply-To: <4A682C21.8030409@gmx.at> (martin rudalics's message of "Thu, 23 Jul 2009 11:23:45 +0200") Date: Tue, 12 Jul 2011 21:57:42 +0200 Message-ID: References: <87ws6038ac.fsf@elisp.net> <4A682C21.8030409@gmx.at> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-Now-Playing: Peter Gabriel's _Peter Gabriel 3_: "Lead A Normal Life" X-Hashcash: 1:23:110712:naota@elisp.net::GYyxowoVtiSDT1lO:017GCR X-Hashcash: 1:23:110712:rudalics@gmx.at::S8ezzzrcWBdiGqak:00kXyj X-Hashcash: 1:23:110712:3904@debbugs.gnu.org::rRQiwafd3LIdbb/l:00000000000000000000000000000000000000000opoi MIME-Version: 1.0 Content-Type: text/plain X-MailScanner-ID: 1QgjQf-0005AD-Ea X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1311106777.5234@fuxzg8+4WL7udm3Ocj2p5A X-Spam-Status: No X-Spam-Score: -2.7 (--) X-Debbugs-Envelope-To: 3904 Cc: Naohiro Aota , 3904@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.7 (--) martin rudalics writes: >> 1. If a timer handler function uses `sit-for' (or any function push a >> key to `unread-command-events'), the key would be translated once >> more. > > From the Elisp manual: > > Timer functions should also avoid calling functions that cause Emacs > to wait, such as `sit-for' ... Yes, I don't think this is supported, so I'm closing the report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/ From unknown Tue Jun 17 01:47:35 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 10 Aug 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator