     ))
 
 
-
 ;;=============== Org-mode custom protocol ===============;;
 ;;
-;; @SECTION: Protocol 
+;; @SECTION: Protocol
 
 (defun org-wiki--org-link (path desc backend)
-  "Creates an html org-wiki pages html exporting."
+  "Creates an html org-wiki pages when  exporting to html.
+Example: The hyperlink [[wiki:Linux][Dealing with Linux]]
+will be exported to <a href='Linux.html'>Dealing with Linux</a>"
    (cl-case backend
      (html (format
             "<a href='%s.html'>%s</a>"
             path
             (or desc path)))))
 
-(defun org-wiki--make-link (org-wiki--page)
-  "returns a string containing a wiki link 'wiki:<name of page>"
-  (format "[[wiki:%s][%s]]" org-wiki--page org-wiki--page)  
+(defun org-wiki--make-link (pagename)
+  "Return a string containing a wiki link [[wiki:PAGENAME][PAGENAME]].
+Example: if PAGENAME is Linux it will return [[wiki:Linux][Linux]]"
+  (format "[[wiki:%s][%s]]" org-wiki--page org-wiki--page)
   )
 
 (defun org-wiki--open-page (pagename)
-  "Opens a org-wiki page by name.
-    
-   Example:  (org-wiki/open-page \"Linux\")
-   Will open the the wiki file Linux.org in 
-   org-wiki-location
-   "
+  "Opens a org-wiki page (PAGENAME) by name.
+ 
+Example:  (org-wiki/open-page \"Linux\")
+Will open the the wiki file Linux.org in
+`org-wiki-location`"
   (find-file  (org-wiki--page->file pagename)))
 
 
 (defun org-wiki--assets-get-file (pagename filename)
-  "Returns a path to an asset file"
+  "Return a path to an asset file FILENAME in given PAGENAME."
   (org-wiki--concat-path (org-wiki--assets-get-dir pagename) filename))
 
 (defun org-wiki--assets-open-file-emacs (pagename filename)
-  "Open an asset file with Emacs"
+  "Open an asset file FILENAME of a PAGENAME with Emacs.
+
+Example: (org-wiki--assets-open-file-emacs \"Python\" \"example1.py\")
+It will open the file <wiki path>/Python/example1.py related to the page Python.org."
   (find-file  (org-wiki--assets-get-file pagename filename)))
 
 
 (defun org-wiki-xdg-open (filename)
-  "Opens a file with default system application.
-   This function is operating system independent. 
-  "
+  "Open a file FILENAME with default system application.
+This function is operating system independent."
   (cl-case system-type
 
-    ;;; Linux 
+    ;;; Linux
     (gnu/linux      (let ((process-connection-type  nil))
 
                       (start-process


(defgroup org-wiki nil
  "Org-wiki Settings"
  :group 'tools   
  )

(defcustom org-wiki-location "~/org/wiki"
  "Org-wiki directory where all wiki pages files *.org are stored. 
   Default value ~/org/wiki."
  :type 'directory
  :group 'org-wiki 
  )

(setq org-wiki-index-file-basename "index")



(defun org-wiki--assets-buffer-make-dir ()
  "Create asset directory of current buffer page if it doesn't exit."

  (if (org-wiki--buffer-file-in-wiki-p)

      (progn
        (org-wiki--assets-make-dir
         (file-name-base (buffer-file-name)))
        )
