Comments (2)
For anyone from the future, here's what more or less works for me:
(defun my-strip-front-matter (contents)
(replace-regexp-in-string "^---\\(?:\n.*\\)*---.*$" "" contents))
(defun my-deft-parse-title-wrapper (f file contents)
(let ((new-contents (my-strip-front-matter contents)))
(funcall f file new-contents)))
(defun my-deft-parse-summary-wrapper (f contents title)
(let ((new-contents (my-strip-front-matter contents)))
(funcall f new-contents title)))
(advice-add 'deft-parse-title :around 'my-deft-parse-title-wrapper)
(advice-add 'deft-parse-summary :around 'my-deft-parse-summary-wrapper)
from deft.
Seconding this. I couldn't work around this by providing a new deft-parse-title-function
as that function is only passed the first line, and I couldn't get it to work adding advice to deft-parse-title
. This feature would be great!
from deft.
Related Issues (20)
- Deft hangs on emacs 28 HOT 12
- Right to left text in file causes wrong alignment of date and time stamp in Deft file browser.
- Second search can not jump to accurate position
- Support custom filters? HOT 1
- How to make the title and content not on the same line๏ผ HOT 2
- How to make deft work with files without file extension?
- docu for `deft-file-naming-rules` missing HOT 1
- How to use `deft-file-naming-rules` with `usepackage` HOT 1
- Display file at point when using deft-find-file HOT 1
- Adding optional Xapian support HOT 12
- Incongruity between default file type and default summary generation
- Super slow
- Is there a way to generate #+title: after creaing deft file? HOT 1
- deft-file-mtime: Wrong type argument
- Default directory for new files
- message Package cl is deprecated HOT 1
- Emoji in org-mode files causing Deft summary lines to bleed over into next line
- Org-rifle vs deft HOT 1
- creating new files with Deft using prompt for title HOT 4
- deft-find-file: how to disable defaulting to "find-file" and instead use deft-new-file-format
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 deft.