Skip to content

feature: Add going to exact location on jumping back and forward#53

Open
pkradiator wants to merge 1 commit into
astoff:mainfrom
pkradiator:main
Open

feature: Add going to exact location on jumping back and forward#53
pkradiator wants to merge 1 commit into
astoff:mainfrom
pkradiator:main

Conversation

@pkradiator

Copy link
Copy Markdown

Fix #52

Comment thread devdocs.el
(interactive)
(unless (cadr devdocs--stack)
(user-error "No previous entry"))
(setcar devdocs--stack (cons (cons 'saved-point (point)) (car devdocs--stack)))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Do you mean (push `(saved-point . ,(point)) (car devdocs--stack))?

Also, we can name that property just point.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Or better, actually: (setf (alist-get 'saved-point (car devdocs--stack)) (point)).

Comment thread devdocs.el
(current-buffer)))
(devdocs-goto-target)
(if .saved-point
(goto-char (min .saved-point (point-max)))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Okay, good catch. But also (point-min) might not be 1. So we should save (- (point) (point-mix)) and jump to (min (point-max) (+ saved-point (point-mix))).

(So really we should rather call saved-point position or something.)

@astoff

astoff commented Jun 16, 2026

Copy link
Copy Markdown
Owner

This is small enough to accept without the FSF copyright papers, but do you happen to have them?

@pkradiator

pkradiator commented Jun 16, 2026

Copy link
Copy Markdown
Author

This is small enough to accept without the FSF copyright papers, but do you happen to have them?

Can you elaborate or link to them with related policy?

@astoff

astoff commented Jun 17, 2026

Copy link
Copy Markdown
Owner

It's exaplained here: https://www.gnu.org/software/emacs/manual/html_node/emacs/Copyright-Assignment.html

It doesn't matter for now, only if you intend to make more contributions to GNU ELPA packages or to Emacs itself.

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.

devdocs-go-back doesn't bring you back to the exact same location

2 participants