Browse Source

Rename variables to projectorg/...

master
Maxime Wack 3 years ago
parent
commit
ca75c3e194
1 changed files with 10 additions and 10 deletions
  1. +10
    -10
      projectorg.el

+ 10
- 10
projectorg.el View File

@@ -28,15 +28,15 @@

;;;; Variables

(defvar projectorg-projects-root ""
(defvar projectorg/projects-root ""
"Where all projects are rooted.

This is the directory where projects are stored.
Can contain subdirectories.
The projectorg-org-dir subdirectory contains the notes file for each project, as well as the general notes files and the projects list file.")
The projectorg/org-dir subdirectory contains the notes file for each project, as well as the general notes files and the projects list file.")

(defvar projectorg-org-dir "org/"
"Directory inside projectorg-projects-root containing the org files.
(defvar projectorg/org-dir "org/"
"Directory inside projectorg/projects-root containing the org files.

Defaults to \"org\"
Contains the general notes files, the projects list files and each project notes file.")
@@ -46,21 +46,21 @@ Contains the general notes files, the projects list files and each project notes
(defun projectorg/project-name ()
"Return the full project name.

It is the result of substracting the projectorg-projects-root string from the beginning of the path of the project, as returned by projectile-project-p."
It is the result of substracting the projectorg/projects-root string from the beginning of the path of the project, as returned by projectile-project-p."
(when (projectile-project-p)
(let ((project-path (projectile-project-p)))
(and
(string= (substring project-path 0 (length projectorg-projects-root))
projectorg-projects-root)
(substring project-path (length projectorg-projects-root) -1)))))
(string= (substring project-path 0 (length projectorg/projects-root))
projectorg/projects-root)
(substring project-path (length projectorg/projects-root) -1)))))

(defun projectorg/notes-file ()
"Returns the notes-file location.

It is an org file, with the same name as the project (including subdirectories), located in the *org* directory in projectorg-projects-root."
It is an org file, with the same name as the project (including subdirectories), located in the *org* directory in projectorg/projects-root."
(let ((project-name (projectorg/project-name)))
(when project-name
(concat projectorg-projects-root "org/" project-name ".org"))))
(concat projectorg/projects-root "org/" project-name ".org"))))

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


Loading…
Cancel
Save