Comments (2)
The default behavior of EDNC is just a starting point that users are free to customize, and I would rather not introduce any functions that are a better fit for an individual user's configuration file. (For the same reason, I have helpful functions like list-notifications
and stack-notifications
in my README, but not in the package's codebase.)
The important thing is that EDNC's public API is flexible enough for users to implement their ideas, and in your case it turned out that life could be made easier by a small change to ednc-toggle-expanded-view
, namely to provide a way to unexpand notifications unconditionally. This technically breaks the API, but since EDNC's major version is still 0, I feel that's okay.
Can we have a function that closes all expanded views in ednc-log buffer?
The reason why I would like this is because I open all new notifications in expanded form.
You can now use a function like the following in your log-buffer to close all expanded views:
(defun unexpand-all-notifications ()
(goto-char (point-max))
(while (zerop (forward-line -1)) (ednc-toggle-expanded-view (point) -1)))
Can we have a way to close previous notifications upon new ones arriving?
You can leverage the function above to do that as well:
(defun unexpand-log-buffer-on-new (old new)
(when new (with-current-buffer (get-buffer-create ednc-log-name)
(unexpand-all-notifications))))
(push #'unexpand-log-buffer-on-new ednc-notification-presentation-functions)
(Yes, this unexpands all notifications, including the new one, but you presumably use ednc-pop-to-notification-in-log-buffer
, which expands it again. Otherwise it shouldn't be hard to modify to leave the most recent one alone.)
Thanks for the feedback.
from ednc.
Thank you.
from ednc.
Related Issues (11)
- FYI: if-let, when-let, pcase-let HOT 9
- would calling something like herbe/wayherb still be possible with an hook with ednc? HOT 3
- general experience, ideas, and thank you HOT 1
- Screenshots HOT 4
- ednc--get-hint errors out on valid association list HOT 4
- ednc-dismiss-notification key binding not working for me HOT 4
- Displaying new notifications in new frames is undocumented
- Support for embedded URLs could be better HOT 1
- Support for embedded images could be better HOT 5
- Interference by `openwith.el` 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 ednc.