Ihor Radchenko wrote:

> I am unable to reproduce without emacs -Q and with Org main branch on my
> side. Here is what I did:

> 1. Saved your example file to /tmp/test.org
> 2. Ran chmod -w /tmp/test.org && /home/yantar92/Git/emacs/src/emacs 
> --init-directory=/tmp -L /home/yantar92/Git/org-mode/lisp/ /tmp/test.org
> 3. Moved point to the first checkbox and pressed C-c C-c
> 4. M-! chmod +w /tmp/test.org
> 5. M-x revert-buffer
> 6. C-c C-c

Hmm.  I tried a slight variation on your recipe, and at first I saw the
same results as you.  I played around with it for a bit, to see if the
use of -L (as opposed to changing load-path by hand) was significant.
But then the problem came back and was persistent.

More testing revealed that if I use a new (differently named) test file
each time, the problem is not reproducible.  And if I run the test
scenario to completion ("chmod +w...", revert, C-c C-c, save file, exit
Emacs), the problem is not reproducible, even with the same file.

But I can still reproduce the problem, by using a slightly different
recipe than the original one.

Here's my current test-start script, which I run using "bash test.sh":

-----8<-----8<-----
testfile=~/Desktop/test3.org
chmod a-w $testfile
[ -f ~/.emacs ] && mv ~/.emacs ~/.emacs.save
#rm -rf ~/.cache/org-persist
#strace -o ${testfile}.log emacs --init-directory=/home/kupfer/tmp -L 
~/src/org-mode/lisp $testfile &
emacs --init-directory=/home/kupfer/tmp -L ~/src/org-mode/lisp $testfile &
----->8----->8-----

On the first C-c C-c, I get an error message about the buffer being
read-only, as expected.  If I then exit Emacs and rerun the test-start
script, the first C-c C-c gets me a different error message ("Cannot
update this checkbox"), and I get that same error after the "chmod +w",
buffer-revert, C-c C-c sequence.  Furthermore, if I then exit and
restart Emacs, leaving the test file writable, I still get the "Cannot
update this checkbox" error.

But, if I uncomment the 'rm' command in the test script and then try to
reproduce the problem using the modified recipe, I cannot reproduce the
problem.

Is there a variable that I can use to disable the org-persist stuff?  A
quick search using 'M-x apropos' didn't show anything promising.

thanks,
mike

Reply via email to