Giter Club home page Giter Club logo

Comments (7)

pprevos avatar pprevos commented on June 11, 2024 1

I'll have to read the Denote manual how it treats subdirs, It is certainly feasible, Only two functions in citar-denote are directory-specific.

from citar-denote.

pprevos avatar pprevos commented on June 11, 2024 1

Excellent - I have pushed this version.

from citar-denote.

pprevos avatar pprevos commented on June 11, 2024

Hi Colin, I am about release a new version (which allows multiple notes per entry and multiple entries per note), so I am happy to weave this in as well.

What is the denote-subdir variable?

from citar-denote.

pprevos avatar pprevos commented on June 11, 2024

Another question. I don't use subdirectories so cannot test your suggestion.

When you use multiple folders, does the denote-directory-files-matching-regexp function list all notes in all folders? I use this function to check for reference keys.

from citar-denote.

mclearc avatar mclearc commented on June 11, 2024

What is the denote-subdir variable?

That was just a dummy variable for the sample function I gave above. I figure since not everyone uses subdirs better to have the option to not show the subdir prompt.

When you use multiple folders, does the denote-directory-files-matching-regexp function list all notes in all folders?

As far as I can tell it does. I haven't tested it extensively but it picks up the references that are properly formatted in my refs-dir subdirectory.

from citar-denote.

pprevos avatar pprevos commented on June 11, 2024

I think it is as easy as you indicated. I added:

(defcustom citar-denote-subdir 't
  "Ask for a subdirectory when creating a new bibliographic note.")

And changed the creation function as suggested:

(defun citar-denote-create-note (key &optional _entry)
  "Create a bibliography note for `KEY' with properties `ENTRY'.

The file type for the note to be created is determined by `denote-file-type'.
When `citar-denote-subdir' is non-nil, prompt for a subdirectory."
  (denote
   (read-string "Title: " (citar-get-value "title" key))
   (citar-denote-keywords-prompt)
   citar-denote-file-type
   (when citar-denote-subdir (denote-subdirectory-prompt)))
  (citar-denote-add-reference key citar-denote-file-type))

Can you test and confirm that this is what you need? If so, then I will commit the new version.

from citar-denote.

mclearc avatar mclearc commented on June 11, 2024

Yes -- that works well! Thanks!

from citar-denote.

Related Issues (13)

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.