, , , yibe elisp - Emacs -
(defun use-org-mode-for-dot-txt-files-in-owncloud ()
(when (and (string-match owncloud buffer-file-name)
(string-match "\\.txt\\'" buffer-file-name))
(org-mode)))
(add-hook 'find-file-hook 'use-org-mode-for-dot-txt-files-in-owncloud)
Thus, although my own web and mobile phone applications are currently only .txtfile friendly , I can use the Org mode for Emacs from my PC.
(If I installed all the files .txtto use Org-mode, it breaks todotxt-mode.)
(Note that owncloudthis is a string variable equal to my ownCloud path.)
source
share