Coder Social home page Coder Social logo

Comments (9)

danielfleischer avatar danielfleischer commented on July 17, 2024

Let's start with the basics: what are the Emacs and mu4e versions? also, after specifying mu4easy-contexts customization, you need to either run (setq mu4e-contexts (mapcar #'eval mu4easy-contexts)) for them to be evaluated or just restart Emacs.

from mu4easy.

nameiwillforget avatar nameiwillforget commented on July 17, 2024

Sorry, I thought if I reply to the mail directly, it would put it into GitHub automatically. Anyway, Emacs version is 28.2, mu4e is 1.8.13. The error comes when I restart emacs. I've tried now the command you sent, but it gives the error "setq: Symbol’s value as variable is void: mu4easy-contexts".

from mu4easy.

danielfleischer avatar danielfleischer commented on July 17, 2024

It should work with email. Anyways, not sure what's wrong. Do you load the library? how do you call it in your config file?

from mu4easy.

nameiwillforget avatar nameiwillforget commented on July 17, 2024

The entire mu4easy-code currently in the file consists of the following:


(use-package mu4easy
  :ensure t
  :bind ("C-c u" . mu4e)
  :config (mu4easy-mode))

(defcustom mu4easy-contexts
        
       ((mu4easy-context
          :c-name  "gmx"
          :maildir "gmx"
          :mail    "***"
          :smtp    "mail.gmx.com")
        
        ,(mu4easy-context
          :c-name    "proton"
          :maildir   "proton"
          :mail      "***"
          :smtp      "127.0.0.1"
          :smtp-type ssl
          :smtp-port 1025)
        ))
        

from mu4easy.

danielfleischer avatar danielfleischer commented on July 17, 2024

Ok, that's not the right way to define a custom variable that was already defined. Either do

(custom-set-variables '(mu4easy-contexts
                        '((mu4easy-context
                           :c-name  "gmx"
                           :maildir "gmx"
                           :mail    "***"
                           :smtp    "mail.gmx.com")
                          
                          (mu4easy-context
                           :c-name    "proton"
                           :maildir   "proton"
                           :mail      "***"
                           :smtp      "127.0.0.1"
                           :smtp-type ssl
                           :smtp-port 1025))))

Or use the :custom keyword of use-package:

(use-package mu4easy
  :ensure t
  :bind ("C-c u" . mu4e)
  :config (mu4easy-mode)
  :custom
  (mu4easy-contexts ((mu4easy-context
                      :c-name  "gmx"
                      :maildir "gmx"
                      :mail    "***"
                      :smtp    "mail.gmx.com")
                     
                     (mu4easy-context
                      :c-name    "proton"
                      :maildir   "proton"
                      :mail      "***"
                      :smtp      "127.0.0.1"
                      :smtp-type ssl
                      :smtp-port 1025))))

from mu4easy.

danielfleischer avatar danielfleischer commented on July 17, 2024

Fixed the README thanks to your comment.

from mu4easy.

nameiwillforget avatar nameiwillforget commented on July 17, 2024

Thanks, but it still doesn't work. If I try the following configuration:

(use-package mu4easy
  :ensure t
  :bind ("C-c u" . mu4e)
  :config (mu4easy-mode))

(custom-set-variables '(mu4easy-contexts
                        '((mu4easy-context
                           :c-name  "gmx"
                           :maildir "gmx"
                           :mail    "***"
                           :smtp    "mail.gmx.com")
                          
                          (mu4easy-context
                           :c-name    "proton"
                           :maildir   "proton"
                           :mail      "***"
                           :smtp      "127.0.0.1"
                           :smtp-type ssl
                           :smtp-port 1025))))

and type C-c u, it doesn't start mu4easy-mode, and if I try to start it manually, it says

Wrong number of arguments: (3 . 4), 2

and if I try

(use-package mu4easy
  :ensure t
  :bind ("C-c u" . mu4e)
  :config (mu4easy-mode)
  :custom
  (mu4easy-contexts ((mu4easy-context
                      :c-name  "gmx"
                      :maildir "gmx"
                      :mail    "***"
                      :smtp    "mail.gmx.com")
                     
                     (mu4easy-context
                      :c-name    "proton"
                      :maildir   "proton"
                      :mail      "***"
                      :smtp      "127.0.0.1"
                      :smtp-type ssl
                      :smtp-port 1025))))

and try to start mu4easy-mode, I get

eval: Invalid function: (mu4easy-context :c-name "gmx" :maildir "gmx" :mail "***" :smtp "mail.gmx.com")

Interestingly, if I run mu4easy-update-mail-and-index, it does that. But if I try to change contexts in mu4e, it says no contexts are defined.

from mu4easy.

danielfleischer avatar danielfleischer commented on July 17, 2024

Hi, try to add :demand t to the use-package command (e.g. after the :ensure t); there's some lazy loading here I need to solve. I might modify this in the future, but in the meantime this should fix it.

from mu4easy.

danielfleischer avatar danielfleischer commented on July 17, 2024

Also try this:

(use-package mu4easy
  :ensure t
  :bind ("C-c u" . mu4e)
  :config (mu4easy-mode)
  :custom
  (mu4easy-contexts '((mu4easy-context
                      :c-name  "gmx"
                      :maildir "gmx"
                      :mail    "***"
                      :smtp    "mail.gmx.com")
                     
                     (mu4easy-context
                      :c-name    "proton"
                      :maildir   "proton"
                      :mail      "***"
                      :smtp      "127.0.0.1"
                      :smtp-type ssl
                      :smtp-port 1025))))

from mu4easy.

Related Issues (6)

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.