all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: org-hierarchical-todo-statistics + org-update-statistics cookies in before-save-hook breaks overlays [8.3.5 (8.3.5-elpaplus @ /home/clement/.emacs.d/.cask/25.1.50.7/elpa/org-plus-contrib-20160719/)]
@ 2016-07-31 14:38 Clément Pit--Claudel
  2016-08-08 20:00 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Clément Pit--Claudel @ 2016-07-31 14:38 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1.1: Type: text/plain, Size: 977 bytes --]

Hi emacs-orgmode,

Setting ‘org-hierarchical-todo-statistics’ to nil confuses ‘org-update-statistics-cookies’ when that function is used in a before-save-hook.

More precisely, every time I save the attached org file, the hidden section of the buffer shrinks a bit, revealing a few characters at the end of the buffer. This is weird. Fortunately, it's reproducible in emacs -Q. Here's a video: http://asciinema.org/a/1h4otbt9cviod3nef0nx1sa5s

I have attached minimal org.el and test.org files. With these, run

  emacs -Q -l org.el test.org

Then make a change on the first line and save. This will reveal a few characters at the end of the file-local variables section. Repeating the edit+save cycle shows a few more characters each time (if this is abstruse, watch the asciinema video above)

Let me know if I can provide more information!

Cheers,
Clément.

Emacs  : GNU Emacs 25.1.50.7 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-07-20

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: org.el --]
[-- Type: text/x-emacs-lisp; name="org.el", Size: 203 bytes --]

(defun ~/org/update-cookies ()
  (org-update-statistics-cookies 'all))

(defun ~/org/setup ()
  (add-hook 'before-save-hook #'~/org/update-cookies nil t))

(add-hook 'org-mode-hook #'~/org/setup)

[-- Attachment #1.1.3: test.org --]
[-- Type: application/vnd.lotus-organizer, Size: 303 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: org-hierarchical-todo-statistics + org-update-statistics cookies in before-save-hook breaks overlays [8.3.5 (8.3.5-elpaplus @ /home/clement/.emacs.d/.cask/25.1.50.7/elpa/org-plus-contrib-20160719/)]
  2016-07-31 14:38 Bug: org-hierarchical-todo-statistics + org-update-statistics cookies in before-save-hook breaks overlays [8.3.5 (8.3.5-elpaplus @ /home/clement/.emacs.d/.cask/25.1.50.7/elpa/org-plus-contrib-20160719/)] Clément Pit--Claudel
@ 2016-08-08 20:00 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2016-08-08 20:00 UTC (permalink / raw)
  To: Clément Pit--Claudel; +Cc: emacs-orgmode

Hello,

Clément Pit--Claudel <clement.pitclaudel@live.com> writes:

> Setting ‘org-hierarchical-todo-statistics’ to nil confuses ‘org-update-statistics-cookies’ when that function is used in a before-save-hook.
>
> More precisely, every time I save the attached org file, the hidden section of the buffer shrinks a bit, revealing a few characters at the end of the buffer. This is weird. Fortunately, it's reproducible in emacs -Q. Here's a video: http://asciinema.org/a/1h4otbt9cviod3nef0nx1sa5s
>
> I have attached minimal org.el and test.org files. With these, run
>
>   emacs -Q -l org.el test.org
>
> Then make a change on the first line and save. This will reveal a few
> characters at the end of the file-local variables section. Repeating
> the edit+save cycle shows a few more characters each time (if this is
> abstruse, watch the asciinema video above)

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-08 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-31 14:38 Bug: org-hierarchical-todo-statistics + org-update-statistics cookies in before-save-hook breaks overlays [8.3.5 (8.3.5-elpaplus @ /home/clement/.emacs.d/.cask/25.1.50.7/elpa/org-plus-contrib-20160719/)] Clément Pit--Claudel
2016-08-08 20:00 ` Nicolas Goaziou

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.