noctuid/link-hint.el

Fails to fetch a certain url

Closed this issue · 6 comments

Here's the stack trace:

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  replace-regexp-in-string(")*$" "" nil)
  link-hint--process-url(nil :describe)
  link-hint--apply(identity nil link-hint--process-url :describe)
  link-hint--action(:open (:pos 2697 :win #<window 3680 on *We haven't seen you on Vaad...*> :args nil :type link-hint-text-url))
  link-hint--one(:open)
  link-hint-open-link()
  funcall-interactively(link-hint-open-link)
  call-interactively(link-hint-open-link nil nil)
  command-execute(link-hint-open-link)

Could you provide steps for replication?

Given the backtrace, it looks like you're trying to open a text url. Could you post the url? If it's not a basic text url (e.g. its some notmuch specific link type), link-hint didn't detect it correctly, and I can look into notmuch.

Here's the URL (and a little bit of surrounding context):

If you don't want to receive future emails from Vaadin, click here
(https://analytics.vaadin.com/hs/manage-preferences/unsubscribe-all?d=eyJlYSI6InJ1ZGkuZ3JpbmJlcmdAZ21haWwuY29tIiwiZWMiOjI3NTQ3NjIwLCJzdWJzY3JpcHRpb25JZCI6MTAwMzgwNSwiZXQiOjE1MjYwNTkxMDIzMTYsImV1IjoiOWQ2NjFiODEtYTliYy00MTRmLWEyYzMtNTkwOGNjMGY5NDBhIn0%3D&v=1&_hsenc=p2ANqtz-_-tlMLimRVdwj3l668dcQhnQBhai-5S6HfJAGg27AAH156_uK9GUGfqmWJy8I0d0EXXCF7C9pznDqADYU_SIu5Zh12Lw&_hsmi=27547620
) to opt-out completely

So url-util can't detect urls that have an open paren before them (also see #15). thingatpt correctly handles this case, so I've added it as a another url detection method. Your example should work now.