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

pdf-annot-add-markup-annotation with ivy-mode on not working as expected #375

Closed
ardpp opened this Issue Feb 3, 2016 · 3 comments

Comments

Projects
None yet
2 participants
@ardpp

ardpp commented Feb 3, 2016

I want to annotate a pdf-file using pdf-tools. One way to do that is to mark something in the file and call
pdf-annot-add-markup-annotation Then completing read in the minibuffer is activated and one can choose between ‘squiggly’, ‘underline’, ‘strike-out’ or ‘highlight’.

When ivy-mode is disabled it does work as described above. With ivy-mode on there are no matches. In the minibuffer it says
(1/0) Markup type (default highlight):

The same happens when I use hydra-pdftools. I don't know on which side (pdf-tools or ivy) the relevant things changed, but I'm pretty sure that it used to work.

@abo-abo

This comment has been minimized.

Show comment
Hide comment
@abo-abo

abo-abo Feb 3, 2016

Owner

It appears that pdf-annot-add-markup-annotation does not conform to the API standard in its use of compelting-read:

COLLECTION can be a list of strings, an alist, an obarray or a hash table.
COLLECTION can also be a function to do the completion itself.

Here's the offending call:

(completing-read "Markup type (default highlight): "
                 '(squiggly highlight underline strike-out)
                 nil t)

Note that a list of symbols does not fall into any category mentioned in the documentation. Somehow, completing-read-default supports a list of symbols even though it's not documented.

I can add a work-around in ivy, but I also suggest a fix in pdf-tools.

Owner

abo-abo commented Feb 3, 2016

It appears that pdf-annot-add-markup-annotation does not conform to the API standard in its use of compelting-read:

COLLECTION can be a list of strings, an alist, an obarray or a hash table.
COLLECTION can also be a function to do the completion itself.

Here's the offending call:

(completing-read "Markup type (default highlight): "
                 '(squiggly highlight underline strike-out)
                 nil t)

Note that a list of symbols does not fall into any category mentioned in the documentation. Somehow, completing-read-default supports a list of symbols even though it's not documented.

I can add a work-around in ivy, but I also suggest a fix in pdf-tools.

@abo-abo abo-abo closed this in 05a7b61 Feb 3, 2016

@ardpp

This comment has been minimized.

Show comment
Hide comment
@ardpp

ardpp Feb 3, 2016

Thanks! I'll open an issue there and paste my question and parts of your answer.

ardpp commented Feb 3, 2016

Thanks! I'll open an issue there and paste my question and parts of your answer.

@ardpp

This comment has been minimized.

Show comment
Hide comment
@ardpp

ardpp Feb 5, 2016

Just want to let you know that it has been also fixed on pdf-tools side.

ardpp commented Feb 5, 2016

Just want to let you know that it has been also fixed on pdf-tools side.

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