Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LOGBOOK drawers not parsed correctly #30

Closed
psamim opened this issue Jan 29, 2021 · 8 comments
Closed

LOGBOOK drawers not parsed correctly #30

psamim opened this issue Jan 29, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@psamim
Copy link

psamim commented Jan 29, 2021

Hi,

The PROPERTIES drawer are displayed nicely but It would be great if Orgro could display other drawers, such as LOGBOOK the same.

Thanks for great piece of software
Screenshot_20210130-002710_Orgro

@amake
Copy link
Owner

amake commented Jan 30, 2021

I think I only supported :PROPERTIES: because actually the opening token can be anything matching :\S+: and I was worried about the cost.

But I will see about doing it right.

@amake
Copy link
Owner

amake commented Jan 30, 2021

Actually it should support any opening token:

https://github.com/amake/org_parser/blob/2d7b04fe5d7744d7e7b295a35007bad48894f3a8/lib/src/grammar.dart#L530-L536

I'm not sure why your example isn't parsed right. Can you provide a raw snippet so I can test?

@psamim
Copy link
Author

psamim commented Jan 30, 2021

Sure,

* Other
** Checking emails
:LOGBOOK:
CLOCK: [2021-01-23 Sat 09:30]--[2021-01-23 Sat 10:19] =>  0:49
CLOCK: [2021-01-11 Mon 21:31]--[2021-01-11 Mon 21:50] =>  0:19
CLOCK: [2021-01-02 Sat 18:46]--[2021-01-02 Sat 19:36] =>  0:50
:END:

@amake
Copy link
Owner

amake commented Feb 1, 2021

There are two layers to this:

  1. Due to a dumb mistake, plain paragraphs inside a drawer (as opposed to properties like :foo: bar) were causing parsing of the drawer to fail. I've fixed that in amake/org_parser@10c45e1.
  2. Next the problem is that the CLOCK: lines are treated as regular text paragraphs, which means they get reflowed and smooshed together. I've opened Support clock and planning lines org_parser#2 to deal with this.

amake added a commit that referenced this issue Feb 16, 2021
Fixes handling of drawer content, planning/clock lines

See #30
@amake
Copy link
Owner

amake commented Feb 17, 2021

I've fixed this issue in v1.14.0. Test builds will be available shortly:

@psamim
Copy link
Author

psamim commented Feb 18, 2021

Thanks! I'll test as soon as the new version is published on FDroid.

@amake
Copy link
Owner

amake commented Feb 22, 2021

v1.14.0 is now available in F-Droid.

@psamim
Copy link
Author

psamim commented Feb 22, 2021 via email

@psamim psamim closed this as completed Feb 22, 2021
@amake amake changed the title LOGBOOK drawers LOGBOOK drawers not parsed correctly Feb 25, 2021
@amake amake added the bug Something isn't working label Feb 25, 2021
amake added a commit that referenced this issue Oct 28, 2022
```
══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY ╞═════════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
Layer OffsetEngineLayer was previously used as oldLayer.
Once a layer is used as oldLayer, it may not be used again. Instead, after calling one of the
SceneBuilder.push* methods and passing an oldLayer to it, use the layer returned by the method as
oldLayer in subsequent frames.
'dart:ui/compositing.dart':
Failed assertion: line 110 pos 9: '<optimized out>'

Either the assertion indicates an error in the framework itself, or we should provide substantially
more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=2_bug.md

When the exception was thrown, this was the stack:
#2      _EngineLayerWrapper._debugCheckNotUsedAsOldLayer (dart:ui/compositing.dart:110:9)
#3      SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:695:21)
#4      List.forEach (dart:core-patch/growable_array.dart:416:8)
#5      SceneBuilder.addRetained.<anonymous closure>.recursivelyCheckChildrenUsedOnce (dart:ui/compositing.dart:701:18)
#6      SceneBuilder.addRetained.<anonymous closure> (dart:ui/compositing.dart:704:7)
#7      SceneBuilder.addRetained (dart:ui/compositing.dart:707:6)
#8      Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:671:15)
#9      ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#10     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#11     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#12     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#13     ClipRectLayer.addToScene (package:flutter/src/rendering/layer.dart:1590:5)
#14     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#15     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#16     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#17     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#18     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#19     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#20     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#21     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#22     OffsetLayer.addToScene (package:flutter/src/rendering/layer.dart:1421:5)
#23     Layer._addToSceneWithRetainedRendering (package:flutter/src/rendering/layer.dart:674:5)
#24     ContainerLayer.addChildrenToScene (package:flutter/src/rendering/layer.dart:1284:13)
#25     TransformLayer.addToScene (package:flutter/src/rendering/layer.dart:1914:5)
#26     ContainerLayer.buildScene (package:flutter/src/rendering/layer.dart:1097:5)
#27     RenderView.compositeFrame (package:flutter/src/rendering/view.dart:231:37)
#28     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:514:18)
#29     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:869:13)
#30     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:375:5)
#31     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1271:15)
#32     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1200:9)
#33     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1058:5)
#34     _invoke (dart:ui/hooks.dart:145:13)
#35     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:338:5)
#36     _drawFrame (dart:ui/hooks.dart:112:31)
(elided 2 frames from class _AssertionError)
════════════════════════════════════════════════════════════════════════════════════════════════════
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants