Browse Source

Migrate from dotfiles

master
Maxime Wack 4 years ago
parent
commit
c771c6cf9f
2 changed files with 56 additions and 3 deletions
  1. +29
    -1
      notes.org
  2. +27
    -2
      projectorg.el

+ 29
- 1
notes.org View File

@@ -1,6 +1,34 @@
#+ARCHIVE: ::* Archive
* Tasks

** Projectorg
*** TODO Remove project from knowns when no buffer left from this project
:PROPERTIES:
:ID: 68add890-1a73-4a3a-baf2-d8c27db1f5f0
:END:
*** TODO Don't trigger when the filed being opened is notes.org
:PROPERTIES:
:ID: 3b4a27ac-9672-4316-895f-bf98b5c08749
:END:
Might need an advice
[[file:~/Projects/dotfiles/.emacs::(defun%20projectorg/add-to-project-list%20()]]
*** TODO Create function for new project
:PROPERTIES:
:ID: 694fb35c-19d5-4974-bc54-e3a764187b8f
:END:
* Notes

* Archive

** DONE Isolate functions in package
:PROPERTIES:
:ID: 0473bffe-dd5f-4d2f-8eea-b0438c604dc4
:ARCHIVE_TIME: 2019-09-28 Sat 22:09
:ARCHIVE_FILE: ~/Projects/projectorg/notes.org
:ARCHIVE_OLPATH: Tasks/Projectorg
:ARCHIVE_CATEGORY: notes
:ARCHIVE_TODO: DONE
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2019-09-28 Sat 22:09]
:END:
Create it as new project ;-)

+ 27
- 2
projectorg.el View File

@@ -1,4 +1,4 @@
;;; projectorg.el --- __DESCRIPTION__
;;; projectorg.el ---

;; Copyright (C) 2019 Maxime Wack

@@ -22,10 +22,35 @@

;;; Commentary:

;; __DESCRIPTION__
;; Project management using org, projectile and skeletor

;;; Code:

(defun projectorg/go-to-inbox ()
"Go to org-default-notes-file"
(interactive)
(find-file org-default-notes-file))

(defun projectorg/go-to-notes ()
"Go to notes.org if it exists at the root of a project, org go to default notes file"
(interactive)
(let ((notes-file (concat (projectile-project-p) "notes.org")))
(if (or (and (eq projectile-require-project-root 'prompt)
(not (projectile-project-p)))
(not (file-exists-p notes-file)))
(projectorg/go-to-inbox)
(find-file notes-file))))

(defun projectorg/add-to-project-list ()
(let ((notes-file (concat (projectile-project-p) "notes.org")))
(unless (or (and (eq projectile-require-project-root 'prompt)
(not (projectile-project-p)))
(not (file-exists-p notes-file)))
(projectile-add-known-project (projectile-project-p)))))

(defun projectorg/remove-from-project-list ()
(let ((current-project (projectile-project-name)))
(message current-project)) )


(provide 'projectorg)


Loading…
Cancel
Save