Project management with org, projectile and skeletor
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.9KB

  1. ;;; projectorg.el ---
  2. ;; Copyright (C) 2019 Maxime Wack
  3. ;; Author: Maxime Wack <maximewack@free.fr>
  4. ;; Version: 0.1
  5. ;; This file is not part of GNU Emacs.
  6. ;; This program is free software: you can redistribute it and/or modify
  7. ;; it under the terms of the GNU General Public License as published by
  8. ;; the Free Software Foundation, either version 3 of the License, or
  9. ;; (at your option) any later version.
  10. ;; This program is distributed in the hope that it will be useful,
  11. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ;; GNU General Public License for more details.
  14. ;; You should have received a copy of the GNU General Public License
  15. ;; along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. ;;; Commentary:
  17. ;; Project management using org, projectile and skeletor
  18. ;;; Code:
  19. (defun projectorg/go-to-inbox ()
  20. "Go to org-default-notes-file"
  21. (interactive)
  22. (find-file org-default-notes-file))
  23. (defun projectorg/go-to-notes ()
  24. "Go to notes.org if it exists at the root of a project, org go to default notes file"
  25. (interactive)
  26. (let ((notes-file (concat (projectile-project-p) "notes.org")))
  27. (if (or (and (eq projectile-require-project-root 'prompt)
  28. (not (projectile-project-p)))
  29. (not (file-exists-p notes-file)))
  30. (projectorg/go-to-inbox)
  31. (find-file notes-file))))
  32. (defun projectorg/add-to-project-list ()
  33. (let ((notes-file (concat (projectile-project-p) "notes.org")))
  34. (unless (or (and (eq projectile-require-project-root 'prompt)
  35. (not (projectile-project-p)))
  36. (not (file-exists-p notes-file)))
  37. (projectile-add-known-project (projectile-project-p)))))
  38. (defun projectorg/remove-from-project-list ()
  39. (let ((current-project (projectile-project-name)))
  40. (message current-project)) )
  41. (provide 'projectorg)
  42. ;;; projectorg.el ends here