activities.el icon indicating copy to clipboard operation
activities.el copied to clipboard

Adjust error message for a bookmark that doesn't change the buffer

Open fschweitzer-ETHZ opened this issue 1 year ago • 11 comments

  1. Activities was unable to get a buffer for bookmark:

(#("Activity: DC-13 " 0 16 (bmkp-full-record (#1 (time 26058 30868 176769 395000) (visits . 0) (activities-name . "DC-13 ") (handler . activities-bookmark-handler)))) (filename . " - no file -") (buffer-name . "Ibuffer") (front-context-string . " MRL Name ") (rear-context-string) (front-context-region-string) (rear-context-region-string) (visits . 1) (time 26058 31089 378453 71000) (created 26058 30967 111331 208000) (position . 1))

It's likely that the bookmark's file no longer exists, in which case you may need to relocate it and redefine this activity.

If this is not the case, please report this error to the `activities' maintainer.

from the "bookmarks" file -- it is there: (#1=(#("Activity: DC-13 " 0 16 (bmkp-full-record #1#)) (time 26058 30868 176769 395000) (visits . 0) (activities-name . "DC-13 ") (handler . activities-bookmark-handler))

  1. For other activities, no bookmark was automaticically created

fschweitzer-ETHZ avatar Feb 12 '24 20:02 fschweitzer-ETHZ

  1. As you can see in that data structure, that bookmark attempts to point to the *Ibuffer* buffer. ibuffer does not support the bookmark system, so its buffers can't be restored. I'll need to adjust the error message to help explain that.

  2. I don't understand what you mean. Please provide a recipe to reproduce the problem.

alphapapa avatar Feb 13 '24 10:02 alphapapa

Thanks for the explanation. Indeed, the activity bookmarks I assumed were missing also referred to different Ibuffers - that's why they are not there. But if we cannot use Ibuffer, how can "activity" be used to comprise the "buffers displayed in a window"? Could you provide an example, or a screenshot?

On 13.02.24 11:13, Adam Porter wrote:

As you can see in that data structure, that bookmark attempts to
point to the |*Ibuffer*| buffer. |ibuffer| does not support the
|bookmark| system, so its buffers can't be restored. I'll need to
adjust the error message to help explain that.
I don't understand what you mean. Please provide a recipe to
reproduce the problem.

— Reply to this email directly, view it on GitHub https://github.com/alphapapa/activities.el/issues/30#issuecomment-1941063034, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5RNEQZFONHG3ERIUHKQ33YTM4E5AVCNFSM6AAAAABDFKOMQ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBRGA3DGMBTGQ. You are receiving this because you authored the thread.Message ID: @.***>

[ { @.": "http://schema.org", @.": "EmailMessage", "potentialAction": { @.": "ViewAction", "target": "https://github.com/alphapapa/activities.el/issues/30#issuecomment-1941063034", "url": "https://github.com/alphapapa/activities.el/issues/30#issuecomment-1941063034", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { @.": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

fschweitzer-ETHZ avatar Feb 14 '24 11:02 fschweitzer-ETHZ

Have you looked at the documentation? It should already explain all of that.

alphapapa avatar Feb 14 '24 17:02 alphapapa

You are right, and everything works as described (I was probably expecting something like tab-line combined with automatic bookmarking). Thanks for your work.

fschweitzer-ETHZ avatar Feb 15 '24 07:02 fschweitzer-ETHZ

You're welcome.

I still need to adjust the error message, so reopening this issue.

alphapapa avatar Feb 15 '24 16:02 alphapapa

so is the same with pdf-view-mode? I use pdf-tools with it:

Activities was unable to get a buffer for bookmark:

("original-1830.pdf" (filename . "~/Documentos/Straubinger Digital/oficio-parvo-1830/original-1830.pdf") (position . 1) (page . 96) (slice) (size . fit-page) (origin) (handler . pdf-view-bookmark-jump-handler) (defaults "original-1830.pdf"))

It's likely that the bookmark's file no longer exists, in which case you may need to relocate it and redefine this activity.

If this is not the case, please report this error to the `activities' maintainer.

In the meantime, you may ignore this error and use the other buffers in the activity.

shackra avatar Feb 16 '24 00:02 shackra

so is the same with pdf-view-mode? I use pdf-tools with it:

Activities was unable to get a buffer for bookmark:

("original-1830.pdf" (filename . "~/Documentos/Straubinger Digital/oficio-parvo-1830/original-1830.pdf") (position . 1) (page . 96) (slice) (size . fit-page) (origin) (handler . pdf-view-bookmark-jump-handler) (defaults "original-1830.pdf"))

It's likely that the bookmark's file no longer exists, in which case you may need to relocate it and redefine this activity.

If this is not the case, please report this error to the `activities' maintainer.

In the meantime, you may ignore this error and use the other buffers in the activity.

You can see from that bookmark record that it has a pdf-view- handler function, so it should work. Are you sure the file is still there? If so, try bookmarking just that buffer with C-x r m and then kill it and see if you can return to it with C-x r b.

alphapapa avatar Feb 16 '24 01:02 alphapapa

so is the same with pdf-view-mode? I use pdf-tools with it:

Activities was unable to get a buffer for bookmark:

("original-1830.pdf" (filename . "~/Documentos/Straubinger Digital/oficio-parvo-1830/original-1830.pdf") (position . 1) (page . 96) (slice) (size . fit-page) (origin) (handler . pdf-view-bookmark-jump-handler) (defaults "original-1830.pdf"))

It's likely that the bookmark's file no longer exists, in which case you may need to relocate it and redefine this activity.

If this is not the case, please report this error to the `activities' maintainer.

In the meantime, you may ignore this error and use the other buffers in the activity.

You can see from that bookmark record that it has a pdf-view- handler function, so it should work. Are you sure the file is still there? If so, try bookmarking just that buffer with C-x r m and then kill it and see if you can return to it with C-x r b.

Well, I see the file bookmarked

image

and I was able to come back to it from the bookmarks

However, using activities.el:

image

shackra avatar Feb 16 '24 12:02 shackra

I see an error in your echo area there: File mode specification error: (void-variable pdf-tools-enabled-modes). That seems likely to be relevant to the problem. I'm guessing that it indicates a bug in pdf-tools's bookmark support.

alphapapa avatar Feb 16 '24 21:02 alphapapa

I'm guessing that it indicates a bug in pdf-tools's bookmark support.

if they have that supported at all, of course.

shackra avatar Feb 16 '24 22:02 shackra

I'm guessing that it indicates a bug in pdf-tools's bookmark support.

if they have that supported at all, of course.

You can see in the bookmark record that it is, because there's a handler function: pdf-view-bookmark-jump-handler

alphapapa avatar Feb 16 '24 22:02 alphapapa