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

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

Open
xkix opened this issue May 9, 2020 · 13 comments
Open

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

xkix opened this issue May 9, 2020 · 13 comments

Comments

@xkix
Copy link

xkix commented May 9, 2020

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

@flexibeast
Copy link
Owner

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?

@xkix
Copy link
Author

xkix commented Jul 19, 2020

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

@flexibeast
Copy link
Owner

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?

@xkix
Copy link
Author

xkix commented Jul 20, 2020

  • 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

@flexibeast
Copy link
Owner

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.

@xkix
Copy link
Author

xkix commented Jul 22, 2020

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>

@flexibeast
Copy link
Owner

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?

@xkix
Copy link
Author

xkix commented Jul 23, 2020

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

Entry was added via buku.

@flexibeast
Copy link
Owner

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?

@xkix
Copy link
Author

xkix commented Jul 28, 2020

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)

@flexibeast
Copy link
Owner

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

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

@xkix
Copy link
Author

xkix commented Aug 4, 2020

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)

@flexibeast
Copy link
Owner

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.

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

No branches or pull requests

2 participants