Comments (4)
The first line of an org file is customarily the #+TITLE
line. I don't know whether that is a requirement, or just a custom. (I've not seen an example where the #+TITLE
was not first, but I haven't searched the entire Internet.)
Note that zetteldeft-title-prefix
starts with it.
Regarding the link highlighting, how have you set zetteldeft-id-regex
? That might be related, as I believe you need to set it in such a way that zetteldeft--id-font-lock-setup
will be called (like via :custom
in use-package
).
from zetteldeft.
First, thanks for your help.
I actually learned from other users and set my orgfiles to be of the form:
#+startup: overview
#+startup: indent
#+options: toc:nil num:nil
#+todo: TODO FANCY OPTIONS | DONE
# ...etc.
#+title: My title
I like this approach because I don't have the title and then lots of setting in between the main text and the title, it's just a preamble with settings.
My zetteldeft-title-prefix’s value is:
"#+STARTUP: overview
#+STARTUP: indent
#+TITLE: "
Original value was "#+TITLE: "
I modified to suit my needs.
As for my setteldeft-id-regex, I modified it also:
"[0-9]\\{4\\}\\(-[0-9]\\{2,\\}\\)\\{3\\}-[0-9]\\{2\\}"
Original value was
"[0-9]\\{4\\}\\(-[0-9]\\{2,\\}\\)\\{3\\}"
from zetteldeft.
So these are actually two separate issues.
First the titles: Zetteldeft relies on Deft to figure out the title of a note, so the challenge here is to figure Deft correctly. Take a look at deft-strip-title-regexp
. I seem to recall a discussion about this topic in Deft's Github repository, perhaps start there? EDIT: It's this issue
Second the link highlighting: this is indeed something Zetteldeft should take care of. How did you customize the zetteldeft-id-regex
in your setup? I think two approaches should work: either via setq
before requiring Zetteldeft, or via the customize
interface. This way, the font-lock is applied correctly, as explained by @gklimowicz
from zetteldeft.
Thanks!
(1) deft-strip-title-regexp:
"\\(?:^%+\\|^#\\+TITLE: *\\|^[#* ]+\\|-\\*-[[:alpha:]]+-\\*-\\|^Title:[ ]*\\|#+$\\)"
This is a regex issue, and I don't know much regex, so I guess I will be stuck here. I read the thread but couldn't figure it out yet. Will keep trying.
(2) zetteldeft-id-regex should be correct:
Its value is "[0-9]\\{4\\}\\(-[0-9]\\{2,\\}\\)\\{3\\}-[0-9]\\{2\\}"
Original value was
"[0-9]\{4\}\(-[0-9]\{2,\}\)\{3\}"
edit: I forgot to answer your question on how I set up this variable:
(setq zetteldeft-id-regex "[0-9]\\{4\\}\\(-[0-9]\\{2,\\}\\)\\{3\\}-[0-9]\\{2\\}")
and I call it on my init AFTER requiring zetteldeft.
edit:
calling it before fixes the issue (2), thanks!
from zetteldeft.
Related Issues (20)
- Error in zetteldeft-new-file-and-backlink and update the function HOT 2
- 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
- FeatureRequest: Handle special characters in zettels filenames HOT 7
- 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.