Giter VIP home page Giter VIP logo

sauron's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sauron's Issues

priority max is 5 instead of 6

Hello,

when I started to debug something, I realized that the boundary value [0..5] are not consistent with sauron.el:679 :

    (let ((sev (nth prio '(trivial trivial low normal moderate high urgent)))

Expose the number of Sauron events?

I'd love to add the number of unread sauron events to my mode-line, how do you feel about Sauron exposing a var or function for the number of unread events?

Sauron show/hide

I'd like to have Sauron "show" itself when a certain kind of event happens, and have a binding to "q" that dismisses the window. If I built this, would it be accepted?

ERC events not received in recent master branch Emacs (~February 2019)

After upgrading master branch Emacs to 52cd63d1 (20190227) from b32ac17 (20190203), ERC events are not being logged. Here are steps to reproduce the problem.

  1. emacs -Q
  2. Evaluate this code.
(setq sauron-nick-insensitivity 5)
(setq sauron-hide-mode-line t)
(setq sauron-modules '(sauron-erc))

(add-to-list 'load-path "/home/jrm/.emacs.d/elpa/sauron-20181216.1200")

(require 'sauron)
 
(defun jrm/sauron-speak-erc (origin prio msg props)
  "When ORIGIN is erc with priority at least PRIO, say MSG ignoring PROPS."
  (when (eq origin 'erc)
    (call-process-shell-command
     (concat "flite -voice /home/" (user-login-name)
             "/local/share/data/flite/cmu_us_aew.flitevox \"I-R-C message: "
             msg "\"&") nil 0)))

(sauron-start)
  1. Log in to ERC, receive mentions or messages and the only event that is listed in the Sauron buffer is the sauron started event.

Proposition for sauron popup window

For its package hydra, @abo-abo wrote lv.el. It is a simple tool to display a message on the echo area, or rather at the top of the echo area.

Using it for sauron may be a solution, but it could also interfere with the hydra package.

Anyway, emacs need a solution for these kinds of buffers. I hope you will find a solution (if not yet, it works for me), and in emacs 25, the *completion* buffer that comes by pressing tab without helm or ivy.

I did not really used this package much yet, but I really like it already! Thank you!

PS: This could be nice in the github description string: ๐ŸŒ‹

Can not get any notification for Elfeed (windows 7)

Hi, @djcb

I am working on Windows 7. I tried to make it possible to get notifications for update of Elfeed. However, I never made it.

I am trying to debug this things, but can not think of a good way to start. Thanks if you can give me some diagnose.

Sauron stops working after a while

After a while (several hours... I don't think this happens more than once a day), Sauron ceases to notify me about events. Turning it off and on again (sauron-stop, sauron-start) gets it working again, but I'll miss anything that happened in the interim.

I'm afraid I don't have very much additional information about this, but by my recollection it's been happening regularly since I installed it, but I can't think of anything obvious which would trigger it.

I only use Sauron for ERC at present. I'm running Emacs 24.0.93 on Ubuntu 11.04. If it helps, here's my ./configure results (using --with-x-toolkit=gtk3).

Configured for `x86_64-unknown-linux-gnu'.

  Where should the build process find the source code?    /home/phil/emacs/emacs24/emacs-24.0.93
  What operating system and machine description files should Emacs use?
        `s/gnu-linux.h' and `m/amdx86-64.h'
  What compiler should emacs be built with?               gcc -std=gnu99 -g -O2
  Should Emacs use the GNU version of malloc?             yes
      (Using Doug Lea's new malloc from the GNU C Library.)
  Should Emacs use a relocating allocator for buffers?    no
  Should Emacs use mmap(2) for buffer allocation?         no
  What window system should Emacs use?                    x11
  What toolkit should Emacs use?                          GTK
  Where do we find X Windows header files?                Standard dirs
  Where do we find X Windows libraries?                   Standard dirs
  Does Emacs use -lXaw3d?                                 no
  Does Emacs use -lXpm?                                   yes
  Does Emacs use -ljpeg?                                  yes
  Does Emacs use -ltiff?                                  yes
  Does Emacs use a gif library?                           yes -lgif
  Does Emacs use -lpng?                                   yes
  Does Emacs use -lrsvg-2?                                yes
  Does Emacs use imagemagick?                             yes
  Does Emacs use -lgpm?                                   yes
  Does Emacs use -ldbus?                                  yes
  Does Emacs use -lgconf?                                 no
  Does Emacs use GSettings?                               yes
  Does Emacs use -lselinux?                               no
  Does Emacs use -lgnutls?                                yes
  Does Emacs use -lxml2?                                  yes
  Does Emacs use -lfreetype?                              yes
  Does Emacs use -lm17n-flt?                              no
  Does Emacs use -lotf?                                   no
  Does Emacs use -lxft?                                   yes
  Does Emacs use toolkit scroll bars?                     yes

Compilation Error when installing from marmalade

I use emacs-snapshot on ubuntu.


Compiling file /home/antono/.emacs.d/var/elpa/sauron-0.6/sauron.el at Sun Mar 11 08:17:15 2012
sauron.el:123:1:Warning: defface for sauron-timestamp-face' fails to specify containing group sauron.el:127:1:Warning: defface forsauron-message-face' fails to specify
containing group
sauron.el:131:1:Warning: defface for sauron-origin-face' fails to specify containing group sauron.el:135:1:Warning: defface forsauron-priority-face' fails to specify
containing group
sauron.el:140:1:Warning: defface for sauron-highlight1-face' fails to specify containing group sauron.el:144:1:Warning: defface forsauron-highlight2-face' fails to specify
containing group
sauron.el:148:1:Warning: defface for sauron-highlight3-face' fails to specify containing group sauron.el:152:1:Warning: defface forsauron-header-face' fails to specify
containing group
sauron.el:156:1:Warning: defface for `sauron-event-handled-face' fails to
specify containing group

In sr-scroll-to-bottom:
sauron.el:346:40:Warning: reference to free variable `sr-buffer'
sauron.el:353:1:Error: Symbol's value as variable is void: sauron-debug

Invalid function: sr-ignore-errors-maybe

I'm getting this when ERC messages are sent to me (or more precisely, when I send one to myself, but I presume that's not going to make a difference).

error in process filter: sr-erc-PRIVMSG-hook-func: Invalid function: sr-ignore-errors-maybe
error in process filter: Invalid function: sr-ignore-errors-maybe

C-h f sr-ignore-errors-maybe tells me that sr-ignore-errors-maybe exists as a macro in sauron.

Emacs version is 24.0.92.1

In case it's somehow relevant, I have been closing the sauron frame, and simply opening it as a dedicated window in another frame.

The backtrace is:

Debugger entered--Lisp error: (invalid-function sr-ignore-errors-maybe)

sr-ignore-errors-maybe(nil)

sr-erc-PRIVMSG-hook-func(# [cl-struct-erc-response ":me!~user@2404:130::1000:7271:bcff:fead:5c41 PRIVMSG me :test" "me!~user@2404:130::1000:7271:bcff:fead:5c41" "PRIVMSG" ("me" "test") "test"])

run-hook-with-args-until-success(sr-erc-PRIVMSG-hook-func # [cl-struct-erc-response ":me!~user@2404:130::1000:7271:bcff:fead:5c41 PRIVMSG me :test" "me!~user@2404:130::1000:7271:bcff:fead:5c41" "PRIVMSG" ("me" "test") "test"])

erc-call-hooks(# [cl-struct-erc-response ":me!~user@2404:130::1000:7271:bcff:fead:5c41 PRIVMSG me :test" "me!~user@2404:130::1000:7271:bcff:fead:5c41" "PRIVMSG" ("me" "test") "test"])

erc-handle-parsed-server-response(# [cl-struct-erc-response ":me!~user@2404:130::1000:7271:bcff:fead:5c41 PRIVMSG me :test" "me!~user@2404:130::1000:7271:bcff:fead:5c41" "PRIVMSG" ("me" "test") "test"])

erc-parse-server-response(# ":me!~user@2404:130::1000:7271:bcff:fead:5c41 PRIVMSG me :test")

erc-server-filter-function(# ":me!~user@2404:130::1000:7271:bcff:fead:5c41 PRIVMSG me :test\n")

sauron not seeing any org-mod events

For some reason, Sauron is not detecting any org-mode events. When I start Sauron, I can that it's loaded the sauron-org module, but it doesn't issue notifications about any org-mode events (twitter and erc notifications work as expected). Is there something else I need to do to get sauron to see the org-mode events?

sauron as a "side window"

The following code makes Sauron be an emacs "side window" see
https://www.gnu.org/software/emacs/draft/manual/html_node/elisp/Frame-Layouts-with-Side-Windows.html

Basically it works like the sauron embedded window is supposed to, but is more robust in some ways.
The code is just POC.

(defvar parameters
'(window-parameters . ((no-other-window . t) (no-delete-other-windows . t))))

(setq fit-window-to-buffer-horizontally t)
(setq window-resize-pixelwise t)

(setq
display-buffer-alist
`(("\Sauron\" display-buffer-in-side-window
(side . top) (slot . 0) (window-height . fit-window-to-buffer)
(preserve-size . (nil . t)) ,parameters)))

Interest in adding twitter mentions in sauron-twittering?

Is there interest for adding @-mention support for twittering-mode, where a sauron alert can be raised if a new tweet comes in that mentions you?

If so, I can try to add this, I just don't want to add it if there isn't support (I'll add it in my own dotfiles then)

sauron-notifications not available; fring-columns error

Greetings,

So far, I have been unable to get Sauron to work. Upon starting up a new emacs session and attempting to start sauron via M-x sauron-start, I get the following in Messages:

sauron-notifications not available Sauron has started

If I attempt to M-x sauron-toggle-hide-show I get the following the first time:

floor: Symbol's function definition is void: fringe-columns

... and the following on subsequent attempts:

or: Window width 4294967288 too small (after splitting) [2 times]

The width in the message doesn't change regardless of how large (or small) my frame is.

Sauron is up-to-date as of this morning via git pull origin and below is my sauron-related config:

(add-to-list 'load-path "~/.emacs.d/elisp/sauron/")
(require 'sauron)

(global-set-key (kbd "<f9>") 'sauron-toggle-hide-show)

(setq sauron-max-line-length 120
  sauron-watch-patterns '("ryanc" "rcorder")
  sauron-watch-nicks '("ryanc" "rcorder")
  sauron-separate-frame nil
  sauron-hide-mode-line nil)

(add-hook 'sauron-event-added-functions
  (lambda (origin prio msg &optional props)
    (cond
      ((= prio 3)
        (sauron-fx-sox "/usr/share/sounds/freedesktop/stero/dialog-warning.oga"))
      ((= prio 4)
        (sauron-fx-sox "/usr/share/sounds/freedesktop/stero/dialog-warning.oga"))
      ((= prio 5)
        (sauron-fx-sox "/usr/share/sounds/freedesktop/stero/dialog-warning.oga")
        (sauron-fx-notify("Emacs (via Sauron)" msg 5))))))

(add-hook 'sauron-event-block-functions
  (lambda (origin prio msg &optional props)
    (or
      (string-match "^*** Users" msg))))

I am running Emacs 23.3 on Arch Linux x86-64, it is the emacx-nox package and here are the compile flags:

CFLAGS="${CFLAGS} -fno-optimize-sibling-calls" ./configure --prefix=/usr --without-x --without-sound

Thanks in advance for any guidance.

Add autoload comments

If you prefix things to be autoloaded with a ;;;###autoload comment, then package managers like el-get can process them automatically, meaning that people using those don't need to (require) the library or define their own autoloads.

Getting sauron to work across multiple Emacs instances

Due to Emacs' unfortunate single-threaded nature, I have to run multiple
instances for all of the things that I do with Emacs.

I was wondering if it would be possible for Sauron to write events to a location
on disk that could be shared across multiple instances of Emacs? That way I
could see mail/twitter notifications, ERC mentions, and other events all in
whichever emacs I am currently in.

Any idea whether that's possible (or even desired?)

"Hook" sauron-add-event to notifications-notify

I wrote this advice to add message passed to notifications-notify to sauron.

Since notifications.el is shipped with Emacs since 24, I guess many package supports this protocol. Then sauron get messages from these packages for free.
But maybe it will be problematic if some package supports both sauron and notifications.el because you will have duplicated messages in sauron.

Anyway, do you think this can be in sauron?

(defadvice notifications-notify
  (after sr-notifications-hook (&rest params) disable)
  "\"Hook\" `sauron-add-event' to `notifications-notify'"
  (let ((title (plist-get params :title))
        (body (plist-get params :body))
        (urgency (plist-get params :urgency))
        (urgency-to-prio `(low 3 normal 4 critical 5))
        (prio-default 4))
    (sauron-add-event
     'notifications
     (or (plist-get urgency-to-prio urgency) prio-default)
     (concat title (if (and title body) " - ") body))))

;; activate the advice
(ad-enable-advice 'notifications-notify 'after 'sr-notifications-hook)
(ad-activate 'notifications-notify)

sauron-fx-mplayer

Neither sox nor aplay handle .oga files it seems; but mplayer does:

(defun sauron-fx-mplayer (path)
  "Play a wav-file at PATH using program mplayer."
  (unless (and (file-readable-p path) (file-regular-p path))
     (error "%s is not a playable file" path))
  (unless (executable-find "mplayer")
     (error "mplayer not found"))
  (call-process "mplayer" nil 0 nil "-really-quiet" path))

Add function for listing/updating/removing Events

I'm trying to integrate sauron into my usual workflow.

One thing I want to do is showing an event in sauron when There's new stuff in my org-mobile inbox. However, there's no way to check if there's already a notification visible in sauron.

Sauron should feature one or two functions for listing all visible notifications of a given sender and/or should return an unique id when adding an event which can be used to modify/remove this event later.

Show keybindings in docstring

diff --git a/sauron.el b/sauron.el
index 697509d..2c79fe8 100644
--- a/sauron.el
+++ b/sauron.el
@@ -190,7 +190,7 @@ e.g. when using ERC")


 (defun sauron-mode ()
-  "Major mode for the sauron."
+  "Major mode for the sauron.\n\n\\{sauron-mode-map}"
   (interactive)
   (kill-all-local-variables)
   (use-local-map sauron-mode-map)

sauron and dbus

Hi!
Thanks for your work!

I tried your module, with dbus. But I have a trouble with it.
Redefine modules:
(setq sauron-modules '(sauron-dbus sauron-org sauron-notifications))

And please, look at:
2016-05-31 09:09:02 sauron 3 sauron started: sauron-org, sauron-notifications

Where is dbus?
Sauron didn't listen dbus? I saw my message in dbus-monitor program...
Emacs 24.5.1, sauron: elpa/sauron-20160501.1045/
Thanks!

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.