Coder Social home page Coder Social logo

Comments (6)

sunnyrahul25 avatar sunnyrahul25 commented on June 8, 2024 1

@rotlaus Thank for sharing your config.
I got only title to show in new zettle However the filename created '2020-04-17-1624 true.org' has a space as separator between title and date.
If I use
(setq deft-file-naming-rules '( (noslash . "-")(nospace . "_") )))
then the title contains the date as well.
Is there a way to remove space as well.

from zetteldeft.

rotlaus avatar rotlaus commented on June 8, 2024

Setting the deft-file-naming-rules back to default fixes the zetteldeft generated Title. But with zetteldeft-title-prefix set to nil and the file-templates package active it still looks like
#+TITLE: 2020 04 02 1558 Test 9

from zetteldeft.

EFLS avatar EFLS commented on June 8, 2024

Can you share your zetteldeft configuration? How do you load the package?

from zetteldeft.

rotlaus avatar rotlaus commented on June 8, 2024

It's the default doom installation. In the .doom.d/packages.el i have the package loaded with
(package! zetteldeft)

In the .doom.d/init.el i have enabled the deft package and in the .doom.d/config.el i have the default zetteldeft configuration:

(use-package deft
  :after org
  :custom
  (deft-recursive t)
  (deft-default-extension "org")
  (deft-directory "\~/pm/zettel/")
  :init
  (setq deft-file-naming-rules '( (noslash . "-") )))

(use-package! zetteldeft
  :commands (zetteldeft-new-file zetteldeft-tag-buffer zetteldeft-search-at-point zetteldeft-find-file zetteldeft-search-current-id zetteldeft-follow-link zetteldeft-avy-tag-search zetteldeft-new-file-and-link zetteldeft-file-rename zetteldeft-find-file-id-insert zetteldeft-find-file-full-title-insert zetteldeft-search-at-point zetteldeft-avy-link-search zetteldeft-avy-file-search-ace-window zetteldeft-find-file)
  :init
  (map! :leader
        :prefix ("d" . "zetteldeft")
        :desc "deft" "d" #'deft
        :desc "zetteldeft-deft-new-search" "D" #'zetteldeft-new-file
        :desc "deft-refresh" "R" #'deft-refresh
        :desc "zetteldeft-search-at-point" "s" #'zetteldeft-search-at-point
        :desc "zetteldeft-search-current-id" "c" #'zetteldeft-search-current-id
        :desc "zetteldeft-follow-link" "f" #'zetteldeft-follow-link
        :desc "zetteldeft-avy-file-search-ace-window" "F" #'zetteldeft-avy-file-search-ace-window
        :desc "zetteldeft-avy-link-search" "l" #'zetteldeft-avy-link-search
        :desc "zetteldeft-avy-tag-search" "t" #'zetteldeft-avy-tag-search
        :desc "zetteldeft-tag-buffer" "T" #'zetteldeft-tag-buffer
        :desc "zetteldeft-find-file-id-insert" "i" #'zetteldeft-find-file-id-insert
        :desc "zetteldeft-find-file-full-title-insert" "I" #'zetteldeft-find-file-full-title-insert
        :desc "zetteldeft-find-file" "o" #'zetteldeft-find-file
        :desc "zetteldeft-new-file" "n" #'zetteldeft-new-file
        :desc "zetteldeft-new-file-and-link" "N" #'zetteldeft-new-file-and-link
        :desc "zetteldeft-file-rename" "r" #'zetteldeft-file-rename
        :desc "zetteldeft-count-words" "x" #'zetteldeft-count-words
        )
  )

With the deft-file-naming-rules as above and the file-templates package disabled it works as intended.

To my shame i have to admit i never questioned the Ids in the title. I always thought that it was the way it has to be.

from zetteldeft.

EFLS avatar EFLS commented on June 8, 2024

I don't immediately see where this issue comes from. My guess is that creating a new file via the deft search bar replaces spaces with - (as per doom default), which then causes issues for the zetteldeft--lift-file-title because of the additional dashes.

Just to gather information, can you report what happens when you

  • make a new note via zetteldeft-new-file (which is SPC d n)
  • make a new note via the deft search bar

In any case, the second way of creating new zetteldeft notes is not really supported, since here deft takes over the title generation. I might have to mention this in an introductory guide or something.

from zetteldeft.

rotlaus avatar rotlaus commented on June 8, 2024

I made these test with the default doom config with the file-templates package activated and without the deft-file-naming-rules setting.

  • make a new note via zetteldeft-new-file (which is SPC d n)
#+TITLE: 2020 04 06 1509 Test 7

#+TITLE: 2020-04-06-1509-test-7

Filename: 2020-04-06-1509-test-7.org

  • make a new note via the deft search bar
#+TITLE: Test 8

Filename: test-8.org

But i wouldn't call this a bug, it's more a configuration issue. With the deft-file-naming-rules and the disabled file-templates package (or a (set-file-template! 'org-mode :ignore t) like mentioned by @neildurant in #26) and zetteldeft works like intended.

from zetteldeft.

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.