Comments (7)
There seems to be a typo in your config: nameing
should be naming
. But otherwise it looks fine to me.
To replace other characters, you could write your own function. Based on this example, you might do something like this:
(defun my-filter (str)
(replace-regexp-in-string ":" "_" str))
(setq deft-file-naming-rules '((noslash . "-")
(nospace . "-")
(case-fn . my-filter)))
You'd have to expand the my-filter
function to filter more than just :
's, but this is the basic idea.
from zetteldeft.
Hi buhtz, this issue was previously discussed here: #63
The good news is: you can configure Deft to take care of this And Zetteldeft separates filenames and file titles, so this is easily achieved. See the discussion in PR #42, where it is explained how you could use deft-file-naming-rules
to achieve what you want.
Perhaps, after you've configured your setup, you can share it here? I could add a note on this to the zd-tutorial
knowledge base, which would explain how to configure this for Windows systems' filenaming rules.
EDIT: Replaced zetteldeft-file-naming-rule
with deft-file-naming-rules
from zetteldeft.
Sorry, the Issues and PR your linked to are far above my knowledge. I do not understand them.
Without knowing what it does I tried
(setq deft-file-naming-rules
'((noslash . "-")
(nospace . "-")
(case-fn . downcase)))
No effect. There is no difference between title and resulting filename except the datestring.
$ ls
'2021-10-08-1537 äöü ß ? "test" : &.org'
'2021-10-08-1540 % $ ? ".org'
And zetteldeft-file-naming-rules
is not mentioned anywhere in the PR.
from zetteldeft.
To learn how to use this, try C-h
v
deft-file-naming-rules
to check out the Deft documentation and read up on the different possibilities.
You can also write your own function to replace specific characters in the file name strings, as explained here: #31 (comment)
I don't use these features myself, but I hope this helps you out.
And zetteldeft-file-naming-rules is not mentioned anywhere in the PR.
My mistake! I meant to type deft-file-naming-rules
.
from zetteldeft.
My mistake! I meant to type
deft-file-naming-rules
.
IMHO it would improve the docu if you would have a special section about features and functionalities that does not come from zetteldeft
but from deft
or other emacs parts. Me as a user I do not think like a machine or in separated emacs modules/modes.
I use zetteldeft not more. I want to change zetteldeft filenaming and of course I want to do that with zetteldeft. I does not come to my mind that another emacs module could be involved in such a basic feature.
I am aware that this is part of emacs concept and if someone use emacs she/he also decides to "make some steps into the machine". But "some" not all. As a "user of zetteldeft" I do not want to think about other modes. It would help me, but I assume it is unusual, to create surrogate functions for zetteldeft (e.g. zetteldeft-file-nameing-rules
) simply calling the "real" function (e.g. deft-file-nameing-rule
).
from zetteldeft.
So I looked into the docu of the variable/function(?). The docu uses setq
but I assume this is not needed when I use usepackage
right?
This is part of my init file.
99 (use-package deft
100 :ensure t
101 :custom
102 (deft-extensions '("org" "md" "txt"))
103 (deft-directory "~/tab-cloud/zettel")
104 (deft-use-filename-as-title t)
105 (deft-file-nameing-rules
106 ’((nospace . "_"))
107 )
108 )
109
110 (use-package zetteldeft
111 :ensure t
112 :after deft
113 :config (zetteldeft-set-classic-keybindings))
To make it simple I used foo bar
as title of a new zettel. But it is not transformed into *foo_bar.org
but *foo bar.org
. The space is still there but I set nospace
. So what did I missunerstood? Or is someting wrong with my syntax?
When I understood the docu correct this variable does not do a lot. It just replaces slashes and spaces and take care of upper- or lowercase letters - not more. What is about my :
, or "
or etc...
How can I treat them?
from zetteldeft.
IMHO it would improve the docu if you would have a special section about features and functionalities that does not come from
zetteldeft
but fromdeft
or other emacs parts. Me as a user I do not think like a machine or in separated emacs modules/modes. I use zetteldeft not more. I want to change zetteldeft filenaming and of course I want to do that with zetteldeft. I does not come to my mind that another emacs module could be involved in such a basic feature.
Zetteldeft is specifically intended as expansion of Deft. In other words: Deft is the core of Zetteldeft (at least it is for now), so it doesn't make sense to me to duplicate configuration options.
from zetteldeft.
Related Issues (20)
- Error in zetteldeft-new-file-and-backlink and update the function HOT 2
- Deft doesn't strip #+STARTUP options at the beginning of note from title HOT 4
- FeatureRequest: Inform about dead link when `C-c d f` HOT 4
- Question: Batch rename tags on all related zettels HOT 1
- Which special characters can be used to distinguish special tags? HOT 3
- Question: What is a backlink HOT 1
- zetteldeft-find-file behave different HOT 1
- FeatureRequest: create new note in a sub-directory HOT 1
- zetteldeft-full-search-find-file: possibility to see results as we type keywords? HOT 3
- Org-capture via org-protocol to create notes directly from the browser HOT 2
- Right hand side back-links window HOT 3
- zetteldeft-find-file not using follow mode HOT 5
- Strange line break HOT 2
- Sorting of files in zetteldeft-find-file HOT 2
- Add a function analogous to zetteldeft-insert-link-{zd,org}-style but for markdown
- make the function to extract a title from a note customizable
- shouldn't zetteldeft--check return nonnil or nil rather than signalling an error? HOT 1
- Incompatibility with Org 9.5.5? HOT 3
- Is this expected behavior for dynamic blocks? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zetteldeft.