GithubHelp home page GithubHelp logo

Feature requests about ednc HOT 2 CLOSED

ylc avatar ylc commented on July 30, 2024
Feature requests

from ednc.

Comments (2)

sinic avatar sinic commented on July 30, 2024 1

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.

ylc avatar ylc commented on July 30, 2024

Thank you.

from ednc.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.