emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] Undo eats buffer [9.7-pre (release_9.6.10-888-g098f08 @ /home/kdm/


From: Ken Mankoff
Subject: [BUG] Undo eats buffer [9.7-pre (release_9.6.10-888-g098f08 @ /home/kdm/local/src/org-mode/lisp/)]
Date: Thu, 26 Oct 2023 05:01:14 -0700
User-agent: mu4e 1.8.15; emacs 28.1

I'm running into a bug where if I (undo) after evaluating an Org Babel 
emacs-jupyter code block, several hundred lines of the Org buffer below are 
erased. Unfortunately I am having trouble creating an MWE that demonstrates 
this, but I hope the org-element-cache warning below may still be helpful.

The bug occurs when the emacs-jupyter (Python) block produces are error, and 
results look like the following, and then I eval (undo):

#+RESULTS:
:RESULTS:
: some text here
# [goto error]
#+begin_example
  lots of text here
#+end_example
:END:

I've tried (setq org-element-use-cache nil) but that does not seem to help. Any 
suggestions how to work around this, or help the emacs-jupyter effort address 
this if it is their domain, will be much appreciated.

Thanks,

   -k.



Your bug report will be posted to the Org mailing list.
------------------------------------------------------------------------
Warning (org-element-cache): org-element--cache: Unregistered buffer 
modifications detected (57640 != 55418). Resetting.
If this warning appears regularly, please report the warning text to Org mode 
mailing list (M-x org-submit-bug-report).
The buffer is: misc.org
 Current command: nil
 Backtrace:
"  backtrace-to-string(nil)
  org-element--cache-sync(#<buffer misc.org> 37660)
  org-element-at-point()
  (progn (org-element-at-point))
  (unwind-protect (progn (org-element-at-point)) (set-match-data 
save-match-data-internal 'evaporate))
  (let ((save-match-data-internal (match-data))) (unwind-protect (progn 
(org-element-at-point)) (set-match-data save-match-data-internal 'evaporate)))
  (let ((element (let ((save-match-data-internal (match-data))) (unwind-protect 
(progn (org-element-at-point)) (set-match-data save-match-data-internal 
'evaporate))))) (and (eq (org-element-type element) 'src-block) (>= 
(line-beginning-position) (let* ((parray (and t (let* ... ...)))) (if parray 
(let* ((val ...)) (if (eq val ...) 'nil (let ... val))) (let* ((val ...)) (cond 
(... ...) (... ...) (t ...)))))) (<= (line-end-position) (save-excursion 
(save-restriction (widen) (goto-char (let* (...) (if parray ... ...))) 
(skip-chars-backward \" \\11\\n\") (line-end-position)))) 
(org-element--property :language element nil nil)))
  org-eldoc-get-src-lang()
  (let ((lang (org-eldoc-get-src-lang))) (cond ((string= lang \"org\") nil) 
((or (string= lang \"emacs-lisp\") (string= lang \"elisp\")) (cond ((and 
(boundp 'eldoc-documentation-functions) (fboundp 'elisp-eldoc-var-docstring) 
(fboundp 'elisp-eldoc-funcall)) (let ((eldoc-documentation-functions ...)) 
(eldoc-print-current-symbol-info))) ((fboundp 
'elisp-eldoc-documentation-function) (elisp-eldoc-documentation-function)) (t 
(let (eldoc-documentation-function) (eldoc-print-current-symbol-info))))) ((or 
(string= lang \"c\") (string= lang \"C\")) (if (require 'c-eldoc nil t) (progn 
(c-eldoc-print-current-symbol-info)))) ((string= lang \"css\") (if (require 
'css-eldoc nil t) (progn (css-eldoc-function)))) ((string= lang \"php\") (if 
(require 'php-eldoc nil t) (progn (php-eldoc-function)))) ((or (string= lang 
\"go\") (string= lang \"golang\")) (if (require 'go-eldoc nil t) (progn 
(go-eldoc--documentation-function)))) (t (let ((doc-fun 
(org-eldoc-get-mode-local-documentation-function lang)) (callback (car args))) 
(if (functionp doc-fun) (progn (if (functionp callback) (funcall doc-fun 
callback) (funcall doc-fun))))))))
  (or (org-eldoc-get-breadcrumb) (org-eldoc-get-src-header) (let ((lang 
(org-eldoc-get-src-lang))) (cond ((string= lang \"org\") nil) ((or (string= 
lang \"emacs-lisp\") (string= lang \"elisp\")) (cond ((and (boundp ...) 
(fboundp ...) (fboundp ...)) (let (...) (eldoc-print-current-symbol-info))) 
((fboundp 'elisp-eldoc-documentation-function) 
(elisp-eldoc-documentation-function)) (t (let (eldoc-documentation-function) 
(eldoc-print-current-symbol-info))))) ((or (string= lang \"c\") (string= lang 
\"C\")) (if (require 'c-eldoc nil t) (progn 
(c-eldoc-print-current-symbol-info)))) ((string= lang \"css\") (if (require 
'css-eldoc nil t) (progn (css-eldoc-function)))) ((string= lang \"php\") (if 
(require 'php-eldoc nil t) (progn (php-eldoc-function)))) ((or (string= lang 
\"go\") (string= lang \"golang\")) (if (require 'go-eldoc nil t) (progn 
(go-eldoc--documentation-function)))) (t (let ((doc-fun 
(org-eldoc-get-mode-local-documentation-function lang)) (callback (car args))) 
(if (functionp doc-fun) (progn (if ... ... ...))))))))
  org-eldoc-documentation-function(#f(compiled-function (string &rest plist) 
#<bytecode 0x2cb3448e18d688a>))
  run-hook-with-args-until-success(org-eldoc-documentation-function 
#f(compiled-function (string &rest plist) #<bytecode 0x2cb3448e18d688a>))
  eldoc-documentation-default()
  eldoc--invoke-strategy(nil)
  eldoc-print-current-symbol-info()
  #f(compiled-function () #<bytecode -0x1d368e501f6fdae>)()
  apply(#f(compiled-function () #<bytecode -0x1d368e501f6fdae>) nil)
  timer-event-handler([t 0 0 500000 nil #f(compiled-function () #<bytecode 
-0x1d368e501f6fdae>) nil idle 0 nil])
" Disable showing Disable logging



Emacs  : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, 
cairo version 1.16.0)
 of 2022-05-30
Package: Org mode version 9.7-pre (release_9.6.10-888-g098f08 @ 
/home/kdm/local/src/org-mode/lisp/)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]