emacs-calfw icon indicating copy to clipboard operation
emacs-calfw copied to clipboard

No luck with straight, nor with apt

Open jaromrax opened this issue 4 years ago • 5 comments

Hi, I tried straight-use-package with calfw, calfw-cal, calfw-org in this order and I was only able to see a basic calendar. No org stuff, nothing, no way to get an event displayed in it. I tried apt install emacs-calfw, which crashes on Ubuntu 20.04.

Is the project still alive? Jaro

jaromrax avatar Feb 18 '21 16:02 jaromrax

(require 'calfw-org)

See https://github.com/kiwanami/emacs-calfw#general-setting

Also how did you configure your straight recipe? Mine is:

(use-package calfw
  :straight (:host github :repo "kiwanami/emacs-calfw")
  :config
  (with-eval-after-load 'calfw
	(use-package calfw-ical
	  :straight (:host github :repo "kiwanami/emacs-calfw"))
	(use-package calfw-org
	  :straight (:host github :repo "kiwanami/emacs-calfw"))
	(use-package calfw-cal
	  :straight (:host github :repo "kiwanami/emacs-calfw"))))

Of course because I use use-package I don't need explicitly write (require 'calfw-org)

ghost avatar Mar 08 '21 12:03 ghost

straight.el has a :file keyword for which you can specify which file(s) get simlinked to build folder. In this case, I use

  (use-package calfw
    :straight (:host github :repo "kiwanami/emacs-calfw" :files ("calfw-org.el" "calfw.el"))

feel free to add calfw-cal and calfw-ical in the :files list to suit your need.

junyi-hou avatar Apr 23 '21 03:04 junyi-hou

@junyi-hou , hijacking this thread. Could you please talk generally about the benefits and consequences of symlinking files into the build folder. Does that relate to / make it unnecessary to (require 'foo) ? I did try and investigate for myself but these keywords are fairly Google-proof.

jasonhemann avatar Jun 10 '21 16:06 jasonhemann

@junyi-hou , hijacking this thread. Could you please talk generally about the benefits and consequences of symlinking files into the build folder. Does that relate to / make it unnecessary to (require 'foo) ? I did try and investigate for myself but these keywords are fairly Google-proof.

well its just how straight.el works. straight.el will symlink files from the repo folder to build folder, so that it can split packages that in the same repo into different folder. Take ivy, swiper, counsel for example, they are different package but in the same github repo. The symlinks is provided by the recipes from melpa, elpa and emacsmirror but striaght.el allows you to override them.

The build folders then added to emacs load-path by straight.el so that you can require it. straight.el will build autoloads for you, so if the package have properly used autoloads you shouldn't have to (require 'foo).

ghost avatar Jun 10 '21 16:06 ghost

Thank you @pRot0ta1p. I find that for several I still need to manually require pieces, so maybe I will have to look at their use of autoloads.

jasonhemann avatar Jun 15 '21 15:06 jasonhemann