Regluke Posted November 18, 2020 Share Posted November 18, 2020 I haven't had any issues using this Alfred workflow to search Notes on Big Sur Link to comment
sballin Posted November 18, 2020 Author Share Posted November 18, 2020 I was talking about the notes:// links you get from doing the alt-enter action on results. If you don't use that feature, everything else should be working as usual. funkymonkey 1 Link to comment
Regluke Posted November 18, 2020 Share Posted November 18, 2020 Oh my mistake! Sorry about that. Link to comment
jarrodjob Posted February 19, 2021 Share Posted February 19, 2021 I would just like to say what a GODSEND this is for my workflow. This + Clipboard History for searching icloud link names = insane reference. That simple. Love from Seattle. -Jarrod sballin 1 Link to comment
buraktuyan Posted March 18, 2021 Share Posted March 18, 2021 Hi @sballin, thanks for this brilliant workflow. It's indeed godsend. However, I can't use the body search (nb) because I'm getting this security issue (and "Security & Preferences" pane doesn't show the "Allow" option (because I've already allowed it and can use title search and folder search). The error_log shows this: panic: runtime error: slice bounds out of range [104:100] goroutine 1 [running]: main.BuildSubtitleAddition(0xc00002240a, 0x68, 0xc000026070, 0x64, 0x208af58ea, 0x1, 0x64, 0xc000022500) /Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search_notes/main.go:216 +0x2d4 main.LiteDB.GetResults(0xc000242000, 0x208af58ea, 0x1, 0x208af58e5, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0) /Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search_notes/main.go:317 +0xd51 main.main() /Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search_notes/main.go:403 +0x138 touch: Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.ED7FF581-A6D4-467A-9095-7248E1201713/update.py: No such file or directory touch: Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.ED7FF581-A6D4-467A-9095-7248E1201713/update.py: No such file or directory panic: runtime error: slice bounds out of range [104:100] goroutine 1 [running]: main.BuildSubtitleAddition(0xc00002248a, 0x68, 0xc000026070, 0x64, 0x208b558ea, 0x1, 0x64, 0xc000022580) /Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search_notes/main.go:216 +0x2d4 main.LiteDB.GetResults(0xc000242000, 0x208b558ea, 0x1, 0x208b558e5, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0) /Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search_notes/main.go:317 +0xd51 main.main() /Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search_notes/main.go:403 +0x138 Despite trying the spctl --master-disable method and giving Alfred 4.app and search_notes binary almost all privacy privileges, I can't seem to get the search body function work. Any solutions would be much appreciated. Thanks! 🙂 Link to comment
jxxst Posted March 18, 2021 Share Posted March 18, 2021 (edited) As I moved away from Evernote, I'm now keeping all my files/attachments/searchable pdfs in iCloud Drive and I'm using Notes as my main note taking app. I'm very keen with my current setup and this workflow is tremendously helpful - literally a godsend! - after the new Evernote apps broke my entire workflow (neither the Alfred extension nor spotlight worked anymore to search/action notes). I have one question regarding this workflow - how could I modify it to have the note open in a separate window after the search - without the sidebar? It currently opens the note in the "list view" and I have to double-click on the note to open it in a separate window. Any way to setup another modifier key (e.g. using ⌘+Enter after searching) so it opens directly the specific note? Edited March 20, 2021 by jxxst typo Link to comment
sballin Posted March 18, 2021 Author Share Posted March 18, 2021 4 hours ago, jxxst said: I have one question regarding this workflow - how could I modify it to have the note open in a separate window after the search - without the sidebar? Is currently opens the note in the "list view" and I have to double-click on the note to open it in a separate window. Any way to setup another modifier key (e.g. using ⌘+Enter after searching) so it opens directly the specific note? You could create a new "Run NSAppleScript" action with the following code: on alfred_script(q) tell application "Notes" -- Show user requested note -- Get note id which is first item in q set noteID to text 1 thru ((offset of "?" in q)-1) of q show note id noteID in default account show note id noteID in default account -- Click menu Window -> Float Selected Note tell application "System Events" to tell process "Notes" to click menu item 11 of menu 7 of menu bar 1 end tell end alfred_script jxxst and buraktuyan 1 1 Link to comment
sballin Posted March 18, 2021 Author Share Posted March 18, 2021 (edited) 14 hours ago, buraktuyan said: However, I can't use the body search (nb) because I'm getting this security issue (and "Security & Preferences" pane doesn't show the "Allow" option (because I've already allowed it and can use title search and folder search). Thanks for reporting this issue. I don't think it's security related, that error message is always the same because it's the most common problem users face. I think it's because of certain characters like i/İ having different byte length depending whether they are uppercase or lowercase, and the workflow converts notes to lowercase when searching. I'll work on a fix... Edited March 18, 2021 by sballin Link to comment
buraktuyan Posted March 18, 2021 Share Posted March 18, 2021 4 minutes ago, sballin said: Thanks for reporting this issue. I don't think it's security related, that error message is always the same because it's the most common problem users face. I think it's because of certain characters like i/İ having different byte length depending whether they are uppercase or lowercase, and the workflow converts notes to lowercase when searching. I'll work on a fix... Actually, I resolved the issue on my end by removing the error handling code for the "Search note bodies" function: When I start searching for note bodies, Alfred shows the default fallback options for a second or two (and no icons/options for this workflow) but then your workflow starts showing the results for the note body search. When there's error handling, this transition triggers the error message above. Link to comment
sballin Posted March 18, 2021 Author Share Posted March 18, 2021 12 minutes ago, buraktuyan said: Actually, I resolved the issue on my end by removing the error handling code for the "Search note bodies" function Weird! I'll have to think about this. I was able to reproduce your error message with a note containing "İ" but removing the error handling didn't fix things for me. Link to comment
buraktuyan Posted March 18, 2021 Share Posted March 18, 2021 5 minutes ago, sballin said: Weird! I'll have to think about this. I was able to reproduce your error message with a note containing "İ" but removing the error handling didn't fix things for me. I just ran a test with a note containing "İ" in it, and the nb search couldn't list it in the results. However it didn't throw an error message either. As a note, some of my notes had characters like İ or Ş in them, that was probably the core reason why I was getting this error in the first place. Link to comment
sballin Posted March 19, 2021 Author Share Posted March 19, 2021 7 hours ago, buraktuyan said: I just ran a test with a note containing "İ" in it, and the nb search couldn't list it in the results. However it didn't throw an error message either. As a note, some of my notes had characters like İ or Ş in them, that was probably the core reason why I was getting this error in the first place. Here is a pre-release version where characters like that should be handled properly: https://github.com/sballin/alfred-search-notes-app/files/6168245/Search.Notes.zip Let me know if you encounter any issues! buraktuyan 1 Link to comment
buraktuyan Posted March 19, 2021 Share Posted March 19, 2021 8 hours ago, sballin said: Here is a pre-release version where characters like that should be handled properly: https://github.com/sballin/alfred-search-notes-app/files/6168245/Search.Notes.zip Let me know if you encounter any issues! It works great for me without any issues and without any manual changes to the code. Thanks a LOT! 🙂👍 And I liked the new fallbackCreateNew and fallbackSearchBodies functions -- the second one already made my life easier. 👌 sballin and cands 2 Link to comment
sballin Posted March 22, 2021 Author Share Posted March 22, 2021 (edited) Version 3.3.0 is released! New features: Choose between creating a new note or searching note bodies when no note with a matching title is found (set your preference in environment variables) Better support for accented characters Paste note links quickly using a snippet shortcut Edited March 22, 2021 by sballin Link to comment
qe3 Posted March 24, 2021 Share Posted March 24, 2021 Hi everyone -- longtime Alfred user, new to this workflow. I'm on latest Big Sur (11.2.3) and I can't get past the "Allow Anyway" part of the installation. I click Allow Anyway, it disappears, I call up Alfred, and it starts all over again. Any suggestions? Thank you! Link to comment
sballin Posted March 24, 2021 Author Share Posted March 24, 2021 15 minutes ago, qe3 said: Hi everyone -- longtime Alfred user, new to this workflow. I'm on latest Big Sur (11.2.3) and I can't get past the "Allow Anyway" part of the installation. I click Allow Anyway, it disappears, I call up Alfred, and it starts all over again. Any suggestions? Thank you! In the security pref pane, do you have "Allow apps downloaded from" set to "App Store and identified developers?" Does anything show up in the error log or alfred debug log when you try to open it? Link to comment
qe3 Posted March 24, 2021 Share Posted March 24, 2021 1 hour ago, sballin said: In the security pref pane, do you have "Allow apps downloaded from" set to "App Store and identified developers?" Does anything show up in the error log or alfred debug log when you try to open it? Yes to #1. Image attached. No to #2. See attached after 10-15 attempts to follow the directions. Link to comment
sballin Posted March 24, 2021 Author Share Posted March 24, 2021 35 minutes ago, qe3 said: Yes to #1. Image attached. No to #2. See attached after 10-15 attempts to follow the directions. Weird... here are a couple more things you can try: 1. Locate the binary in (workflow directory)/search_notes, it's the file named search_notes. Right click the binary and press Open (don't do anything else like double click, cmd-down, etc). This is supposed to be equivalent to "Allow Anyway" 2. Try running the binary in the terminal (cd to search_notes directory and do ./search_notes) 3. If neither of the above work, try restarting your computer, or doing 1/2 on a different computer... Link to comment
bcometa Posted May 12, 2021 Share Posted May 12, 2021 Thanks for this great workflow! It's caused me to migrate from Evernote to Notes. To that end, is it possible to add "add to note" as a file selection action? So I can select a file in Finder and add to note or make new note and include it as attachment? TY! Link to comment
jarrodjob Posted May 20, 2021 Share Posted May 20, 2021 When I type "n"+"<space>" and start typing I get search results ABOVE note results. The desired state is ONLY notes. Any help on how to stop that from happening? -Jarrod Link to comment
sballin Posted May 21, 2021 Author Share Posted May 21, 2021 Do you have "n" set as the keyword for "Opening Files" in Alfred Preferences > Features > File Search? jarrodjob 1 Link to comment
deanishe Posted May 21, 2021 Share Posted May 21, 2021 (edited) 10 hours ago, jarrodjob said: When I type "n"+"<space>" and start typing I get search results ABOVE note results. The desired state is ONLY notes. Then you need to not use a keyword that matches loads of other search results. When you open Alfred and start typing, you are performing a regular Alfred search. If the query matches a workflow's keyword, that will also be run, and its results will be integrated with those from the regular search. If you want to run only the workflow, you have to "enter" it by actioning it in Alfred's search results (or using a Hotkey). So to ensure you only get results from one workflow while you’re in Alfred’s main search mode, you need to pick a keyword that won’t match any other stuff. Prefixing your keyword with . usually works well, i.e. use .n, not n, and your query probably won’t match anything but the workflow keyword. Edited May 21, 2021 by deanishe jarrodjob 1 Link to comment
jarrodjob Posted June 1, 2021 Share Posted June 1, 2021 On 5/21/2021 at 2:19 AM, deanishe said: Then you need to not use a keyword that matches loads of other search results. When you open Alfred and start typing, you are performing a regular Alfred search. If the query matches a workflow's keyword, that will also be run, and its results will be integrated with those from the regular search. If you want to run only the workflow, you have to "enter" it by actioning it in Alfred's search results (or using a Hotkey). So to ensure you only get results from one workflow while you’re in Alfred’s main search mode, you need to pick a keyword that won’t match any other stuff. Prefixing your keyword with . usually works well, i.e. use .n, not n, and your query probably won’t match anything but the workflow keyword. THANK YOU @deanishe and @sballin. Really appreciate the lift here. Exactly what I needed, and it does make sense to have it be this way. -JJ Link to comment
metafizikal Posted July 1, 2021 Share Posted July 1, 2021 Hi, I'm getting the error of permissions, and there is no change if I try to manually run the search_notes executable from terminal or from Finder, and System Preferences is not giving me any option to run the executable. This appears to have broken as of upgrading to Big Sur 11.4, but I can't confirm that 100%. That said, it looks like there is a permission issue on the database? From the error log at the above prompt: panic: unable to open database file: operation not permitted goroutine 1 [running]: main.PanicOnErr(...) github.com/sballin/alfred-search-notes-app/main.go:394 main.main() github.com/sballin/alfred-search-notes-app/main.go:407 +0x789 panic: unable to open database file: operation not permitted Any ideas? Thank you for such a great workflow!! Link to comment
sballin Posted July 1, 2021 Author Share Posted July 1, 2021 1 hour ago, metafizikal said: Hi, I'm getting the error of permissions... Sounds like Alfred may not have full disk access, something similar happened to another user after upgrading to 11.4: https://github.com/sballin/alfred-search-notes-app/issues/43#issuecomment-867308050 Here are what the permissions should look like: https://github.com/sballin/alfred-search-notes-app#required-permissions Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now