Skip to content

Conversation

@stardiviner
Copy link

No description provided.

@rougier
Copy link
Owner

rougier commented Aug 31, 2021

Thanks. What is the use case exactly for this function? Would that be possible to update the documentation to show usage?

@johnhamelink
Copy link

I had a look at this PR, as I also wanted a single M-x command. Here's how I used it:

(use-package mu4e-dashboard
  :straight (mu4e-dashboard :type git
 			   :host github
 			   :repo "rougier/mu4e-dashboard")
  :config
  (defcustom jjh/mu4e-dashboard-org-file nil
    "Specify the dashboard.org file path."
    :type 'string
    :safe #'stringp)
  (defun jjh/mu4e-dashboard-open-org ()
    "Open the mu4e-dashboard.org file."
    (interactive)
    (let ((file (or jjh/mu4e-dashboard-org-file load-file-name (buffer-file-name))))
      (with-current-buffer
 	 (find-file file)
        (mu4e-dashboard-mode +1)))))

(setq jjh/mu4e-dashboard-org-file "~/org/mu4e-dashboard.org")

I removed some extra code inside the mu4e-dashboard-open-org function as it seemed unnecessary to load the file.

@rougier
Copy link
Owner

rougier commented Oct 18, 2021

Sorry for late answer. Can't we have a default filename for the mu4e-dashboard-org-file (e.g. mu4e-dashboard.org) and try to load it with mu4e-dashboard-open-org (I would rename it mu4e-dashboard-open) instead of the hardcoded dashboard.org?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants