Giter VIP home page Giter VIP logo

Comments (11)

maximbaz avatar maximbaz commented on August 27, 2024 2

@djcb, do you consider revisiting this issue?

It sounds like a great improvement, even the simplest scenario "display unread counter next to a bookmark" would make user interactions with mu4e:main page way more productive.

For example, if I have 5 bookmarks, being on mu4e:main page I can easily tell that there is something new only in one of them, so I don't need to open other 4.

from mu.

djcb avatar djcb commented on August 27, 2024

From the command-line, with mu-guile installed:
$ guile -c '(use-modules (mu) (mu stats)) (mu:initialize) (format #t "~s" (mu:count "flag:unread"))'

from mu.

zabbal avatar zabbal commented on August 27, 2024

I think it's worth adding that to documentation.

from mu.

djcb avatar djcb commented on August 27, 2024

or a little bit shorter,
$ mu script --script=msgs-count -- --query='flag:unread'

adding something for mu4e is a 'wontfix' for now, since e..g. having it in the views would require a bit too much extra complexity.

from mu.

kzar avatar kzar commented on August 27, 2024

Well there is mu4e-alert which you might consider using. Personally I didn't get on too well with it and instead hacked together a simplistic modeline notification based on some of the mu4e-alert code:

(setq kzar/mu4e-activity-string "")
(add-to-list 'global-mode-string '((:eval kzar/mu4e-activity-string)) t)
(defun kzar/get-mu4e-incoming-count ()
  (let* ((query "flag:unread AND \(maildir:/INBOX or maildir:/INBOX.Eyeo\)")
         (command (concat mu4e-mu-binary " msgs-count --query='" query "'")))
    (string-trim (shell-command-to-string command))))
(defun kzar/format-mu4e-mode-string (count)
  (concat "📧[" (if (string= count "0") "" count) "]"))
(defun kzar/update-mu4e-activity-string (&rest args)
  (setq kzar/mu4e-activity-string
        (kzar/format-mu4e-mode-string (kzar/get-mu4e-incoming-count)))
  (force-mode-line-update))
(add-hook 'mu4e-main-mode-hook #'kzar/update-mu4e-activity-string)
(add-hook 'mu4e-view-mode-hook #'kzar/update-mu4e-activity-string)
(add-hook 'mu4e-index-updated-hook #'kzar/update-mu4e-activity-string)

It doesn't update immediately after I've read an email or when I've marked one as unread. I got stuck fixing that since the database hasn't been updated at that point, so these don't work:

(advice-add #'mu4e-mark-execute-all :after #'kzar/update-mu4e-activity-string)
(advice-add #'mu4e-context-switch :after #'kzar/update-mu4e-activity-string)
(advice-add #'mu4e-headers-view-message :after #'kzar/update-mu4e-activity-string)

I would also like my C-c space hotkey that switches to active rcirc buffers to switch to my inbox view when I have incoming messages, but I've not figured out how yet.

Finally I want the incoming message count number to be highlighted when I have messages to look at, but so far haven't figured that out either!

Anyway hope it helps, Dave.

from mu.

titaniumbones avatar titaniumbones commented on August 27, 2024

Replying a little belatedly:

  • the count seems to run off the end of my modeline (see attached). Any idea how to fix that?
  • do you have a way to just get the total count for messages in the current folder/view?

Thank you! Really appreciate it.

from mu.

titaniumbones avatar titaniumbones commented on August 27, 2024

(can't figure out how to attach, sorry!)

from mu.

pmatos avatar pmatos commented on August 27, 2024

Reviving this... if it's possible to do something like $ mu script --script=msgs-count -- --query='flag:unread' as @djcb suggested, wouldn't it be possible to put the output of this in the view somehow?

Also - that line doesn't work anymore on 1.3.5 unfortunately. On my gentoo system I get: mu: failed to open '/usr/share/mu/scripts/': No such file or directory (73)

from mu.

permezel avatar permezel commented on August 27, 2024

I'm just beginning to use mu. Running into all sorts of issues, one which lead me to this page. Is it dead?

z8% mu --version
mu (mail indexer/searcher) version 1.4.15
Copyright (C) 2008-2020 Dirk-Jan C. Binnema
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
z8% mu script
error: failed to open '/usr/share/mu/scripts/': No such file or directory (73)
z8% find /usr 2>/dev/null | grep /mu/
z8% which mu
/usr/bin/mu

I'm on fedora 34.

z8% uname -a
Linux z8.zepherin.com 5.13.16-200.fc34.x86_64 #1 SMP Mon Sep 13 12:39:36 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

from mu.

Chris00 avatar Chris00 commented on August 27, 2024

@permezel mu is far from being dead but, if you do not describe “all sorts of issues” you encounter (in separate issues, respecting the template), it is difficult to help you.

First, you must upgrade mu:

$ mu --version
mu (mail indexer/searcher) version 1.7.0
Copyright (C) 2008-2021 Dirk-Jan C. Binnema
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

from mu.

permezel avatar permezel commented on August 27, 2024

@permezel mu is far from being dead but, if you do not describe “all sorts of issues” you encounter (in separate issues, respecting the template), it is difficult to help you.

First, you must upgrade mu:

$ mu --version
mu (mail indexer/searcher) version 1.7.0
Copyright (C) 2008-2021 Dirk-Jan C. Binnema
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

@Chris00 Fair enough. I thought I was uptodate, but apparently not.
Am now, though:

z8% mu --version
mu (mail indexer/searcher) version 1.6.6
Copyright (C) 2008-2021 Dirk-Jan C. Binnema

Still same issues:

z8% mu zot
error: failed to open '/usr/share/mu/scripts/': No such file or directory

The rest of my issues, I will attempt to clarify.

As far as what brings me here in particular: it appears various distributions have for years not been including the /usr/share/mu/ stuff. Does this matter? Too early to tell, but I consider spurious error messages to be a sign of bit rot, which is why I inquired after the health.

from mu.

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.