ck icon indicating copy to clipboard operation
ck copied to clipboard

Prompt disappear when writing tags

Open aluex opened this issue 4 years ago • 6 comments

The prompt disappear when writing tags

To Reproduce Steps to reproduce the behavior:

  1. ck a https://eprint.iacr.org/2020/248.pdf
  2. write many tags to fill the current line
  3. the prompt disappears

Expected behavior The prompt should stay.

Screenshots Screenshot from 2020-09-08 14-53-22

Desktop (please complete the following information):

  • OS: Linux
  • Browser: None
  • Version: master

aluex avatar Sep 08 '20 18:09 aluex

Hm, I don't have the problem: I tried specifying a lot of tags with autocomplete, and the prompt remained. (Assuming by "prompt" you mean the "Please enter tag(s) for 'APY20' (use Tab to autocomplete):" prompt.)

But I don't get tag suggestions on my platform because pdfgrep seems to bork with my hierarchical tags.

Qs:

  1. Can you try commenting out the pdfgrep suggestions and see if it still happens?
  2. Also, can you try reproducing this on OS X?

alinush avatar Sep 08 '20 21:09 alinush

Hi, I've tried it.

  1. It still happens
  2. It also happens on OS X.

aluex avatar Sep 12 '20 01:09 aluex

image

aluex avatar Sep 12 '20 01:09 aluex

Might this have something to do with all those "\b" characters that you pass to pdfgrep? Those are "backspace" characters so they might delete output. I'm not sure how they end up being sent to the console. Perhaps something to do with how pdfgrep is called.

Can you comment out all of the pdfgrep-related stuff and try again?

alinush avatar Sep 12 '20 18:09 alinush

For example, comment out line 614:

matches = subprocess.check_output("pdfgrep '%s' %s" % (tag_extended_regex, ck_to_pdf(ck_bib_dir, citation_key)), shell=True).decode()

If that works, then uncomment and try removing shell=True.

alinush avatar Sep 12 '20 18:09 alinush

Alex, I changed how pdfgrep is called in https://github.com/alinush/ck/commit/3dc8b7746be26ccd0d55d4ac2ac8d6446346f7c3.

Maybe this fixes your issue? Can you check?

alinush avatar Sep 20 '20 03:09 alinush