Code Monkey home page Code Monkey logo

Comments (15)

drgrib avatar drgrib commented on August 20, 2024 1

Sure thing. I can't guarantee when I would be able to work on this but that is a reasonable solution for eliminating ambiguity.

from alfred-bear.

drgrib avatar drgrib commented on August 20, 2024 1

Implemented in #60

from alfred-bear.

argwallace avatar argwallace commented on August 20, 2024 1

Thank you!!!

from alfred-bear.

Markhenn avatar Markhenn commented on August 20, 2024 1

Implemented in #60

Thank you very much! It is working on my end!

from alfred-bear.

argwallace avatar argwallace commented on August 20, 2024 1

I understand. I'll review my naming convention. Thanks for your time!

from alfred-bear.

drgrib avatar drgrib commented on August 20, 2024

This is by design. I.e. in parsing an ambiguous query like #word1 word2 as #tag-word1 tag-word2 or #tag-word query-word, the workflow defaults to the latter.

I'll add that Bear itself doesn't seem particularly friendly to spaced tag names. E.g. there is no clear way to author one on the fly in a note as far as I can tell.

Unfortunately, I don't see a good resolution but I am open to suggestions.

from alfred-bear.

Markhenn avatar Markhenn commented on August 20, 2024

Would be able implement the same trick that bear uses in their multitag search?

In bear I need to have the pound sign # at the beginning and the end of the search term to show that it is a multiword tag.

I guess you are using regex to parse the text. I have no idea how you set it up, but the following regex selects everything between the first and the second pound sign (including the pound signs).

/(#.*?\b#)/g

Maybe this will help.

from alfred-bear.

Markhenn avatar Markhenn commented on August 20, 2024

All cool!

I had a look into the core file and it seems more complicated than changing a regex.

I'd be happy if you would have a chance to work on it.

from alfred-bear.

argwallace avatar argwallace commented on August 20, 2024

It would be great if we could get this to work. I just installed this workflow on Bear 2 and since all of my hierarchy tags have a space in them, I can't search for any tag. Thanks for taking a look!

from alfred-bear.

argwallace avatar argwallace commented on August 20, 2024

It is working as advertised. I know my setup may be a little different. One of my tags inlcudes a last name and first name separate by a comma ,. For example #tag/multi word/lastname, firstname#. In this case, I noticed that the debugging in Alfred showed me that it stopped at lastname. In other words, it seems the comma is being interpreted as a break EVEN THOUGH in my list of hits inside Alfred, it is showing the tag correctly. When I hit enter, it loads the tag correctly but when I perform the search in Bear with that tag, it doesn't work in THIS scenario. Other scenarios it is working just fine. Any ideas? Thanks.

from alfred-bear.

drgrib avatar drgrib commented on August 20, 2024

I'm having trouble following what you are saying isn't working about it. When I try in a test it parses fine:

		{
			name: "multiword tag with comma",
			arg:  "#tag/multi word/lastname, firstname#",
			expected: core.Query{
				Tokens:     []string{"#tag/multi", "word/lastname,", "firstname#"},
				Tags:       []string{"#tag/multi word/lastname, firstname#"},
				LastToken:  "firstname#",
				WordString: "",
			},
		},

So what doesn't work?

from alfred-bear.

argwallace avatar argwallace commented on August 20, 2024

Let me see if I can provide more details...

When I enter this text... bs #multi/word search... I can see the multi word tag in the list (i.e.) "#multi/word search#. If I click on "enter/return" it places that full text into the search window. I see a list of all search results that use that tag. So, this is working. Is it possible to go to that tag in Bear? When I hold down the option key, it does say "Search query in Bear" but nothing happens. If I do the same with the search results list, it DOES take me to the select note just fine. So, that too is working. I guess my question is... is it possible to do a search on the tag or go to the related tag in Bear? That way it would bring that tag into focus and I could continue in Bear at that moment. Hopefully, this helps to understand the scenario. I do appreciate your work!

from alfred-bear.

drgrib avatar drgrib commented on August 20, 2024

Please post a screen recording of your issue (you can use QuickTime Player with File->New Screen Recording). Everything I test, including "Search query in Bear" works for multiword tags on my end.

from alfred-bear.

argwallace avatar argwallace commented on August 20, 2024

I could make a video but I think I have found that when there is an & (ampersand) in the tag name, it fails. I have searched for other tags and they all work just fine. But a multi-word tag that happens to have & seems to fail. Can you confirm? Thanks.

from alfred-bear.

drgrib avatar drgrib commented on August 20, 2024

I can confirm that using & in title names causes some strange behavior, likely because it is difficult to translate into the command URLs. I'm unlikely to go through the hassle of adding support for unusual character uses in tags as it seems like a lot of effort for a very unusual use case.

from alfred-bear.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.