emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x
@ 2013-05-15  1:09 Anupam Sengupta
  2013-05-16  8:35 ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Anupam Sengupta @ 2013-05-15  1:09 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1312 bytes --]

Hi,

Loading tags from a #+SETUPFILE is causing inconsistent behavior in the
tag-selection for both
   in-buffer selection via C-c C-q (`org-set-tags-command`) and
   in-agenda selection via :       (`org-agenda-set-tags`).

A test-case using orgmode 8.0.3 on Emacs 24.3 (with the bare minimum
init file setting to get orgmode loaded).

The Org files are:

test.org:
=========
#+SETUPFILE: ~/setup.org
#+TAGS: @Work(w) @Home(h)

* The top entry
  SCHEDULED: <2013-05-14 Tue>
  
setup.org:
==========
#+TAGS: email(e) call(c)



With the setup above, invoking C-c C-q on the first entry in the _buffer_
displays *only* the two tag entries from setup.org; i.e.:

================================================================
Inherited:  
Current:    

  [e] email   [c] call    
================================================================

And invoking C-c C-q in the _agenda_ for this entry displays *only* the
two entries from the in-buffer tag settings:

================================================================
Inherited:  
Current:    

  [w] @Work   [h] @Home 
================================================================


In prior versions of orgmode (prior to 8.0.x), all four tags would be
displayed in the tag selection buffer.

I have attached the test files.


Regards,
--
Anupam


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test.org --]
[-- Type: text/x-org, Size: 98 bytes --]

#+SETUPFILE: ~/setup.org
#+TAGS: @Work(w) @Home(h)

* The top entry
  SCHEDULED: <2013-05-14 Tue>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: setup.org --]
[-- Type: text/x-org, Size: 25 bytes --]

#+TAGS: email(e) call(c)

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

* Re: [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x
  2013-05-15  1:09 [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x Anupam Sengupta
@ 2013-05-16  8:35 ` Bastien
  2013-05-24  0:33   ` Anupam Sengupta
  0 siblings, 1 reply; 4+ messages in thread
From: Bastien @ 2013-05-16  8:35 UTC (permalink / raw)
  To: Anupam Sengupta; +Cc: emacs-orgmode

Hi Anupam,

Anupam Sengupta <anupamsg@gmail.com> writes:

> Loading tags from a #+SETUPFILE is causing inconsistent behavior in the
> tag-selection for both
>    in-buffer selection via C-c C-q (`org-set-tags-command`) and
>    in-agenda selection via :       (`org-agenda-set-tags`).
>
> A test-case using orgmode 8.0.3 on Emacs 24.3 (with the bare minimum
> init file setting to get orgmode loaded).

Thanks a lot for reporting this and for the test case, it should be
fixed now.

All: the fix involves checking for a #+setupfile directive when
processing Org buffers for building the agenda.  This may lead to
some slow down when your agenda is built from many files.  Let me
know if you notice some weirdness.

Thanks,

-- 
 Bastien

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

* Re: [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x
  2013-05-16  8:35 ` Bastien
@ 2013-05-24  0:33   ` Anupam Sengupta
  2013-07-03 15:05     ` Bastien
  0 siblings, 1 reply; 4+ messages in thread
From: Anupam Sengupta @ 2013-05-24  0:33 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]


Hi Bastien,


    >> Loading tags from a #+SETUPFILE is causing inconsistent behavior
    >> in the tag-selection for both in-buffer selection via C-c C-q
    >> (`org-set-tags-command`) and in-agenda selection via :
    >> (`org-agenda-set-tags`).

    Bastien> Thanks a lot for reporting this and for the test case, it
    Bastien> should be fixed now.

    Bastien> All: the fix involves checking for a #+setupfile directive
    Bastien> when processing Org buffers for building the agenda.  This
    Bastien> may lead to some slow down when your agenda is built from
    Bastien> many files.  Let me know if you notice some weirdness.

Thanks a lot for the fix.  The test files are now behaving properly
after the fix (I am on orgmode git development head at commit
36848fdec9eb8c9c17a2e98cd742af1f9f9b23db as on 23rd May).

*However*, while testing this fix, I think I have uncovered a few more bugs(?)
with the +SETUPFILE interaction with the in-buffer tag selection.

Specifically, if the +SETUPFILE contains /any/ of the following
directives (not exhaustive, just what my setup happened to have), then
the tag listing in the completion buffer is showing _duplicated lists_
of the tags read from the setup file:

+STARTUP
+OPTIONS
+TYP_TODO
+CHOOSE_TODO

I have expanded the test case to include this scenario:

The setup file
==============

[-- Attachment #2: setup.org --]
[-- Type: text/plain, Size: 150 bytes --]

##+STARTUP: align

##+OPTIONS: timestamp:t
##+TYP_TODO: TODO(t) DELEGATED(l!) | DONE(d)
##+CHOOSE_TODO: NO(,-) YES(,0)

#+TAGS: { @work(w) @home(h) }

[-- Attachment #3: Type: text/plain, Size: 45 bytes --]


The test orgmode file
=====================

[-- Attachment #4: test.org --]
[-- Type: text/plain, Size: 181 bytes --]

#+SETUPFILE: ~/setup.org
#+TAGS: call(l) email(e)

* The top entry                                                                        :@work:call:
  SCHEDULED: <2013-05-14 Tue>

[-- Attachment #5: Type: text/plain, Size: 656 bytes --]



Note that in the setup file, I have commented out every option other
than +STARTUP and +TAGS.  In this case, the in-buffer tag selection
results in a tag selection display of:

------------------------------------------------------------
Inherited:
Current:    @work call

  [l] call    [e] email
{ [w] @work   [h] @home   }
{ [w] @work   [h] @home   }   <----- Note the duplicated listing
------------------------------------------------------------

If you comment the +STARTUP option in the setup.org file, then the tag
selection behaves as expected.  Alternatively, if you enable any of
the other options, then the issue reoccurs.

Thanks!
--
Anupam

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

* Re: [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x
  2013-05-24  0:33   ` Anupam Sengupta
@ 2013-07-03 15:05     ` Bastien
  0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-07-03 15:05 UTC (permalink / raw)
  To: Anupam Sengupta; +Cc: emacs-orgmode

Hi Anupam,

Anupam Sengupta <anupamsg@gmail.com> writes:

> Thanks a lot for the fix.  The test files are now behaving properly
> after the fix (I am on orgmode git development head at commit
> 36848fdec9eb8c9c17a2e98cd742af1f9f9b23db as on 23rd May).
>
> *However*, while testing this fix, I think I have uncovered a few more bugs(?)
> with the +SETUPFILE interaction with the in-buffer tag selection.
>
> Specifically, if the +SETUPFILE contains /any/ of the following
> directives (not exhaustive, just what my setup happened to have), then
> the tag listing in the completion buffer is showing _duplicated lists_
> of the tags read from the setup file:

I finally fixed this.  Thanks,

-- 
 Bastien

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

end of thread, other threads:[~2013-07-03 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15  1:09 [BUG] Tag selection is inconsistent when loaded from #+SETUPFILE in orgmode 8.0.x Anupam Sengupta
2013-05-16  8:35 ` Bastien
2013-05-24  0:33   ` Anupam Sengupta
2013-07-03 15:05     ` Bastien

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).