GithubHelp home page GithubHelp logo

Comments (11)

jwiegley avatar jwiegley commented on May 28, 2024

It's definitely not abandoned; 10 unattended issues should be weighed against my daily use of this library for several years now, and its use by others. :)

from alert.

FrancisMurillo avatar FrancisMurillo commented on May 28, 2024

If I might say, I was able to make it work with the following changes at alert-log-notify

        (when (fboundp 'log4e:deflogger)
          (log4e:deflogger "alert" "%t [%l] %m" "%H:%M:%S")

          (when (functionp 'alert--log-set-level)
            (alert--log-set-level alert-log-level))

          ;; HACK: Enable logging here?
          (alert--log-enable-logging) 
          (alert--log-info mes)
     )

Two things with this: the *Alert* buffer name is called *log4e-alert* and alert-log-message must be nil when alert-default-style is 'log unless double logging is okay. I just read up on log4e and a rookie so I really don't know. But an official fix for this would ease my mind as well.

from alert.

vspinu avatar vspinu commented on May 28, 2024

my daily use of this library for several years now, and its use by others. :)

I am looking for a reliable persistent notifications inside emacs. Persistent in the sense that the notification won't disappear till I really payed attention to it.

For instance, if a new message arrived in my slack buffer the notification should be on till I visited that buffer. This is how jabber notifications work. emacs-slack builds on alert and its notifications are far from being useful at the moment.

libnotify is currently broken (#28), so in linux I cannot get persistent notifications working outside emacs either.

from alert.

jwiegley avatar jwiegley commented on May 28, 2024

Sounds like some bugs need fixing. The behavior you describe is exactly how alert should be working for you: alerts persist until you visit the buffer that raised them, so long as you don't have them configured to automatically disappear (which is the default).

from alert.

FrancisMurillo avatar FrancisMurillo commented on May 28, 2024

Assuming 'fringe or 'mode-line works, if the current buffer or minibuffer is the that invokes (alert "I love cats" :style 'fringe); the fringe alert is immediately removed by alert-remove-on-command thus making it appear that nothing happened. Ditto with mode-line

My workaround is to use delay it a little bit
(run-at-time 0 nil (lambda () (alert "I love cats" :style 'fringe))).

Just noting

from alert.

rgrinberg avatar rgrinberg commented on May 28, 2024

I'm also being confused by the correct way to configure this.

First of all, I have alert-log-messages set to t but no *Alerts* buffer is being created. Second of all, the log4e logging seems to be buggy by default.

As been mentioned earlier, I need to execute alert--log-enable-logging sequence before the alert--log-open-log works.

EDIT: Forgot to mention, that alert--log-enable-logging seems to be initialized lazily, so I need to create a dummy alert before calling the alert--log-enable-logging function.

from alert.

unhammer avatar unhammer commented on May 28, 2024

Perhaps alert-log-notify should do

(when (fboundp 'log4e:deflogger)
          (log4e:deflogger "alert" "%t [%l] %m" "%H:%M:%S")
          (alert--log-enable-logging)
          (when (functionp 'alert--log-set-level)
            (alert--log-set-level alert-log-level)))

?

My init.el workaround is to

(use-package alert
  :defer t
  :config
  (alert-log-notify nil)
  (alert--log-enable-logging))

from alert.

vincentjgoh avatar vincentjgoh commented on May 28, 2024

I installed the stable package and I didn't have any troubles with the message style, but it was missing the 'mode-line' style, which I wanted. I installed the latest unstable version, and none of the styles seems to work. (I'll probably actually just define my own style that modifies the mode-line to say what I want rather than just changing the colour, but I thought it was worth mentioning the difference between the two versions.)

from alert.

jwiegley avatar jwiegley commented on May 28, 2024

@vincentjgoh Thanks for the note, I'll look into it soon.

from alert.

juergenhoetzel avatar juergenhoetzel commented on May 28, 2024

First of all, I have alert-log-messages set to t but no Alerts buffer is being created. Second of all, the log4e logging seems to be buggy by default.

IMO the the documentation needs to be updated because *Alerts* is only used when log4e is not available:
But log4e is a dependency of alert. So most users need to use alert--log-open-log instead.

I was also confused by the fact that the log4e based logging function are defined at runtime. And the first message gets lost. See: Ensure log4e logging is enabled when using default log4e functions

from alert.

dmusican avatar dmusican commented on May 28, 2024

I just stumbled across this issue when trying to figure out why I couldn't find an *Alerts* buffer. Thanks @juergenhoetzel, for the info; that's what I needed. It would be helpful to have this clearly documented somewhere.

from alert.

Related Issues (20)

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.