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

Make it easier to find .org files in file picker #18

Open
amake opened this issue Jul 19, 2020 · 5 comments
Open

Make it easier to find .org files in file picker #18

amake opened this issue Jul 19, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@amake
Copy link
Owner

amake commented Jul 19, 2020

Per report: https://reddit.com/r/orgmode/comments/hthpd3/_/fyis69p/?context=1

First see about filtering file picker to just show .org files.

@amake amake added the enhancement New feature or request label Jul 19, 2020
@amake
Copy link
Owner Author

amake commented Jul 19, 2020

On iOS, specifying my custom UTI for org-mode files when calling UIDocumentPickerViewController.init(documentTypes:in:) does work to show only org-mode files as selectable. However Google Drive appears to be buggy and will show everything as unselectable:
https://support.google.com/drive/thread/18725542?hl=en&msgid=18725542
https://support.google.com/drive/thread/38729289?hl=en&msgid=38729289

Since my main syncing method is Google Drive, this is a blocker for me 😞

@amake amake changed the title It can be difficult to find .org files in file picker Make it easier to find .org files in file picker Jul 20, 2020
@amake
Copy link
Owner Author

amake commented Jul 20, 2020

On iOS I tried:

  • Setting a custom icon for the org-mode doc UTI. It turns out the system knows that the files are plain text, so it always shows a preview of the content instead of an icon. I can't find a way to disable the preview and show an icon instead.
  • Claiming that the org-mode doc UTI conforms to public.data instead of public.plain-text. This seems to force the file picker to show the .org file extension.
  • Setting -[UIDocumentPickerViewController shouldShowFileExtensions] to true. This didn't seem to have any effect.

amake added a commit that referenced this issue Jul 20, 2020
@RyanGreenup
Copy link

If you could atleast see the .org extension that would be a massive improvement. Then you could just search for org.

Being able to select multiple files would then mean you only have to go through it once.

@amake
Copy link
Owner Author

amake commented Jul 22, 2020

The next version (pending review; may be on TestFlight soon) will show the file extensions. But in my testing the file picker's search doesn't find file extensions :(

@RyanGreenup
Copy link

RyanGreenup commented Aug 29, 2020

So in case it helps anybody else, this is how I worked around this.

I have my org files under VC with git and I just created a seperate branch with only .org files:

cd ~/Notes/Org  # or wherever your org files are

# Make a new branch
git checkout -b orgro

# Delete everything else
find ./ -type f ! -name '*.org' -delete
find ./ -type d -exec rm -r {} \;

# On this branch, in this directory, only track .org files
echo '
# https://stackoverflow.com/a/987162/12843551 
# Ignore everything
*

# But not these files...
!.gitignore
!*.org

# ...even if they are in subdirectories
!*/' > .gitignore


git add -A; git commit

The idea is is to checkout the orgro branch, wait for Dropbox to sync, access the files on the iPad so they'll be saved and then git checkout master.

This would also work very well with WorkingCopy file sync on iOS (presumably a similar tool exists on Android).

If I create new org files the idea is to:

cd ~/Notes/Org
git checkout orgro
git merge master
# Now Add the files to the ipad through Dropbox
git checkout master

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
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants