   )
 
 
-(setq org-wiki-index-file-basename "index")
+(defvar org-wiki-index-file-basename "index")
 
 ;; ------- Internal functions ------------ ;;
 ;; @SECTION: Internal functionsq

(defun org-wiki-close ()
  "Close all opened wiki pages buffer and save them."
  (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

(defun org-wiki-insert ()
  "Insert a Wiki Page link at point."

        ))
    (reverse result)))

(defun org-wiki--get-buffers ()
  "Return all org-wiki page buffers (.org) files in `org-wiki-location`."
 (remove-if-not (lambda (p)
                 (let* ((fp (buffer-file-name p))
                        (fpath (if fp (expand-file-name fp) nil))
                        )
                         ;; path test if file exists (if fpath not nil)
                   (and  fpath
                         ;; test if buffer file is in wiki location 
                         (string-prefix-p (expand-file-name org-wiki-location) fpath)
                         ;; test if buffer file has extension .org 
                         (string-suffix-p ".org" fpath)
                    )))
               (buffer-list)))

(defun org-wiki--normalize-path (path)
  "Replace double slashes for a single slash and remove slash at the end of a PATH."
