How to clear typo cache content. #248

Closed
zw963 opened this Issue Aug 12, 2013 · 6 comments

Comments

Projects
None yet
2 participants
@zw963

zw963 commented Aug 12, 2013

When I use auto-complete mode, If in current mode, I have a typo error,
e.g. connnection, this word is auto add in ac-dict.

when I reinput conn, it auto-complete this error result.

How can I clear current-mode all dict-cache ??

@zw963

This comment has been minimized.

Show comment Hide comment
@zw963

zw963 Aug 19, 2013

??? sorry for my pool english, Did I not clearly describe my problem ?

zw963 commented Aug 19, 2013

??? sorry for my pool english, Did I not clearly describe my problem ?

@zw963

This comment has been minimized.

Show comment Hide comment
@zw963

zw963 Aug 19, 2013

(ac-clear-dictionary-cache) seem like invalid.

when I set (setq ac-clear-variables-after-save t), I save files, have some debug message.

Debugger entered--Lisp error: (wrong-type-argument listp t)
  car(t)
  (setq pair (car --cl-dolist-temp--))
  (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
  (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))))
  (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))))))
  (block nil (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
  (dolist (pair ac-clear-variables-after-save) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)))
  ac-clear-variables-after-save()
  run-hooks(after-save-hook)
  basic-save-buffer()
  save-buffer(1)
  call-interactively(save-buffer nil nil)

zw963 commented Aug 19, 2013

(ac-clear-dictionary-cache) seem like invalid.

when I set (setq ac-clear-variables-after-save t), I save files, have some debug message.

Debugger entered--Lisp error: (wrong-type-argument listp t)
  car(t)
  (setq pair (car --cl-dolist-temp--))
  (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))
  (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))))
  (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
  (cl-block-wrapper (catch (quote --cl-block-nil--) (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--))))))
  (block nil (let ((--cl-dolist-temp-- ac-clear-variables-after-save) pair) (while --cl-dolist-temp-- (setq pair (car --cl-dolist-temp--)) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)) (setq --cl-dolist-temp-- (cdr --cl-dolist-temp--)))))
  (dolist (pair ac-clear-variables-after-save) (if (or (null (cdr pair)) (funcall (cdr pair))) (set (car pair) nil)))
  ac-clear-variables-after-save()
  run-hooks(after-save-hook)
  basic-save-buffer()
  save-buffer(1)
  call-interactively(save-buffer nil nil)
@syohex

This comment has been minimized.

Show comment Hide comment
@syohex

syohex Aug 19, 2013

Contributor

@zw963 Type of variable ac-clear-variables-after-save should be list, not boolean.

I think that add-to-list in ac-clear-variable-after-save is failed
if ac-clear-variables-after-save is t.

See code https://github.com/auto-complete/auto-complete/blob/master/auto-complete.el#L1602

Contributor

syohex commented Aug 19, 2013

@zw963 Type of variable ac-clear-variables-after-save should be list, not boolean.

I think that add-to-list in ac-clear-variable-after-save is failed
if ac-clear-variables-after-save is t.

See code https://github.com/auto-complete/auto-complete/blob/master/auto-complete.el#L1602

@zw963

This comment has been minimized.

Show comment Hide comment
@zw963

zw963 Aug 27, 2013

@syohex , Thanks. But that still not resolve my problem.

zw963 commented Aug 27, 2013

@syohex , Thanks. But that still not resolve my problem.

@syohex

This comment has been minimized.

Show comment Hide comment
@syohex

syohex Nov 28, 2013

Contributor

@zw963 Sorry too late reply.

Words completion in buffer are cached in ac-word-index.
You can clear it as M-: (setq ac-word-index nil).

Now auto-complete does not provide a interface which clear it.
So if you often clear it, please define function as below

(defun ac-clear-word-index ()
  (interactive)
  (setq ac-word-index nil))

You can call it by M-x ac-clear-word-index.

Contributor

syohex commented Nov 28, 2013

@zw963 Sorry too late reply.

Words completion in buffer are cached in ac-word-index.
You can clear it as M-: (setq ac-word-index nil).

Now auto-complete does not provide a interface which clear it.
So if you often clear it, please define function as below

(defun ac-clear-word-index ()
  (interactive)
  (setq ac-word-index nil))

You can call it by M-x ac-clear-word-index.

@zw963

This comment has been minimized.

Show comment Hide comment
@zw963

zw963 Dec 10, 2013

Thanks~ I will try it.

zw963 commented Dec 10, 2013

Thanks~ I will try it.

@syohex syohex closed this May 19, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment