ihdavids / orgextended

Sublime Text OrgMode Extension
MIT License
209 stars 15 forks source link

Overlapping events can appear out of order in the Agenda timeline #86

Closed r4dian closed 2 months ago

r4dian commented 8 months ago

Describe the bug Overlapping events appear out of order

To Reproduce Steps to reproduce the behaviour:

  1. Create some Org headings scheduled for the current day, at different times, but finishing at the same time.
  2. Go to the Agenda view with alt-o, o, a
  3. Scroll down to those events

Expected behaviour Timeline sections should be in time order. The same source files produce an agenda in the expected order in emacs.

Screenshots image

Platform: Windows 11, Sublime Text 3.

Sublime debug console output

DPI mode: per-monitor v2
startup, version: 3211 windows x64 channel: stable
executable: /C/Program Files/Sublime Text 3/sublime_text.exe
working dir: /C/Program Files/Sublime Text 3
packages path: /C/Users/████.█████/AppData/Roaming/Sublime Text 3/Packages
state path: /C/Users/████.█████/AppData/Roaming/Sublime Text 3/Local
zip path: /C/Program Files/Sublime Text 3/Packages
zip path: /C/Users/████.█████/AppData/Roaming/Sublime Text 3/Installed Packages
ignored_packages: ["Vintage"]
pre session restore time: 0.155425
startup time: 0.222425
first paint time: 0.228426
reloading plugin Default.arithmetic
reloading plugin Default.auto_indent_tag
reloading plugin Default.block
reloading plugin Default.colors
reloading plugin Default.comment
reloading plugin Default.convert_color_scheme
reloading plugin Default.convert_syntax
reloading plugin Default.copy_path
reloading plugin Default.detect_indentation
reloading plugin Default.echo
reloading plugin Default.exec
reloading plugin Default.fold
reloading plugin Default.font
reloading plugin Default.goto_line
reloading plugin Default.history_list
reloading plugin Default.indentation
reloading plugin Default.install_package_control
reloading plugin Default.kill_ring
reloading plugin Default.mark
reloading plugin Default.new_templates
reloading plugin Default.open_context_url
reloading plugin Default.open_in_browser
reloading plugin Default.pane
reloading plugin Default.paragraph
reloading plugin Default.paste_from_history
reloading plugin Default.profile
reloading plugin Default.quick_panel
reloading plugin Default.rename
reloading plugin Default.run_syntax_tests
reloading plugin Default.save_on_focus_lost
reloading plugin Default.scroll
reloading plugin Default.set_unsaved_view_name
reloading plugin Default.settings
reloading plugin Default.show_scope_name
reloading plugin Default.side_bar
reloading plugin Default.sort
reloading plugin Default.switch_file
reloading plugin Default.symbol
reloading plugin Default.transform
reloading plugin Default.transpose
reloading plugin Default.ui
reloading plugin CSS.css_completions
reloading plugin Diff.diff
reloading plugin HTML.encode_html_entities
reloading plugin HTML.html_completions
reloading plugin ShellScript.ShellScript
reloading plugin OrgExtended.asettings
reloading plugin OrgExtended.beancount
reloading plugin OrgExtended.orgagenda
reloading plugin OrgExtended.orgbuiltinresources
reloading plugin OrgExtended.orgcapture
reloading plugin OrgExtended.orgcheckbox
reloading plugin OrgExtended.orgclocking
reloading plugin OrgExtended.orgdatepicker
reloading plugin OrgExtended.orgdaypage
reloading plugin OrgExtended.orgdb
reloading plugin OrgExtended.orgduration
reloading plugin OrgExtended.orgdwim
SETTINGS IS NULL? IS THIS BEING CALLED BEFORE PLUGIN START?
reloading plugin OrgExtended.orgdynamicblock
reloading plugin OrgExtended.orgediting
reloading plugin OrgExtended.orgexporter
reloading plugin OrgExtended.orgextended
reloading plugin OrgExtended.orgextension
reloading plugin OrgExtended.orgfolding
reloading plugin OrgExtended.orghtml
reloading plugin OrgExtended.orghtmlexporter
reloading plugin OrgExtended.orginsertselected
reloading plugin OrgExtended.orginternalediting
reloading plugin OrgExtended.orginternalhelpers
reloading plugin OrgExtended.orglatex
reloading plugin OrgExtended.orglinks
reloading plugin OrgExtended.orglist
reloading plugin OrgExtended.orgmouse
reloading plugin OrgExtended.orgnavigation
reloading plugin OrgExtended.orgneovi
reloading plugin OrgExtended.orgnotifications
reloading plugin OrgExtended.orgnumberedlist
reloading plugin OrgExtended.orgpandoc
reloading plugin OrgExtended.orgplist
reloading plugin OrgExtended.orgproperties
reloading plugin OrgExtended.orgreadtheorg
reloading plugin OrgExtended.orgrevealjs
reloading plugin OrgExtended.orgsourceblock
reloading plugin OrgExtended.orgswiper
reloading plugin OrgExtended.orgtableformula
reloading plugin OrgExtended.orgtableplot
reloading plugin OrgExtended.orgtimechart
reloading plugin OrgExtended.orgtrello
Install the Trello Package to add trello support to OrgExtended for SublimeText 
  >> No module named 'Trello'
reloading plugin OrgExtended.orguniqueview
reloading plugin OrgExtended.orgunittests
reloading plugin OrgExtended.orgxmlthemeparser
reloading plugin OrgExtended.packagecon
reloading plugin OrgExtended.pymitter
reloading plugin OrgExtended.simple_eval
reloading plugin Package Control.plugin
reloading plugin Table Editor.table_base
reloading plugin Table Editor.table_border_syntax
reloading plugin Table Editor.table_emacs_org_mode_syntax
reloading plugin Table Editor.table_lib
reloading plugin Table Editor.table_lib_test
reloading plugin Table Editor.table_line_parser
reloading plugin Table Editor.table_multi_markdown_syntax
reloading plugin Table Editor.table_pandoc_syntax
reloading plugin Table Editor.table_plugin
reloading plugin Table Editor.table_plugin_test
reloading plugin Table Editor.table_re_structured_text_syntax
reloading plugin Table Editor.table_simple_syntax
reloading plugin Table Editor.table_textile_syntax
reloading plugin Table Editor.widechar_support
plugins loaded
Package Control: Skipping automatic upgrade, last run at 2024-02-28 12:18:35, next run at 2024-02-28 20:18:35 or after

Additional context Add any other context about the problem here.

ihdavids commented 2 months ago

I am not sure I understand. That looks right? Can you elaborate?

image
r4dian commented 2 months ago

Well that's not the result I get - e.g. in my initial screenshot the event at 17:30 appears before the event at 17:00.

ihdavids commented 2 months ago

Let me clarify.

I fully believe you there is an issue here. The code in question is crap, hacked together one afternoon because I wanted some kind of overlap view. So I fully expect you have found something worth fixing here.

I just can't figure out from your image what exactly is wrong and need help duplicating the issue. A repro case would really help me get to the bottom of what you are experiencing.

More context like what do your settings look like? What do the TODOs in question look like? Anything that can help me trigger this properly.

ihdavids commented 2 months ago

Is this roughly the idea? I think I managed to duplicate it after some more fiddling. I think I just needed a bit more sub hour overlap.

image
ihdavids commented 2 months ago

Okay, I hope I got it. A fix will be in 1.2.54 once I release it.