all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#5514: 23.1; problem when moving mouse
@ 2010-02-03  1:03 Lab Computer
  2010-02-03 14:19 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Lab Computer @ 2010-02-03  1:03 UTC (permalink / raw)
  To: 5514

======start of message========
we are using emacs to connect to a usb-too-serial port and communicate  
with
an arm micro-processor and send it certain commands.
we have a scripter that will load a txt file and process it line by  
line,
sending out the commands inside it to the micro-processor.
the scripter has a main while loop in which there is a 0.3 second  
delay using
"(sit-for)" between each time a command is sent out to the  
microprocessor.

each time through the loop, the index of the loop is printed to a log  
buffer
for debugging purposes.
as the script is running, every .3 seconds the index is printed to the  
log
buffer and we know its working properly.

HOWEVER, if the mouse is moved while the scripter is running, it seems  
that
the "sit-fors" are inefective and the scripter runs through the while  
loop
almost instantly. looking at the log buffer one can see that all the  
indexes
were printed, which is how I know that the while loop is still getting
executed but it is the sit-fors that are getting comprimised.

here is our while loop:

     (while (< idx (length *command_list*))

       ;; if a sexp, then evaluate
       (if  (not (stringp (nth idx *command_list*)))
           (eval (nth idx *command_list*))
                     )
       ;; if it looks like a duck.....
       (when  (and (stringp (nth idx *command_list*))
                   (string-match "<.*>+?" (nth idx *command_list*)))
          (print idx 'print-log)
          (process-IT-command device (nth idx *command_list*))
         ;; (send-command (nth idx *command_list*) device)
         )
       (sit-for delay)
         (setq idx (1+ idx))
         (redisplay t)
         )

I tried using a the version of emacs that runs on x11 (rather than the  
carbon
version) , and this time the same problem occurs if the mouse button is
clicked, but not when it moves.

please email me at sbonakdar@tandemdiabetes.com with any possible  
solutions.

============ End of MESSAGE =======================


In GNU Emacs 23.1.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54)
  of 2009-08-16 on black.local
Windowing system distributor `Apple', version 10.3.949
configured using `configure  '--with-ns''

Important settings:
   value of $LC_ALL: nil
   value of $LC_COLLATE: nil
   value of $LC_CTYPE: nil
   value of $LC_MESSAGES: nil
   value of $LC_MONETARY: nil
   value of $LC_NUMERIC: nil
   value of $LC_TIME: nil
   value of $LANG: nil
   value of $XMODIFIERS: nil
   locale-coding-system: nil
   default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
   display-time-mode: t
   which-function-mode: t
   show-paren-mode: t
   global-auto-revert-mode: t
   delete-selection-mode: t
   pc-selection-mode: t
   tooltip-mode: t
   mouse-wheel-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   blink-cursor-mode: t
   global-auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   column-number-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
M-x r e p o r t - e m a c s - b u g <return>

Recent messages:

"just about to load scripter files--------"

Loading /Users/lab/Desktop/Electronics/lisp-code/functions/check- 
command-response.el (source)...done
Loading /Users/lab/Desktop/Electronics/lisp-code/functions/scripter- 
functions-released.el (source)...done
Loading /Users/lab/Desktop/Electronics/lisp-code/functions/user- 
functions.el (source)...done
Loading /Users/lab/Desktop/Electronics/lisp-code/functions/scripter- 
functions-released.el (source)...done
Loading /users/lab/emacs/lisp/emacs-lisp/cl-extra.elc...done
Recognizing tables...done
For information about GNU Emacs and the GNU system, type C-h C-a.







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

* bug#5514: 23.1; problem when moving mouse
  2010-02-03  1:03 bug#5514: 23.1; problem when moving mouse Lab Computer
@ 2010-02-03 14:19 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2010-02-03 14:19 UTC (permalink / raw)
  To: Lab Computer; +Cc: 5514

> the scripter has a main while loop in which there is a 0.3 second
> delay using "(sit-for)" between each time a command is sent out to
> the microprocessor.

Is there a particular reason you used sit-for rather than sleep-for?


        Stefan






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

end of thread, other threads:[~2010-02-03 14:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-03  1:03 bug#5514: 23.1; problem when moving mouse Lab Computer
2010-02-03 14:19 ` Stefan Monnier

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.