ebuku icon indicating copy to clipboard operation
ebuku copied to clipboard

Bug: el.wikipedia.org/ isn't found

Open xkix opened this issue 5 years ago • 13 comments

Thanks for ebuku, love to use it!

My issue is: after adding el.wikipedia.org/ it isn't found by ebuku this works: buku -s el.wikipedia

xkix avatar May 09 '20 21:05 xkix

Sorry for taking so long to get back to you!

i just added the URL el.wikipedia.org/ via Ebuku, then did a search for el.wikipedia and Βικιπαίδεια via s n; in both instances, Ebuku found and displayed the bookmark. Could you describe the exact steps (including keypresses) you used to do the search?

flexibeast avatar Jul 15 '20 07:07 flexibeast

No problem, thanks for responding.

  1. s n and then el.wikipedia.org/ ret gives No results found for '--sany el.wikipedia/'.
  2. s n and then Βικιπαίδεια ret gives No results found for '--sany Βικιπαίδεια'.

Console: ebuku-s el.wikipedia.org/

  1. Βικιπαίδεια [2061] > el.wikipedia.org/

Using versions:

  • OS: Win 10
  • Emacs: GNU Emacs 26.3 (build 1, x86_64-w64-mingw32) of 2019-08-29
  • ebuku: Version: 20200427.1143

xkix avatar Jul 19 '20 13:07 xkix

Hmm. Perhaps it's something to do with character encodings on Windows, or to do with your locale settings?

i don't run Windows, myself, so perhaps we start with:

  • Was that URL one you added via Ebuku, or from the command line? If it was from the command line, could you please try adding it again via Ebuku? If that works (i.e. Ebuku doesn't say that the bookmark already exists), do the Ebuku searches also work?

  • What are your locale settings on the command line, and in Emacs?

flexibeast avatar Jul 19 '20 13:07 flexibeast

  • M-x ebuku a https://el.wikipedia.org gives ebuku-add-bookmark: Search failed: "^\([[:digit:]]+\)\. \(.+\)$"
  • Console and Emacs settings are the same (Emacs started from same console): LC_ALL=C LANG=de_DE.UTF-8

xkix avatar Jul 20 '20 06:07 xkix

Thanks. i checked the output of buku -s el.wikipedia with LC_ALL and LANG set as you described, and it didn't look any different to the output with my locale settings. i also copied and pasted the terminal output into Emacs to check whether the regex worked on it, which it did.

Can you share the output of buku -s in a codeblock? Also, what version of buku are you using? i'm on 4.3.

flexibeast avatar Jul 20 '20 07:07 flexibeast

Hi. Buku 4.3 here. buku -s el.wikipedia.org >out gives Traceback (most recent call last): File "d:\Users\my\python38\Scripts\buku-script.py", line 11, in load_entry_point('buku==4.3', 'console_scripts', 'buku')() File "d:\users\my\python38\lib\site-packages\buku.py", line 5278, in main prompt(bdb, search_results, oneshot, args.deep, num=num) File "d:\users\my\python38\lib\site-packages\buku.py", line 3853, in prompt print_single_rec(row, count) File "d:\users\my\python38\lib\site-packages\buku.py", line 4192, in print_single_rec print(''.join(str_list)) File "d:\users\my\python38\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 19-29: character maps to <undefined>

xkix avatar Jul 22 '20 08:07 xkix

That looks like buku itself is failing on that search? When you last added the el.wikipedia.org bookmark, was it via Ebuku, or buku?

flexibeast avatar Jul 22 '20 09:07 flexibeast

The search succeeds without the >out part: buku -s el.wikipedia.org/ 1. Βικιπαίδεια [2061] > el.wikipedia.org/

Entry was added via buku.

xkix avatar Jul 23 '20 06:07 xkix

i'm a bit stumped at this point, sorry! Do you have other bookmarks with titles that don't use Latin script? Does Ebuku fail or succeed when searching for them?

flexibeast avatar Jul 23 '20 07:07 flexibeast

sorry for the delay. when i'am trying to add and search https://ca.wikipedia.org it works, with buku and with ebuku: 2064. Viquipèdia > ca.wikipedia.org

adding and searching https://el.wikipedia.org with buku works, with ebuku it isn't found and i can't add it, i'am getting: Debugger` entered--Lisp error: (search-failed "^\([[:digit:]]+\)\. \(.+\)$")_ re-search-forward("^\([[:digit:]]+\)\. \(.+\)$") ebuku-add-bookmark() funcall-interactively(ebuku-add-bookmark) call-interactively(ebuku-add-bookmark nil nil) command-execute(ebuku-add-bookmark)

xkix avatar Jul 28 '20 20:07 xkix

No need to apologise, i'm juggling multiple things myself. :-)

Does adding https://ru.wikipedia.org/, and searching for it, work from within Ebuku?

flexibeast avatar Aug 02 '20 06:08 flexibeast

Hi, no, adding https://ru.wikipedia.org/ gives: Debugger entered--Lisp error: (search-failed "^//([[:digit:]]+//)//. //(.+//)$") re-search-forward("^//([[:digit:]]+//)//. //(.+//)$") ebuku-add-bookmark() funcall-interactively(ebuku-add-bookmark) call-interactively(ebuku-add-bookmark nil nil) command-execute(ebuku-add-bookmark)

xkix avatar Aug 04 '20 08:08 xkix

Thanks! This does look like it's something to do with Ebuku handles (or doesn't handle) non-Latin-based scripts, so i've just made a post on r/emacs asking if anyone has any insights as to what might be happening.

flexibeast avatar Aug 04 '20 08:08 flexibeast