Commit 94541e4d authored by Antonino's avatar Antonino

made sure that it cannot modify the bdio file

parent 9b593247
......@@ -2,6 +2,7 @@
(require 's)
(defvar bdio-mode-hook nil)
(defvar source-file nil)
(defun bdio--render-file (file)
"Render FILE using lsbdio into current buffer."
......@@ -20,31 +21,23 @@
'bdio-record record)
))))
(defun bdio-open-file ()
"Open .bdio file using lsbdio."
(setq source-file buffer-file-name)
(let ((file (buffer-file-name)))
(when file
(rename-buffer
(format "*BDIO* %s" (file-name-nondirectory file)) t)
;(set-visited-file-name nil t)
(set-visited-file-name nil t)
(bdio-mode)
(bdio--render-file file)
(set-buffer-modified-p nil))))
(defun get-properties ()
(interactive)
(let ((properties (text-properties-at (point))))
(while properties
(print (car properties))
(setq properties (cdr properties)))))
(bdio--render-file file))))
;; (defun bdio-revert-buffer (_ignore-auto _noconfirm)
;; (bdio--render-file buffer-file-name))
(defun bdio-toggle-record ()
"Expand/collapse current record."
(interactive)
(setq bdio-file buffer-file-name)
(setq bdio-file source-file)
(setq lstart (line-beginning-position)
lend (line-end-position)
cpoint (point))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment