Commit graph

54 commits

Author SHA1 Message Date
Soonho Kong
7ea9c32ec8 feat(emacs/lean-server): send SYNC command when visiting a modified buffer
Close #201
2014-10-03 10:11:21 -07:00
Soonho Kong
fffb4e6019 feat(emacs/lean-server): delete cache file (.clean) after visit/load
fix #75
2014-10-03 10:11:21 -07:00
Soonho Kong
91f789c3db feat(emacs/lean-cmd): add SYNC command 2014-10-02 17:30:03 -07:00
Soonho Kong
72beb438e6 fix(emacs/lean-server): merge server-trace-mode to debug-mode 2014-10-01 14:38:23 -07:00
Soonho Kong
9161a6a210 fix(emacs/lean-type): change where to trigger eldoc
Previously, eldoc is triggered regardless of current position.
Now, it is triggered:

 - *NOT* looking-at whitespace or
 - looking-back end-parens such as ')', '}', ']', etc
2014-09-17 00:24:30 -07:00
Soonho Kong
75ab5e07d6 feat(emacs/lean-option): save lean-options to lean-global-option-alist 2014-09-15 09:46:06 -07:00
Soonho Kong
563cfa73ec feat(emacs/lean-changes): handle before/after-revert 2014-09-12 14:25:08 -07:00
Soonho Kong
27ae03878c refactor(emacs/lean-server): rename flush-changed-lines to server-flush-changed-lines 2014-09-12 14:25:08 -07:00
Soonho Kong
c034c54f50 refactor(emacs/debug): rename lean-server-debug to lean-debug 2014-09-12 14:25:08 -07:00
Soonho Kong
389fe02597 fix(emacs/lean-server): handle modified buffer only when process start 2014-09-11 12:40:10 -07:00
Soonho Kong
733c0e4a77 chore(emacs/lean-server): make trace-mode and debug-mode non-local vars 2014-09-11 12:34:23 -07:00
Soonho Kong
4b556a41ed feat(emacs/lean-server): async task queue holds type of cmds as well 2014-09-11 04:09:21 -07:00
Soonho Kong
565402f3d6 feat(lean-server): handle signals (error/quit) in continuations
Related with #158
2014-09-11 04:07:50 -07:00
Soonho Kong
5b28480809 chore(emacs/lean-server): send signal info to lean-server-trace 2014-09-11 04:04:20 -07:00
Soonho Kong
b05ca1db0f fix(emacs/lean-tags): handle exceptions from find-tag 2014-09-10 14:14:42 -07:00
Soonho Kong
b51e8dd1b9 fix(emacs/lean-server): respect order of messages in check-buffer-and-partition 2014-09-10 14:14:42 -07:00
Soonho Kong
7c4debd1d1 feat(emacs/lean-server): handle modified buffer when send VISIT cmd
Close #159
2014-09-10 14:14:42 -07:00
Soonho Kong
cab1811927 feat(emacs/lean-server): print out signal event to debug buffer 2014-09-10 09:07:16 -07:00
Soonho Kong
ba6dc59d5f fix(emacs/lean-server): missing 'rx' at the beginning of regex 2014-09-09 13:47:09 -07:00
Soonho Kong
70dcc2e122 fix(emacs): use looking-at instead of char-after 2014-09-09 13:22:58 -07:00
Soonho Kong
3682ca32d2 feat(emacs/lean-company): call FINDG if cursor is at "_" 2014-09-08 16:04:20 -07:00
Soonho Kong
4f604544c4 feat(emacs/lean-cmd): add WAIT command 2014-09-08 16:04:19 -07:00
Soonho Kong
bc640510aa feat(emacs/lean-cmd): add FINDG cmd 2014-09-08 16:04:19 -07:00
Soonho Kong
5c89e70a23 fix(emacs/lean-server): use process-query-on-exit-flag to kill
lean-server automatically on exit

To fix a problem mentioned in #147
2014-09-07 22:29:09 -04:00
Soonho Kong
bd17d07ebc fix(emacs/lean-server): limit the number of NAY retries
Also, only retry when there is no continuation other than the current
one.
2014-09-05 23:08:19 -07:00
Soonho Kong
a1e00bb216 refactor(emacs/lean-server): restructure async queue handling routine 2014-09-05 16:09:45 -07:00
Soonho Kong
a72df90022 feat(emacs/lean-server): add debug-mode, trace-mode 2014-09-05 15:33:59 -07:00
Soonho Kong
e77966932d feat(emacs/lean-server): scroll debug buffer 2014-09-05 15:33:59 -07:00
Soonho Kong
3b574ef31d feat(emacs/lean-server): kill the server before emacs exit
Close #138
2014-09-05 07:49:19 -07:00
Soonho Kong
3ba4e553fe refactor(emacs/lean-server): clean up 2014-09-05 06:59:01 -07:00
Soonho Kong
0652198eca feat(emacs/lean-server): add sync/async send-cmd 2014-09-04 16:32:08 -07:00
Soonho Kong
677f4af801 feat(emacs/lean-server): add debug print 2014-09-04 16:32:07 -07:00
Soonho Kong
cae2ab7dfb feat(emacs/lean-cmd): add FINDP cmd 2014-09-04 16:32:07 -07:00
Soonho Kong
fdc20800ca chore(emacs/lean-server): clean up debugging message 2014-09-03 10:12:17 -07:00
Soonho Kong
e802883b03 feat(emacs/lean-option): show the current value of an option
close #125
2014-09-03 08:09:41 -07:00
Soonho Kong
975841e53b feat(emacs): use lexical scope for lean-info and lean-server 2014-09-03 00:54:42 -07:00
Soonho Kong
88410bf278 feat(emacs/lean-server): support SHOW and VALID
Implement lean-server-show and lean-server-valid functions.

Close #116
2014-09-03 00:50:31 -07:00
Soonho Kong
72e1dfa296 feat(emacs): implement non-blocking communication
The key idea is to pass a continuation function when we call
lean-server-send-cmd function. The passed continuation function is
called by lean-server-event-handler. Until the buffer is ready, the
event handler will be called in interval (lean-server-retry-time, 0.1
sec by default). When we have 'NAY' for INFO command, it will re-send
INFO commands to lean-server until we have one without 'NAY'.

Close #123
2014-09-03 00:50:31 -07:00
Soonho Kong
b4a80f83af feat(emacs/lean-server): accept "BEGININFO .*" pattern 2014-09-02 10:37:03 -07:00
Soonho Kong
50465a2d06 feat(emacs/lean-option): provide candidates and validation for lean-set-option
Close #106
2014-09-01 18:31:12 -07:00
Soonho Kong
a47dada27f feat(emacs/lean-server): add 'SLEEP ms' for trace 2014-08-30 07:51:53 -07:00
Soonho Kong
ad1111cb21 feat(emacs/lean-server): add *lean-server-trace* buffer
Fix #115.
2014-08-30 07:38:12 -07:00
Soonho Kong
f8d2ed7936 feat(emacs/lean-type): maintain nay-retry timer 2014-08-27 00:48:55 -07:00
Soonho Kong
665a8f3ecb feat(emacs/lean-server): handle signal 2014-08-26 17:16:16 -07:00
Soonho Kong
83f05e104a fix(emacs/lean-server): fix ERROR regex pattern 2014-08-26 16:22:32 -07:00
Soonho Kong
dd5231d6a7 fix(emacs/lean-server): check current-file before send EVAL 2014-08-26 16:22:32 -07:00
Soonho Kong
f7ff5ec3d6 fix(emacs/lean-server): when handle dead lean-server 2014-08-26 16:22:32 -07:00
Soonho Kong
5965bcc10b refactor(emacs/lean-server): lean-server-check-current-file takes file-name 2014-08-26 16:22:31 -07:00
Soonho Kong
50063b659b refactor(lean-variable): init server-buffer and current-file-name with nil 2014-08-26 16:22:31 -07:00
Soonho Kong
ccc1f89f61 refactor(emacs/lean-server): use global-server-message-to-process
We are using asynchronous process mechanism to communicate between
lean-server and emacs. A sender function like
lean-eldoc-documentation-function sends a command and waits until
lean-global-server-message-to-process is non-nil. When a message is
received from lean-server, a filter function lean-server-output-filter
is triggered. This filter function concatenates a received message to
the buffer until it sees the end of message markers (--
END[INFO|SET|EVAL]). When it sees a marker, it splits the buffer
messages into pre, body, and post parts. Then it assembles a message to
process and attaches the message to
lean-global-server-message-to-process variable. A sender function which
is watching for the variable will recognize it, exit the polling, and
process the message.
2014-08-26 16:22:31 -07:00