-
Notifications
You must be signed in to change notification settings - Fork 40
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
base: master
Are you sure you want to change the base?
Conversation
* 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")) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Is this something that's still valuable to merge after all this time? Happy to do so if so. |
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.