all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)]
@ 2018-06-18 21:07 Allen Li
  2018-06-19  7:42 ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Allen Li @ 2018-06-18 21:07 UTC (permalink / raw)
  To: Org Mode List

org-toggle-tag always marks the buffer as modified due to how it is
implemented.  It would be better if it did not mark the buffer
modified if it does not change anything.  This is annoying for
org-depend.el (which is contrib, not officially supported) because the
org-blocker-hook set by org-depend.el will mark the buffer modified
whenever an agenda view is built/refreshed.

Glancing at org-toggle-tag, the feature isn't difficult to implement,
but it'll be ugly.

Emacs  : GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.22.24), modified by Debian
Package: Org mode version 9.1.13 (9.1.13-elpaplus @
/usr/local/google/home/ayatane/.emacs.d/elpa/org-plus-contrib-20180618/)

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

* Re: Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)]
  2018-06-18 21:07 Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)] Allen Li
@ 2018-06-19  7:42 ` Nicolas Goaziou
  2018-06-19 14:32   ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-06-19  7:42 UTC (permalink / raw)
  To: Allen Li; +Cc: Org Mode List

Hello,

Allen Li <darkfeline@felesatra.moe> writes:

> org-toggle-tag always marks the buffer as modified due to how it is
> implemented.  It would be better if it did not mark the buffer
> modified if it does not change anything.  This is annoying for
> org-depend.el (which is contrib, not officially supported) because the
> org-blocker-hook set by org-depend.el will mark the buffer modified
> whenever an agenda view is built/refreshed.

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)]
  2018-06-19  7:42 ` Nicolas Goaziou
@ 2018-06-19 14:32   ` Bernt Hansen
  2018-06-19 22:44     ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2018-06-19 14:32 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List, Allen Li

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Allen Li <darkfeline@felesatra.moe> writes:
>
>> org-toggle-tag always marks the buffer as modified due to how it is
>> implemented.  It would be better if it did not mark the buffer
>> modified if it does not change anything.  This is annoying for
>> org-depend.el (which is contrib, not officially supported) because the
>> org-blocker-hook set by org-depend.el will mark the buffer modified
>> whenever an agenda view is built/refreshed.
>
> Fixed. Thank you.

Hi Nicholas,

This fix breaks my capture templates.

commit 593058e4a6270f52fdede2b871a0ee6504944f13
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Date:   Tue Jun 19 09:40:00 2018 +0200

    `org-set-tags' modifies buffer only when necessary

    * lisp/org.el (org--align-tags-here):
    (org-set-tags): Modify buffer only when necessary.

    * testing/lisp/test-org.el (test-org/set-tags): Add tests.

    Reported-by: Allen Li <darkfeline@felesatra.moe>
    <http://lists.gnu.org/r/emacs-orgmode/2018-06/msg00242.html>



I have reverted it locally and it works again.

My normal TODO capture template doesn't allow SPC to separate words when
entering the new headline for the task.

The relevant capture template entry is

(setq org-capture-templates
      (quote (("t" "Todo" entry (file "C:/D-Drive/org/refile.org")
             "* TODO %?\n%U\n\n%x\n" :clock-in t :clock-resume t)
...

After opening the capture window and point is moved to the %? position I
type the headline but SPC no longer enters a space.  C-v SPC works but
that is inconvenient.

Thanks,
Bernt

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

* Re: Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)]
  2018-06-19 14:32   ` Bernt Hansen
@ 2018-06-19 22:44     ` Bernt Hansen
  2018-06-21 20:29       ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2018-06-19 22:44 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List, Allen Li

Hi Nicolas,

Please disregard this bug report.  I can't reproduce it anymore after an
Emacs restart.

Sorry for the noise.

Regards,
Bernt

Bernt Hansen <bernt@norang.ca> writes:

> Hi Nicholas,
>
> This fix breaks my capture templates.
>
> commit 593058e4a6270f52fdede2b871a0ee6504944f13
> Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
> Date:   Tue Jun 19 09:40:00 2018 +0200

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

* Re: Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)]
  2018-06-19 22:44     ` Bernt Hansen
@ 2018-06-21 20:29       ` Bernt Hansen
  2018-06-22 16:51         ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bernt Hansen @ 2018-06-21 20:29 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List, Allen Li

Hi Nicolas,

This problem still exists when the capture template includes TAGS

In the below capture-templates definition the "t" (todo) template works
fine but the "m" Meeting template does not allow SPC to enter a space
between words when entering the headling for the meeting task.

(setq org-capture-templates
      (quote (("t" "Todo" entry (file "C:/D-Drive/org/refile.org")
             "* TODO %?\n%U\n\n%x\n" :clock-in t :clock-resume t)
                   ("m" "Meeting" entry (file
      "C:/D-Drive/org/refile.org")
             "* TODO %? :MEETING:\n%U\n\n" :clock-in t :clock-resume
      t))))

Thanks,
Bernt

Bernt Hansen <bernt@norang.ca> writes:

> Hi Nicolas,
>
> Please disregard this bug report.  I can't reproduce it anymore after an
> Emacs restart.
>
> Sorry for the noise.
>
> Regards,
> Bernt
>
> Bernt Hansen <bernt@norang.ca> writes:
>
>> Hi Nicholas,
>>
>> This fix breaks my capture templates.
>>
>> commit 593058e4a6270f52fdede2b871a0ee6504944f13
>> Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
>> Date:   Tue Jun 19 09:40:00 2018 +0200

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

* Re: Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)]
  2018-06-21 20:29       ` Bernt Hansen
@ 2018-06-22 16:51         ` Nicolas Goaziou
  2018-06-25  2:24           ` Bernt Hansen
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2018-06-22 16:51 UTC (permalink / raw)
  To: Bernt Hansen; +Cc: Org Mode List, Allen Li

Hello,

Bernt Hansen <bernt@norang.ca> writes:

> This problem still exists when the capture template includes TAGS
>
> In the below capture-templates definition the "t" (todo) template works
> fine but the "m" Meeting template does not allow SPC to enter a space
> between words when entering the headling for the meeting task.
>
> (setq org-capture-templates
>       (quote (("t" "Todo" entry (file "C:/D-Drive/org/refile.org")
>              "* TODO %?\n%U\n\n%x\n" :clock-in t :clock-resume t)
>                    ("m" "Meeting" entry (file
>       "C:/D-Drive/org/refile.org")
>              "* TODO %? :MEETING:\n%U\n\n" :clock-in t :clock-resume
>       t))))

I re-introduced the problem recently. This is now fixed, with
a regression test for good measure.

Thank you.

Regards,

-- 
Nicolas Goaziou                                                0x80A93738

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

* Re: Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)]
  2018-06-22 16:51         ` Nicolas Goaziou
@ 2018-06-25  2:24           ` Bernt Hansen
  0 siblings, 0 replies; 7+ messages in thread
From: Bernt Hansen @ 2018-06-25  2:24 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Org Mode List, Allen Li

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Bernt Hansen <bernt@norang.ca> writes:
>
>> This problem still exists when the capture template includes TAGS
>>
>> In the below capture-templates definition the "t" (todo) template works
>> fine but the "m" Meeting template does not allow SPC to enter a space
>> between words when entering the headling for the meeting task.
>>
>> (setq org-capture-templates
>>       (quote (("t" "Todo" entry (file "C:/D-Drive/org/refile.org")
>>              "* TODO %?\n%U\n\n%x\n" :clock-in t :clock-resume t)
>>                    ("m" "Meeting" entry (file
>>       "C:/D-Drive/org/refile.org")
>>              "* TODO %? :MEETING:\n%U\n\n" :clock-in t :clock-resume
>>       t))))
>
> I re-introduced the problem recently. This is now fixed, with
> a regression test for good measure.

Fix confirmed :)

Thanks,
Bernt

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

end of thread, other threads:[~2018-06-25  2:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-18 21:07 Bug: org-toggle-tag always marks buffer modified [9.1.13 (9.1.13-elpaplus @ .emacs.d/elpa/org-plus-contrib-20180618/)] Allen Li
2018-06-19  7:42 ` Nicolas Goaziou
2018-06-19 14:32   ` Bernt Hansen
2018-06-19 22:44     ` Bernt Hansen
2018-06-21 20:29       ` Bernt Hansen
2018-06-22 16:51         ` Nicolas Goaziou
2018-06-25  2:24           ` Bernt Hansen

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.