GNU bug report logs -
#44524
28.0.50; Wrong place saved in org file with save-place-mode
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Sun, 8 Nov 2020 19:49:02 UTC
Severity: normal
Tags: fixed
Fixed in version 28.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 44524 in the body.
You can then email your comments to 44524 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org, emacs-orgmode <at> gnu.org
:
bug#44524
; Package
emacs,org-mode
.
(Sun, 08 Nov 2020 19:49:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Juri Linkov <juri <at> linkov.net>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org, emacs-orgmode <at> gnu.org
.
(Sun, 08 Nov 2020 19:49:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Package: emacs,org-mode
0. emacs -Q
1. enable save-place-mode
2. visit an org file with a single line:
#+DATE: 2020-11-08
The cursor always jumps to the fixed place inside the date,
and doesn't remember its previous position. Here is a fix
to not set buffer-file-name (that causes save-place-mode to save
wrong place for that file name) in a temporary buffer:
[org-element-parse-secondary-string.patch (text/x-diff, inline)]
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index be74dfdbef..d1fa777aa6 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -4144,7 +4144,8 @@ org-element-parse-secondary-string
(dolist (v local-variables)
(ignore-errors
(if (symbolp v) (makunbound v)
- (set (make-local-variable (car v)) (cdr v)))))
+ (unless (memq (car v) '(buffer-file-name buffer-file-truename))
+ (set (make-local-variable (car v)) (cdr v))))))
;; Transferring local variables may put the temporary buffer
;; into a read-only state. Make sure we can insert STRING.
(let ((inhibit-read-only t)) (insert string))
Information forwarded
to
bug-gnu-emacs <at> gnu.org, emacs-orgmode <at> gnu.org
:
bug#44524
; Package
emacs,org-mode
.
(Tue, 10 Nov 2020 19:32:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 44524 <at> debbugs.gnu.org (full text, mbox):
tags 44524 fixed
close 44524 28.0.50
quit
> Package: emacs,org-mode
>
> 0. emacs -Q
> 1. enable save-place-mode
> 2. visit an org file with a single line:
>
> #+DATE: 2020-11-08
>
> The cursor always jumps to the fixed place inside the date,
> and doesn't remember its previous position. Here is a fix
> to not set buffer-file-name (that causes save-place-mode to save
> wrong place for that file name) in a temporary buffer:
>
> diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
> index be74dfdbef..d1fa777aa6 100644
> --- a/lisp/org/org-element.el
> +++ b/lisp/org/org-element.el
> @@ -4144,7 +4144,8 @@ org-element-parse-secondary-string
> (dolist (v local-variables)
> (ignore-errors
> (if (symbolp v) (makunbound v)
> - (set (make-local-variable (car v)) (cdr v)))))
> + (unless (memq (car v) '(buffer-file-name buffer-file-truename))
> + (set (make-local-variable (car v)) (cdr v))))))
> ;; Transferring local variables may put the temporary buffer
> ;; into a read-only state. Make sure we can insert STRING.
> (let ((inhibit-read-only t)) (insert string))
Pushed to Emacs master, and closed.
Added tag(s) fixed.
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Tue, 10 Nov 2020 19:32:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.0.50, send any further explanations to
44524 <at> debbugs.gnu.org and Juri Linkov <juri <at> linkov.net>
Request was from
Juri Linkov <juri <at> linkov.net>
to
control <at> debbugs.gnu.org
.
(Tue, 10 Nov 2020 19:32:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 09 Dec 2020 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.