Code Monkey home page Code Monkey logo

Comments (6)

jrblevin avatar jrblevin commented on July 17, 2024 4

Can you try configuring it like this and let me know if it works?

(use-package deft
  :bind ("C-<f12>" . deft)
  :init (setq deft-directory "~/Dropbox/Oleg/Org/"
              deft-text-mode 'org-mode
              deft-extensions '("org")
              deft-recursive t
              deft-new-file-format "%Y-%m-%dT%H%M"))

Otherwise, you can try setting deft-default-extension directly. It will default to the first value in deft-extensions, but for it to work that way the extensions list needs to be set before loading the package.

from deft.

olegbc1 avatar olegbc1 commented on July 17, 2024

@jrblevin your code worked - thanks! Do you know why this was better?

from deft.

jrblevin avatar jrblevin commented on July 17, 2024

Glad it worked!

With use-package, :init evaluates the code before the package is loaded, so then when deft chooses the first element of deft-extensions, it's your custom list not the package default list (which begins with "txt").

from deft.

olegbc1 avatar olegbc1 commented on July 17, 2024

Thanks! Just to clarify - shouldn't (setq deft-extensions '("org")) declared after (use-package deft) just override the the package defaults?

from deft.

jrblevin avatar jrblevin commented on July 17, 2024

The code in the package works like this:

(defcustom deft-extensions '("txt" "text" "md" "markdown" "org"))
(defvar deft-default-extension (car deft-extensions))

So, for better or worse, deft-default-extension is currently defined relative to the value of deft-extensions at package load time. Perhaps I should use a function instead, so that the default extensions can change dynamically.

from deft.

olegbc1 avatar olegbc1 commented on July 17, 2024

Got it, thanks! I'll flag this issue as closed.
Thanks for your work on these packages - deft, your themes and markdown mode are unbelievably useful!

from deft.

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.