Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treat popup value property when completing candidate #185

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

tkf
Copy link
Contributor

@tkf tkf commented Oct 19, 2012

To manually test, execute this:

(defun actest-value-candidates ()
  ;; (name . value) -- see `ac-candidates-1'
  '(("foofoo" . "foo")
    ("foobar" . "bar")))

(ac-define-source actest-keywords
  '((candidates . (actest-value-candidates))))

(progn
  (pop-to-buffer (get-buffer-create "*actest*"))
  (auto-complete-mode +1)
  (erase-buffer)
  (insert "fo")
  (run-with-timer 0.1 nil #'auto-complete '(ac-source-actest-keywords)))

fixes #148

@tkf
Copy link
Contributor Author

tkf commented Oct 19, 2012

Wait sec, I am not sure about the last commit tkf@06acf91

@tkf
Copy link
Contributor Author

tkf commented Oct 20, 2012

I think this PR is ready for merge. But I want @m2ym to review it as it is a little bit large change. My concern is that the change in ac-candidates-1 (tkf@e256d26) might slows down completion as it creates a list as long as candidates every time. We can avoid this by adding "I don't use popup-item-value" flag as source attribute. Probably we should make it default.

@tjarvstrand, @jixiuf, as your issue reports (#168, #148) are fixed by this PR, feel free to try/review this.

@tjarvstrand
Copy link

Any progress on this? I'm sorry I haven't had the time to try this out, but I'll try to get around to it soon. :)

@syohex
Copy link
Contributor

syohex commented Feb 2, 2014

I have merged this patch. Please report us if there are any problems.

@syohex syohex closed this Feb 2, 2014
@syohex syohex reopened this Feb 8, 2014
@syohex
Copy link
Contributor

syohex commented Feb 8, 2014

Sorry I revert this changes. This patch breaks auto-complete source whose candidates type
is cons such as ac-semantic-candidates. Because cdr value is set as value property
in candidate string.

This changes should apply only to popup-item object. But it is only a propertized string.
so we can't make a distinction between popup-item and normal propertized string.
Because popup-item may not have its specific property, such as popup-face.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

it seems that auto-complete doesn't support the behavor like popup-menu*
4 participants