Hello, I'm starting to encounter a strange, silent problem when switching the state of a task with multiple tags. With the following minimal example:
#+STARTUP: logdone #+STARTUP: logdrawer * TODO Hello :hi:there: SCHEDULED: <2017-08-11 Fri .+1d> Switching The "hello" task from "TODO" to "DONE" should keep the task as "TODO", but schedule it in the future. Instead, the file ends up looking like: #STARTUP: logdone :hi:there: #+STARTUP: logdrawer * DONE Hello :hi:there: CLOSED: [2017-08-11 Fri 14:57] SCHEDULED: <2017-08-12 Sat .+1d> Where the task is marked as "DONE", and weirdly tags are added in some of the startup config at the beginning of the file. I'm using Emacs : GNU Emacs 26.0.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.5) of 2017-01-18 Package: Org mode version 9.0.9 (release_9.0.9-746-g8fa6c0 @ /usr/local/share/emacs/site-lisp/org/) There still seems to be a problem with org-toggle-tag, which is causing this. I think it has to do with the "replace-match" again. "org-split-string" doesn't save match data, so "replace-match" replaces the wrong thing. Best, Josh