 ;;; Custom Protocols
 (add-hook 'org-mode-hook
           (lambda ()
-
             (org-add-link-type  "wiki"
                                 #'org-wiki--open-page
                                 #'org-wiki--org-link )
-
             (org-add-link-type  "wiki-asset-sys"
                                 #'org-wiki--protocol-open-assets-with-sys
                                 #'org-wiki--asset-link)))
-
-;; ================= User Commands ================= ;;;
-;;
-;; @SECTION: User commands
-
-
-(defun org-wiki-help ()
-  "Show org-wiki commands."
-  (interactive)
-  (command-apropos "org-wiki-"))
-
-(defun org-wiki-index ()
-  "Open the index page: <org-wiki-location>/index.org.
-
-   The file index.org is created if it doesn't exist."
-  (interactive)
-  (org-wiki--open-page org-wiki-index-file-basename))
-
-(defun org-wiki-html ()
-  "Open the Wiki (Index) in the default web browser."
-
-  (interactive)
-  (browse-url (concat "file://"
-                      (org-wiki--page->html-file
-                       org-wiki-index-file-basename))))
-
-(defun org-wiki-index-frame ()
-  "Open the index page in a new frame."
-  (interactive)
-
-  (with-selected-frame (make-frame)
-    (org-wiki-index)))
-
-
-(defun org-wiki-dired-all ()
-  "Open the wiki directory in ‘dired-mode’ showing all files."
-
-  (interactive)
-  (dired org-wiki-location)
-  (dired-hide-details-mode))
-
-(defun org-wiki-dired ()
-  "Open the wiki directory showing only the wiki pages."
-
-  (interactive)
-  (dired (org-wiki--concat-path org-wiki-location "*.org"))
-  (dired-hide-details-mode))
-
-
-(defun org-wiki-make-page ()
-  "Create a new wiki page."
-  (interactive)
-  (find-file (org-wiki--page->file (read-string "Page Name: "))))
-
 
 (defun org-wiki--helm-selection (callback)
   "Open a helm menu to select the wiki page and invokes the CALLBACK function."

  (\"Abreviations_Slangs.wiki.org\" \"Android.wiki.org\" \"Bash_Script.wiki.org\")"

  (cl-remove-if-not

   (lambda (s)

     (let (
           (b (file-name-base s))
           )

     (not (or
           (string-prefix-p ".#" b)
           (string-suffix-p "~"  b )
           (string-prefix-p "#" b)
           (string-suffix-p "#" b)

           ))))

   (directory-files org-wiki-location abspath ".org")))



  (interactive)

  (mapc (lambda (b)
          (when (and (buffer-file-name b) ;; test if is a buffer associated with file
                     (org-wiki--path-equal
                      org-wiki-location
                      (file-name-directory (buffer-file-name b)))
                       )
              (with-current-buffer b
                (save-buffer)
                (kill-this-buffer)
                )))
          (buffer-list))
  (message "All wiki files closed. Ok."))
  ;;
  ;; End of org-wiki/close
