Giter Club home page Giter Club logo

Comments (5)

llcc avatar llcc commented on June 8, 2024

@dnordgren Thanks for using org-logseq.
Could you please check the result of the following cmd? Please replace your logseq dir to your real logseq path.

when I add in the "%s" part of the query,

Do you mean the same thing as below?

grep -niR "^#+\\(TITLE\\): *Apr 4th, 2021" "your logseq dir" --exclude-dir=".git"

There might be some unexpected behaviors on MacOS compared to other systems. I don't have one, so I cannot check it for you.

from org-logseq.

dnordgren avatar dnordgren commented on June 8, 2024

I think I've found it!

I've changed these lines:

org-logseq/org-logseq.el

Lines 82 to 83 in feba4fd

('page "grep -niR \"^#+\\(TITLE\\): *%s\" \"%s\" --exclude-dir=\".git\"" )
('id "grep -niR \":id: *%s\" \"%s\" --exclude-dir=\".git\""))

to

        ('page "grep -niR \"^#+\\(TITLE\\): *%s\" %s --exclude-dir=.git")
        ('id "grep -niR \":id: *%s\" %s --exclude-dir=.git"))

(removing " around .git and the second %s for grep FILE)

it's working great locally now! Could be macOS specific.

--

This package is great, thank you for your contribution!

from org-logseq.

llcc avatar llcc commented on June 8, 2024

Hi @dnordgren, So happy that you solved the problem. Then this should be a space-escape issue. I will fix it in the next version.

But I wonder that space is not permitted in the macOS file path? Since if any space exists in the path, the path should be quoted, or it will be treated as multiple arguments by grep.

from org-logseq.

llcc avatar llcc commented on June 8, 2024

This should be fixed by the following code. Could you please give it a try?

org-logseq/org-logseq.el

Lines 83 to 86 in b5cdf8b

(format (pcase type
('page "grep -niR \"^#+\\(TITLE\\|ALIAS\\): *%s\" %s --exclude-dir=.git" )
('id "grep -niR \":id: *%s\" %s --exclude-dir=.git"))
query (shell-quote-argument org-logseq-dir))))

from org-logseq.

lyserenity avatar lyserenity commented on June 8, 2024

This should be fixed by the following code. Could you please give it a try?

org-logseq/org-logseq.el

Lines 83 to 86 in b5cdf8b

(format (pcase type
('page "grep -niR \"^#+\\(TITLE\\|ALIAS\\): *%s\" %s --exclude-dir=.git" )
('id "grep -niR \":id: *%s\" %s --exclude-dir=.git"))
query (shell-quote-argument org-logseq-dir))))

I had tested the code on my Mac. And the line 86 would probably be changed to (shell-quote-argument (expand-file-name org-logseq-dir)).

from org-logseq.

Related Issues (4)

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.