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

Open links for inbox items #347

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Boruch-Baum
Copy link
Contributor

  • This simply performs `browse-url' rather than do something with the
    SE API.

  • By observation, when there are more than one link, the first is a
    reference and the second is the link of interest, so that one is
    used.

* This simply performs `browse-url' rather than do something with the
  SE API.

* By observation, when there are more than one link, the first is a
  reference and the second is the link of interest, so that one is
  used.
* When either the StackExchange API does or sx.el do not support the
  link, this function is used to open it. Creation of a special
  defcustom is justified because StackExchange links are often
  javascript-heavy and emacs browsers do not support javascript.
@@ -278,7 +278,12 @@ likes."
(sx-question-get-from-comment .site_par .comment_id) 'focus)
(sx--find-in-buffer 'comment .comment_id))
(.notification_type
(sx-message "Viewing notifications is not yet implemented"))
; (sx-message "Viewing notifications is not yet implemented"))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably just delete this line.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left it in because what I did wasn't really a solution for the lack of implementation, but rather a stop-gap to give the user the ability to continue using stackexchange in another interface (the web browser). Whenever sx.el does implement support for those type of pages, it would be appropriate to remove my code snippet, but for now a user has no way to perform the tasks associated with the notification, eg. review someone's suggested edits.

(sx-message "Viewing notifications is not yet implemented"))
; (sx-message "Viewing notifications is not yet implemented"))
(let ((start 0))
(while (string-match "\\(http[^\"]+\\)\"" .body start)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this wrapped in a loop? Do we want to get the last link in body? What links come before it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My observation of the notifications in my own inbox was that when there is more than one link, the first is to a general item, such as a question or answer, and the second is to an action url, such as a page to review someone's edit to your question/answer.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like we should just start the search from the bottom, then.

@vermiculus
Copy link
Owner

Is this something that's still valuable to merge after all this time? Happy to do so if so.

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

Successfully merging this pull request may close these issues.

2 participants