From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Moller-Mara Subject: Bug: Marking repeated tasks with two tags as DONE causes problems Date: Fri, 11 Aug 2017 15:04:05 +0800 Message-ID: <87zib660wq.fsf@cns.nyu.edu> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52296) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dg3zT-0003Xg-Fx for emacs-orgmode@gnu.org; Fri, 11 Aug 2017 03:04:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dg3zQ-0003oK-7u for emacs-orgmode@gnu.org; Fri, 11 Aug 2017 03:04:15 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:35281) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dg3zQ-0003nB-03 for emacs-orgmode@gnu.org; Fri, 11 Aug 2017 03:04:12 -0400 Received: by mail-pg0-x241.google.com with SMTP id l64so2497163pge.2 for ; Fri, 11 Aug 2017 00:04:10 -0700 (PDT) Received: from simulacron ([59.152.244.235]) by smtp.gmail.com with ESMTPSA id 75sm817708pfs.117.2017.08.11.00.04.07 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Aug 2017 00:04:08 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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