diff --git a/README.rst b/README.rst index 0269b23..71bba34 100644 --- a/README.rst +++ b/README.rst @@ -92,77 +92,3 @@ Caveats reports and code contributions are very welcome, and may help with coming up with a more complete solution for integrating features with Purpose. - - -TODO List -========= - -Here are listed tasks that should be completed in the future. You are -welcome to contribute and complete any of the tasks below. The marks -[#A], [#B] and [#C] note the importance of a task. - -Version 1.0 Requirements ------------------------- - -Version 1.0 will not be considered ready until these tasks are -completed. - -- [DONE] [#A] implement function pu:find-file - -- [DONE] [#A] regexp support for purpose detection (implement - pu:buffer-purpose-name-regexp) - -- [DONE] [#B] prefix-overload (overload commands on same key, with different - prefix arguments) - -- [#B] make pu:load-layout and pu:save-layout prompt for filename when - called interactively - -- [DONE] [#B] set good key-bindings for Purpose's commands - -Not Version-Specific --------------------- - -Tasks that should be done, but not necessarily for a specific version. - -- [DONE] [#C] display window purpose in modeline - -- [#A] frame support: design and write frame-related behavior and code - -- [#A] consider smarter function-call decision in pu:action-function - - Which function to use, and how to call it (pu:switch-buffer, - pu:pop-buffer). Pending more usage-experience, suggestions and - bug-reports. - -- [#B] pu:switch-buffer-with-same-purpose - - Like pu:switch-buffer, but choice is limited to buffers with the same - purpose as the current buffer. - -- [#B] make prompts better (more like IDO, more feature-rich) - Currently, the prompts of Purpose's commands don't have as much - features as IDO prompts have. Maybe there is a way to get all of the - IDO's benefits, and not only its nice completion. - -- [#B] automatic tests - -- [#B] adapt variables for customize - -- [#B] add Purpose to a package repository (MELPA?) - -- [MAYBE] [#C] improve/change default configuration - -- [#C] refactor code (make it nicer and better) - - This task doesn't really have an end. - -- [MAYBE] [#C] add function delete-non-dedicated-windows - -Integration With Other Features -------------------------------- - -A list of features which need to be integrated with Purpose. This list is expected -to grow, might become a check-list of sorts. - -- diff --git a/pu-configuration.el b/pu-configuration.el index 91a13f0..b7ae2b1 100644 --- a/pu-configuration.el +++ b/pu-configuration.el @@ -2,7 +2,7 @@ ;; Author: Bar Magal (2015) ;; Package: purpose -;; Version: 0.1.2 +;; Version: 1.0 ;;; Commentary: ;; This file contains functions for changing Purpose's configuration. diff --git a/pu-core.el b/pu-core.el index 579592c..ca24577 100644 --- a/pu-core.el +++ b/pu-core.el @@ -2,7 +2,7 @@ ;; Author: Bar Magal (2015) ;; Package: purpose -;; Version: 0.1.2 +;; Version: 1.0 ;;; Commentary: ;; This file contains core functions to be used by other parts of @@ -15,6 +15,8 @@ (defvar default-purpose 'general "The default purpose for buffers which didn't get another purpose.") +(defconst pu:version "1.0" + "Purpose's version.") ;;; utilities diff --git a/pu-layout.el b/pu-layout.el index c0aaffa..c26ef09 100644 --- a/pu-layout.el +++ b/pu-layout.el @@ -2,7 +2,7 @@ ;; Author: Bar Magal (2015) ;; Package: purpose -;; Version: 0.1.2 +;; Version: 1.0 ;;; Commentary: ;; This file contains function for saving and loading the entire window @@ -195,23 +195,27 @@ The height is never given in pixels, but in text size (pu:set-window-properties layout) (pu:set-layout-1 layout (selected-window)))) -;;TODO: when called interactively, prompt for filename with default (defun pu:save-layout (&optional filename) "Save current layout to file FILENAME. If FILENAME is nil, use `pu:default-layout-file' instead." - (interactive) - ;;(interactive "[PU] Save layout to file: " nil pu:default-layout-file) + (interactive + (list (read-file-name "[PU] Save layout to file: " + (file-name-directory pu:default-layout-file) + nil nil + (file-name-nondirectory pu:default-layout-file)))) (with-temp-file (or filename pu:default-layout-file) ;; "%S" - print as S-expression - this allows us to read the value with ;; `read' later in `pu:load-layout' (insert (format "%S" (pu:get-layout))))) -;;TODO: when called interactively, prompt for filename with default (defun pu:load-layout (&optional filename) "Load layout from file FILENAME. If FILENAME is nil, use `pu:default-layout-file' instead." - (interactive) - ;;(interactive "[PU] Load layout from file: " nil pu:default-layout-file) + (interactive + (list (read-file-name "[PU] Load layout from file: " + (file-name-directory pu:default-layout-file) + nil nil + (file-name-nondirectory pu:default-layout-file)))) (pu:set-layout (with-temp-buffer (insert-file-contents (or filename pu:default-layout-file)) diff --git a/pu-prefix-overload.el b/pu-prefix-overload.el index ffa12ec..afe5af6 100644 --- a/pu-prefix-overload.el +++ b/pu-prefix-overload.el @@ -2,7 +2,7 @@ ;; Author: Bar Magal (2015) ;; Package: purpose -;; Version: 0.1.2 +;; Version: 1.0 ;;; Commentary: ;; This file contains functions and macros for using the same diff --git a/pu-switch.el b/pu-switch.el index 49a5f1a..ff0c09c 100644 --- a/pu-switch.el +++ b/pu-switch.el @@ -2,7 +2,7 @@ ;; Author: Bar Magal (2015) ;; Package: purpose -;; Version: 0.1.2 +;; Version: 1.0 ;;; Commentary: ;; This file contains functions for switching buffers in a way that diff --git a/purpose.el b/purpose.el index bde29a3..a37ac56 100644 --- a/purpose.el +++ b/purpose.el @@ -2,7 +2,7 @@ ;; Author: Bar Magal (2015) ;; Package: purpose -;; Version: 0.1.2 +;; Version: 1.0 ;;; Commentary: @@ -105,9 +105,7 @@ ;; "C-x k") (define-key map (kbd "C-x j") #'quit-window) - ;; We use "C-c ," for compatibility with key-binding conventions and - ;; because its the same as Emacs plugin E2WM, which probably won't - ;; be used together with Purpose + ;; We use "C-c ," for compatibility with key-binding conventions (define-key map (kbd "C-c ,") #'purpose-mode-prefix-map) (define-prefix-command 'purpose-mode-prefix-map) (define-key purpose-mode-prefix-map (kbd "o") #'pu:switch-buffer) diff --git a/todo.org b/todo.org deleted file mode 100644 index b5fef7b..0000000 --- a/todo.org +++ /dev/null @@ -1,28 +0,0 @@ -* Version 1.0 Requirements -Version 1.0 will not be considered ready until these tasks are completed -** DONE [#A] implement function pu:find-file :UI:API: -** DONE [#A] regexp support for purpose detection (implement pu:buffer-purpose-name-regexp) :internal: -** DONE [#B] prefix-overload (overload commands on same key, with different prefix arguments) :UI:API:internal: -** TODO [#B] make pu:load-layout and pu:save-layout prompt for filename when called interactively :UI: -** DONE [#B] set good key-bindings for Purpose's commands -* Not Version-Related -Tasks that should be done, but not necessarily for a specific version. -** DONE [#C] display window purpose in modeline :UI: -** TODO [#A] frame support: design and write frame-related behavior and code :UI:API:internal: -** [#A] consider smarter function-call decision in pu:action-function -Which function to use, and how to call it (pu:switch-buffer, pu:pop-buffer). -Pending more usage-experience, suggestions and bug-reports. -** TODO [#B] pu:switch-buffer-with-same-purpose :UI: -Like pu:switch-buffer, but choice is limited to buffers with the same -purpose as the current buffer. -** TODO [#B] make prompts better (more like IDO, more feature-rich) :UI: -Currently, the prompts of Purpose's commands don't have as much -features as IDO prompts have. Maybe there is a way to get all of the -IDO's benefits, and not only its nice completion. -** TODO [#B] automatic tests -** TODO [#B] adapt variables for customize :UI: -** TODO [#B] add to package repository (MELPA?) -** [#C] [MAYBE] improve/change default configuration :UI:API: -** [#C] refactor code (make it nicer and better) :endless: -** [#C] [MAYBE] add function delete-non-dedicated-windows -* Integration and fixes for working with other features (e.g. Dired) :endless: