Chobbes / org-chef

A package for making a cookbook and managing recipes with org-mode.
MIT License
327 stars 33 forks source link

Feature request: insert recipes manually #18

Closed Haridasi closed 5 years ago

Haridasi commented 5 years ago

Is there a way to insert recipes without an url?

Chobbes commented 5 years ago

Currently no! How would you want such a feature to look? I just manually type such entries in, and I'm not sure how to make that much more convenient.

You could of course set up a capture template which has all of the sections that you want as well. That might be the best option. I'd be happy to include a snippet of that in the README if you set that up!

Haridasi commented 5 years ago

My suggestion is a new capture template that asks for title and then fills this out, ready to be filled at my convenience :)

** Directions

1.

Chobbes commented 5 years ago

I can add this to the README.

This does bring up another issue that I've been wondering about --- should we have an easy way to enable the capture templates? What would that look like?

Haridasi commented 5 years ago

I have only about 6 months of experience with emacs, but my impression is that there really are only two options. Either some manual init.el editing or it has to be done using keyboard shortcuts as input methods for activating a feature (where you would have to create a function to manually insert that line into init.el).

Come to think of it - it would have been nice if there were some org-mode library functions that eased the coding like a insert_capture_template(my args) that had eased the whole configuration aspect. But now I'm just musing - this is way beyond the scope of this issue.

Chobbes commented 5 years ago

Yeah, I think I could provide the capture templates in variables or something, but I think people would likely modify them anyway? Doesn't save too much, but maybe I should make an issue of it.

Chobbes commented 5 years ago

Something like this should tide you over?

      ("m" "Manual Cookbook" entry (file "~/org/cookbook.org")
       "* %^{Recipe title: }\n  :PROPERTIES:\n  :source-url:\n  :servings:\n  :prep-time:\n  :cook-time:\n  :ready-in:\n  :END:\n** Ingredients\n   %?\n** Directions\n\n")
Chobbes commented 5 years ago

README is updated with it, hope that helps!

Haridasi commented 5 years ago

Just got a chance to test it. Thank you! Works wonderfully and I'm grateful for the feature added :)