Comments (6)
Update: Nvm, user error. :)
@Anks I'm seeing this error with your snippet after adding to dotspacemacs/user-config
, any idea why?
(Spacemacs) Error in dotspacemacs/user-config: Wrong type argument: symbolp, (defalias (quote anks-deft-limit\
ing-fn) (function (lambda (orig-fun &rest args) (let ((deft-current-files (-take 30 deft-current-files))) (ap\
ply orig-fun args)))))
from deft.
Thanks for reporting this. I can confirm a similar result when profiling, although I only have about 300 notes at the moment.
I think rather than limiting the number of lines rendered (which would prevent being able to scroll down and see more), to solve the underlying issue a better approach would be a slight redesign where the widget and summary line for each file is created once and stored for re-use. I can't tackle that at the moment, but if anyone wants to take a shot at that I'll certainly accept at a PR.
from deft.
Small update: for my personal use, I ended up defining a advice function like this which limits the display to 30 files:
;; Overwrite `deft-current-files` for the `deft-buffer-setup` and limit it to 30 entries
(defun anks-deft-limiting-fn (orig-fun &rest args)
(let
((deft-current-files (-take 30 deft-current-files)))
(apply orig-fun args)))
(advice-add 'deft-buffer-setup :around #'anks-deft-limiting-fn)
This gives me snappy search, and 30 results are 'good enough'.
This is probably not the best solution, but works for me.
Note: the -take
function is from dash.el
from deft.
@joech4n why added into a (defalias (quote ...)) block?
I just added directly under user-config, it works quite well
from deft.
I added built-in support for limiting the number of files shown via `deft-file-limit'. See the updated README and the docstring for details.
from deft.
@jrblevin Thank you!
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
- Fix to make deft faster (also on older emacsen) HOT 3
- configure list of files and format to new notes
- deft--org-complete is generating broken links HOT 1
- Executing shell commands on files
- New file names
- 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.