Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 13 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
Commits on Sep 14, 2012
@rakete prevent zeitgeist events in various locations
when opening project files or defining projects in .org files I don't
want to trigger zeitgeist events (they are slow and don't make sense for
automatically triggered file actions in my opinion)
7562a3a
@rakete remove friends-only argument from mk-proj-friendly-buffers
behave like the name says and only return friends

to get all project buffers + friends mk-proj-buffers and
mk-proj-friendly-buffers should be used to together
8fb1c10
@rakete fix for startup/shutdown hooks not getting run correctly
I broke project startup/shutdown hooks by getting rid of project vars,
turns out run-hooks needs a symbol and can't just use a list of function
symbols as argument

so now instead of run-hooks I just mapc funcall on the list
697b860
@rakete remove duplicate open filenames before saving them
e3385aa
@rakete fix for cache path not getting evaluated correctly
not only look up cache path in parent project, but also run
mk-proj-get-cache-path with parent as argument to evaluate any
non-existing cache path project variables in parent
a988619
@rakete make project-def evaluate org project at point
when run interactivly without proj-name parameter and while looking at a
org headline, project-def will try to define a project from the headline
at point
66b8556
@rakete fix project inheritance not working when project already defined
in mk-proj-eval-alist change alist construction so that looking up
project vars in parent comes before trying to union with any already
existing projects
8a9f07a
@rakete fix mk-proj-fib-cb not receiving correct proj-name
9bb2a2e
@rakete fix anything and helm still using friends-only argument
644c77e
@rakete save all buffers sourcemarker before unloading project, also writes db
bf16dff
@rakete change header module description
2ef586b
@rakete only load sourcemarker db from file if it does not already exists as …
…symbol
31a33fe
@rakete remove some whitespaces and some old commented debug statement
9665a46
View
2  mk-project-anything.el
@@ -126,7 +126,7 @@ The behaviour of this command is modified with
(defvar anything-c-source-mk-project-open-friendly-buffers
'((name . "Mk-Project friendly buffers")
(candidates . (lambda () (mapcar 'buffer-name (condition-case nil
- (mk-proj-friendly-buffers nil t)
+ (mk-proj-friendly-buffers nil)
(error nil)))))
(type . buffer)
(candidate-transformer anything-c-skip-current-buffer
View
2  mk-project-helm.el
@@ -149,7 +149,7 @@
(defvar helm-c-source-mk-project-open-friendly-buffers
`((name . "Mk-Project friendly buffers")
(candidates . (lambda () (mapcar 'buffer-name (condition-case nil
- (mk-proj-friendly-buffers nil t)
+ (mk-proj-friendly-buffers nil)
(error nil)))))
(type . buffer)
(match helm-c-buffer-match-major-mode)
View
20 mk-project-orgmode.el
@@ -55,10 +55,10 @@ a single org file is stored in the projects basedir.")
'(progn
(add-to-list 'mk-proj-optional-vars 'org-file)
(add-to-list 'mk-proj-optional-vars 'org-headline)
-
+
(add-to-list 'mk-proj-internal-vars 'org-file)
(add-to-list 'mk-proj-internal-vars 'org-headline)
-
+
(add-hook 'org-clock-in-hook (lambda ()
(when (and (mk-org-entry-is-in-project-p)
(or (not (boundp 'mk-proj-name))
@@ -258,7 +258,6 @@ will be used internally. You can specify a MATCH to be used in that case with:
(progn (mk-org-assert-org) `(,(mk-proj-get-config-val 'org-file))))
(t
(mk-org-files-containing-projects)))))
-
(with-current-buffer (or (when (buffer-live-p project-file) project-file)
(org-find-base-buffer-visiting project-file)
(if (file-exists-p project-file)
@@ -1197,13 +1196,14 @@ This is taken almost directly from `org-babel-read'."
(mk-proj-assert-proj)
(setq proj-name mk-proj-name))
(mk-org-assert-org proj-name)
- (mk-org-map-entries
- :file (mk-proj-get-config-val 'org-file proj-name)
- :match `(headline ,(mk-proj-get-config-val 'org-headline proj-name))
- :scope 'project-headline
- :function (lambda ()
- (org-clock-in)
- )))
+ (let ((zeitgeist-prevent-send t))
+ (mk-org-map-entries
+ :file (mk-proj-get-config-val 'org-file proj-name)
+ :match `(headline ,(mk-proj-get-config-val 'org-headline proj-name))
+ :scope 'project-headline
+ :function (lambda ()
+ (org-clock-in)
+ ))))
(defun project-clock-out (&optional proj-name)
(interactive)
View
75 mk-project-sourcemarker.el
@@ -1,4 +1,4 @@
-;;; mk-project-sourcemarker.el --- Org-Mode integration for mk-project
+;;; mk-project-sourcemarker.el --- Sourcemarker for mk-project.
;; Copyright (C) 2011 Andreas Raster <lazor at affenbande dot org>
;;
@@ -52,7 +52,8 @@
(add-hook 'mk-proj-before-files-load-hook 'mk-sourcemarker-load-project-db)
(add-hook 'mk-proj-after-load-hook 'mk-sourcemarker-display-most-recent-buffer)
- (add-hook 'mk-proj-before-files-unload-hook 'mk-sourcemarker-write-project-db)))
+ (add-hook 'mk-proj-before-files-unload-hook 'mk-sourcemarker-save-all)
+ ))
(defmacro mk-sourcemarker-with-project-db (&rest body)
`(if mk-sourcemarker-per-project-db
@@ -71,8 +72,10 @@
(defun mk-sourcemarker-load-project-db ()
(interactive)
(mk-proj-assert-proj)
- (mk-sourcemarker-with-project-db
- (continue-load-db)))
+ (unless (intern-soft (mk-proj-get-config-val 'sourcemarker-db-symbol))
+ (mk-sourcemarker-with-project-db
+ (message "loading project db: %s" continue-db-symbol)
+ (continue-load-db))))
(defun mk-sourcemarker-write-project-db ()
(interactive)
@@ -83,36 +86,64 @@
(defun mk-sourcemarker-restore ()
(interactive)
(if (or (condition-case nil (mk-proj-assert-proj) (error t))
- (not (mk-proj-buffer-p (current-buffer)))
+ (not (or (mk-proj-buffer-p (current-buffer))
+ (mk-proj-friendly-buffer-p (current-buffer))))
(not (mk-sourcemarker-with-project-db (gethash (buffer-file-name (current-buffer)) (symbol-value (intern continue-db-symbol))))))
(continue-restore)
(mk-sourcemarker-with-project-db
(continue-restore))))
-(defun mk-sourcemarker-save ()
+(defun mk-sourcemarker-save (&optional keep-timestamp)
(interactive)
(if (or (condition-case nil (mk-proj-assert-proj) (error t))
- (not (mk-proj-buffer-p (current-buffer))))
+ (not (or (mk-proj-buffer-p (current-buffer))
+ (mk-proj-friendly-buffer-p (current-buffer)))))
(continue-save)
(mk-sourcemarker-with-project-db
- (continue-save))))
+ (continue-save))))
+
+(defun mk-sourcemarker-save-all ()
+ (interactive)
+ (let* ((results '())
+ (sorted-buffers (dolist (buf (append (mk-proj-buffers) (mk-proj-friendly-buffers))
+ (sort results (lambda (a b) (< (car a) (car b)))))
+ (when (buffer-file-name buf)
+ (when (eq buf (current-buffer))
+ (mk-sourcemarker-save))
+ (mk-sourcemarker-with-project-db
+ (let* ((filename (buffer-file-name buf))
+ (sm (if (mk-sourcemarker-with-project-db
+ (gethash filename (symbol-value (intern continue-db-symbol))))
+ (mk-sourcemarker-with-project-db
+ (gethash filename (symbol-value (intern-soft continue-db-symbol)) nil))
+ (gethash filename (symbol-value (intern-soft continue-db-symbol)) nil)))
+ (timestamp (and sm (read (cdr (assoc :timestamp sm))))))
+ (if timestamp
+ (add-to-list 'results `(,timestamp . ,buf))
+ (add-to-list 'results `(-1 . ,buf)))))))))
+ (print sorted-buffers)
+ (dolist (tuple sorted-buffers)
+ (with-current-buffer (cdr tuple)
+ (mk-sourcemarker-save)))
+ (mk-sourcemarker-write-project-db)))
(defun mk-sourcemarker-display-most-recent-buffer ()
(mk-proj-assert-proj)
- (let ((buffer (let ((results '()))
- (dolist (buf (mk-proj-buffers) (cdar (sort results (lambda (a b) (> (car a) (car b))))))
- (when (buffer-file-name buf)
- (mk-sourcemarker-with-project-db
- (let* ((filename (buffer-file-name buf))
- (sm (if (or (not (mk-proj-buffer-p (find-buffer-visiting filename)))
- (not (mk-sourcemarker-with-project-db
- (gethash filename (symbol-value (intern continue-db-symbol))))))
- (gethash filename (symbol-value (intern-soft global-db-symbol)) nil)
- (gethash filename (symbol-value (intern-soft continue-db-symbol)) nil)))
- (timestamp (and sm (read (cdr (assoc :timestamp sm))))))
- (when timestamp
- (add-to-list 'results
- `(,timestamp . ,buf))))))))))
+ (let* ((results '())
+ (buffer (dolist (buf (append (mk-proj-buffers) (mk-proj-friendly-buffers)) (cdar (sort results (lambda (a b) (> (car a) (car b))))))
+ (when (buffer-file-name buf)
+ (mk-sourcemarker-with-project-db
+ (let* ((filename (buffer-file-name buf))
+ (sm (if (or (not (or (mk-proj-buffer-p (find-buffer-visiting filename))
+ (mk-proj-friendly-buffer-p (find-buffer-visiting filename))))
+ (not (mk-sourcemarker-with-project-db
+ (gethash filename (symbol-value (intern continue-db-symbol))))))
+ (gethash filename (symbol-value (intern-soft global-db-symbol)) nil)
+ (gethash filename (symbol-value (intern-soft continue-db-symbol)) nil)))
+ (timestamp (and sm (read (cdr (assoc :timestamp sm))))))
+ (when timestamp
+ (add-to-list 'results
+ `(,timestamp . ,buf)))))))))
(let ((display-buffer-reuse-frames t))
(unless (or (mk-proj-file-buffer-p (current-buffer))
(mk-proj-friendly-file-buffer-p (current-buffer)))
View
142 mk-project.el
@@ -634,13 +634,13 @@ for the KEY and the first value that is found is returned."
(value (condition-case nil (eval lisp) (error lisp))))
(unless (eq key 'name)
(add-to-list 'evaluated-config-alist `(,key ,value)))))))
- (when (gethash proj-name mk-proj-list)
- (message "union with %s" proj-name)
- (setq result-alist (mk-proj-alist-union (gethash proj-name mk-proj-list) result-alist)))
(when (cadr (assoc 'parent result-alist))
(message "%s inherits from %s" proj-name (cadr (assoc 'parent result-alist)))
(setq result-alist (mk-proj-alist-union (gethash (cadr (assoc 'parent result-alist)) mk-proj-list)
result-alist)))
+ (when (gethash proj-name mk-proj-list)
+ (message "union with %s" proj-name)
+ (setq result-alist (mk-proj-alist-union (gethash proj-name mk-proj-list) result-alist)))
(loop for req-var in mk-proj-required-vars
if (or (and (assoc req-var result-alist)
(not (cadr (assoc req-var result-alist)))))
@@ -648,7 +648,7 @@ for the KEY and the first value that is found is returned."
(return-from "mk-proj-eval-alist" nil)))
result-alist))
-(defun* project-def (proj-name &optional config-alist)
+(defun* project-def (&optional proj-name config-alist)
"Associate the settings in CONFIG-ALIST with project PROJ-NAME.
All values within CONFIG-ALIST will be evaluated when they look
@@ -754,11 +754,17 @@ the function will be the symbol \"'index\".
If non-null (or if the function returns non-null), the custom
find command will be used and the `mk-proj-ignore-patterns' and
`mk-proj-vcs' settings are not used when in the grep command."
- (let ((alist (mk-proj-eval-alist proj-name config-alist)))
- (when alist
- (puthash proj-name alist mk-proj-list)
- (message "Defined: %s" proj-name)
- alist)))
+ (interactive)
+ (cond ((stringp proj-name)
+ (let ((alist (mk-proj-eval-alist proj-name config-alist)))
+ (when alist
+ (puthash proj-name alist mk-proj-list)
+ (message "Defined: %s" proj-name)
+ alist)))
+ ((and (functionp 'mk-org-entry-define-project)
+ (org-mode-p)
+ (looking-at org-complex-heading-regexp)
+ (mk-org-entry-define-project)))))
@@ -1467,7 +1473,8 @@ See also `mk-proj-config-save-section', `mk-proj-config-save-section'"
(cond ((file-exists-p r)
r)
((and (mk-proj-get-config-val 'parent proj-name)
- (file-exists-p (mk-proj-get-config-val symbol (mk-proj-get-config-val 'parent proj-name))))
+ (file-exists-p (or (mk-proj-get-config-val symbol (mk-proj-get-config-val 'parent proj-name))
+ (mk-proj-get-cache-path symbol (mk-proj-get-config-val 'parent proj-name)))))
(progn
(copy-file (mk-proj-get-cache-path symbol (mk-proj-get-config-val 'parent proj-name))
r)
@@ -1519,7 +1526,7 @@ See also `mk-proj-config-save-section', `mk-proj-config-save-section'"
(when (mk-proj-get-config-val 'startup-hook)
(if (functionp (mk-proj-get-config-val 'startup-hook))
(funcall (mk-proj-get-config-val 'startup-hook))
- (run-hooks (mk-proj-get-config-val 'startup-hook))))
+ (mapc 'funcall (mk-proj-get-config-val 'startup-hook))))
(run-hooks 'mk-proj-before-files-load-hook)
(mk-proj-visit-saved-open-files)
(mk-proj-visit-saved-open-friends)
@@ -1579,7 +1586,7 @@ See also `mk-proj-config-save-section', `mk-proj-config-save-section'"
(when (mk-proj-get-config-val 'shutdown-hook)
(if (functionp (mk-proj-get-config-val 'shutdown-hook))
(funcall (mk-proj-get-config-val 'shutdown-hook))
- (run-hooks (mk-proj-get-config-val 'shutdown-hook))))
+ (mapc 'funcall (mk-proj-get-config-val 'shutdown-hook))))
(run-hooks 'mk-proj-project-unload-hook)
(run-hooks 'mk-proj-after-unload-hook))
(error nil)))
@@ -1692,7 +1699,7 @@ See also `mk-proj-config-save-section', `mk-proj-config-save-section'"
"Write the list of `files' to a file"
(when (mk-proj-get-config-val 'open-files-cache)
(with-temp-buffer
- (dolist (f (mapcar (lambda (b) (mk-proj-buffer-name b)) (mk-proj-buffers)))
+ (dolist (f (remove-duplicates (mapcar (lambda (b) (mk-proj-buffer-name b)) (mk-proj-buffers)) :test 'string-equal))
(when f
(unless (string-equal (mk-proj-get-config-val 'tags-file) f)
(insert f "\n"))))
@@ -1731,15 +1738,19 @@ See also `mk-proj-config-save-section', `mk-proj-config-save-section'"
(mk-proj-tags-clear)
(setq tags-file-name (mk-proj-get-config-val 'tags-file)
tags-table-list nil)
- (when (and (mk-proj-get-config-val 'tags-file) (file-readable-p (mk-proj-get-config-val 'tags-file)))
- (visit-tags-table (mk-proj-get-config-val 'tags-file))))
+ (when (and (mk-proj-get-config-val 'tags-file)
+ (file-readable-p (mk-proj-get-config-val 'tags-file)))
+ (let ((zeitgeist-prevent-send t))
+ (visit-tags-table (mk-proj-get-config-val 'tags-file)))))
(defun mk-proj-tags-clear ()
"Clear the TAGS file (if tags-file set)"
- (when (and (mk-proj-get-config-val 'tags-file) (get-file-buffer (mk-proj-get-config-val 'tags-file)))
- (mk-proj-maybe-kill-buffer (get-file-buffer (mk-proj-get-config-val 'tags-file))))
- (setq tags-file-name nil
- tags-table-list nil))
+ (let ((zeitgeist-prevent-send t))
+ (when (and (mk-proj-get-config-val 'tags-file)
+ (get-file-buffer (mk-proj-get-config-val 'tags-file)))
+ (mk-proj-maybe-kill-buffer (get-file-buffer (mk-proj-get-config-val 'tags-file))))
+ (setq tags-file-name nil
+ tags-table-list nil)))
(defun mk-proj-etags-cb (process event)
"Visit tags table when the etags process finishes."
@@ -1922,11 +1933,12 @@ With C-u prefix act as `project-ack-with-friends'."
"Either load the *file-index* buffer from the file cache, or create it afresh."
(if (and (mk-proj-get-config-val 'file-list-cache proj-name t)
(file-readable-p (mk-proj-get-config-val 'file-list-cache proj-name t)))
- (with-current-buffer (find-file-noselect (mk-proj-get-config-val 'file-list-cache proj-name t))
+ (let ((zeitgeist-prevent-send t))
+ (with-current-buffer (find-file-noselect (mk-proj-get-config-val 'file-list-cache proj-name t))
(with-current-buffer (rename-buffer (mk-proj-fib-name proj-name))
(setq buffer-read-only t)
(set-buffer-modified-p nil)
- (message (concat "Loading " (mk-proj-fib-name proj-name) " from %s") (mk-proj-get-config-val 'file-list-cache proj-name t))))
+ (message (concat "Loading " (mk-proj-fib-name proj-name) " from %s") (mk-proj-get-config-val 'file-list-cache proj-name t)))))
(project-index proj-name)))
;;(mk-proj-fib-init nil)
@@ -1949,14 +1961,14 @@ With C-u prefix act as `project-ack-with-friends'."
(unless proj-name
(mk-proj-assert-proj)
(setq proj-name mk-proj-name))
- ;;(print proj-name)
(cond
((string= event "finished\n")
- (with-current-buffer (get-buffer (mk-proj-fib-name proj-name))
- (setq buffer-read-only t)
- (when (mk-proj-get-config-val 'file-list-cache proj-name t)
- (write-file (mk-proj-get-config-val 'file-list-cache proj-name t))
- (rename-buffer (mk-proj-fib-name proj-name))))
+ (let ((zeitgeist-prevent-send t))
+ (with-current-buffer (get-buffer (mk-proj-fib-name proj-name))
+ (setq buffer-read-only t)
+ (when (mk-proj-get-config-val 'file-list-cache proj-name t)
+ (write-file (mk-proj-get-config-val 'file-list-cache proj-name t))
+ (rename-buffer (mk-proj-fib-name proj-name)))))
(message "Refreshing %s buffer...done" (mk-proj-fib-name proj-name)))
(t
(mk-proj-fib-clear proj-name)
@@ -1988,7 +2000,7 @@ With C-u prefix act as `project-ack-with-friends'."
(message "project-index cmd: \"%s\"" find-cmd)
(message "Refreshing %s buffer..." (mk-proj-fib-name proj-name))
(start-process-shell-command proc-name (mk-proj-fib-name proj-name) find-cmd)
- (set-process-sentinel (get-process proc-name) 'mk-proj-fib-cb)
+ (set-process-sentinel (get-process proc-name) `(lambda (p e) (mk-proj-fib-cb p e ,proj-name)))
)))
(defun mk-proj-fib-matches (&optional regex proj-name)
@@ -2198,24 +2210,25 @@ project is not loaded."
))
(defun mk-proj-friendly-buffer-p (buf &optional proj-name)
- "Check if BUF belongs to the project or is friendly towards it."
- (let ((file-name (mk-proj-buffer-name buf)))
- (if (and file-name
- (block "friend-loop"
- (dolist (f (mk-proj-find-friendly-projects proj-name))
- (if (file-exists-p (expand-file-name f))
- (when (string-equal f file-name)
- (return-from "friend-loop" t))
- (when (mk-proj-find-config f)
- (let* ((friend-config (mk-proj-find-config f t))
- (basedir (expand-file-name (car (cdr (assoc 'basedir friend-config)))))
- (friend-basedir (if (string-equal (substring basedir -1) "/")
- basedir
- (concat basedir "/"))))
- (when (string-match (concat "^" (regexp-quote friend-basedir)) file-name)
- (return-from "friend-loop" t))))))))
- t
- nil)))
+ "Check if BUF is a friend of PROJ-NAME."
+ (unless (mk-proj-buffer-p buf)
+ (let ((file-name (mk-proj-buffer-name buf)))
+ (if (and file-name
+ (block "friend-loop"
+ (dolist (f (mk-proj-find-friendly-projects proj-name))
+ (if (file-exists-p (expand-file-name f))
+ (when (string-equal f file-name)
+ (return-from "friend-loop" t))
+ (when (mk-proj-find-config f)
+ (let* ((friend-config (mk-proj-find-config f t))
+ (basedir (expand-file-name (car (cdr (assoc 'basedir friend-config)))))
+ (friend-basedir (if (string-equal (substring basedir -1) "/")
+ basedir
+ (concat basedir "/"))))
+ (when (string-match (concat "^" (regexp-quote friend-basedir)) file-name)
+ (return-from "friend-loop" t))))))))
+ t
+ nil))))
(defun mk-proj-friendly-file-buffer-p (buf &optional proj-name)
(and (buffer-file-name buf)
@@ -2225,33 +2238,28 @@ project is not loaded."
(and (string-match "\*[^\*]\*" (buffer-name buf))
(mk-proj-friendly-buffer-p buf proj-name)))
-(defun mk-proj-friendly-buffers (&optional proj-name friends-only)
- "Return all buffers that belong to the project. When FRIENDS-ONLY is
-non-nil return only buffers that are friendly toward the project."
+(defun mk-proj-friendly-buffers (&optional proj-name)
+ "Return all buffers that are friendly to the project"
(unless proj-name
(mk-proj-assert-proj)
(setq proj-name mk-proj-name))
(let ((buffers nil))
(dolist (b (buffer-list))
- (when (or (and friends-only
- (mk-proj-friendly-buffer-p b proj-name)
- (not (some (lambda (buf) (eq buf b)) (mk-proj-buffers proj-name))))
- (and (not friends-only)
- (mk-proj-friendly-buffer-p b proj-name)))
+ (when (mk-proj-friendly-buffer-p b proj-name)
(push b buffers)))
buffers))
-(defun mk-proj-friendly-file-buffers (&optional proj-name friends-only)
+(defun mk-proj-friendly-file-buffers (&optional proj-name)
(unless proj-name
(mk-proj-assert-proj)
(setq proj-name mk-proj-name))
- (remove-if (lambda (buf) (not (buffer-file-name buf))) (mk-proj-friendly-buffers proj-name friends-only)))
+ (remove-if (lambda (buf) (not (buffer-file-name buf))) (mk-proj-friendly-buffers proj-name)))
(defun mk-proj-friendly-special-buffers (&optional proj-name friends-only)
(unless proj-name
(mk-proj-assert-proj)
(setq proj-name mk-proj-name))
- (append (remove-if (lambda (buf) (not (string-match "\*[^\*]\*" (buffer-name buf)))) (mk-proj-friendly-buffers proj-name friends-only))
+ (append (remove-if (lambda (buf) (not (string-match "\*[^\*]\*" (buffer-name buf)))) (mk-proj-friendly-buffers proj-name))
(remove-if (lambda (buf) (or (and (symbolp 'mk-org-project-buffer-name)
(not (string-equal (mk-org-project-buffer-name proj-name) (buffer-name buf))))
(compilation-buffer-p buf)))
@@ -2260,18 +2268,18 @@ non-nil return only buffers that are friendly toward the project."
(defun mk-proj-save-open-friends-info ()
(when (mk-proj-get-config-val 'open-friends-cache)
- (with-temp-buffer
- (dolist (f (remove-duplicates (mapcar (lambda (b) (mk-proj-buffer-name b)) (mk-proj-friendly-buffers)) :test #'string-equal))
- (when f
- (unless (string-equal (mk-proj-get-config-val 'tags-file) f)
- (insert f "\n"))))
- (if (file-writable-p (mk-proj-get-config-val 'open-friends-cache))
- (progn
+ (let ((zeitgeist-prevent-send t))
+ (with-temp-buffer
+ (dolist (f (remove-duplicates (mapcar (lambda (b) (mk-proj-buffer-name b)) (mk-proj-friendly-buffers)) :test #'string-equal))
+ (when f
+ (unless (string-equal (mk-proj-get-config-val 'tags-file) f)
+ (insert f "\n"))))
+ (if (file-writable-p (mk-proj-get-config-val 'open-friends-cache))
(write-region (point-min)
(point-max)
(mk-proj-get-config-val 'open-friends-cache))
- (message "Wrote open friends to %s" (mk-proj-get-config-val 'open-friends-cache)))
- (message "Cannot write to %s" (mk-proj-get-config-val 'open-friends-cache))))))
+ (message "Wrote open friends to %s" (mk-proj-get-config-val 'open-friends-cache))
+ (message "Cannot write to %s" (mk-proj-get-config-val 'open-friends-cache)))))))
(defun mk-proj-visit-saved-open-friends ()
(let ((zeitgeist-prevent-send t))
@@ -2296,7 +2304,7 @@ non-nil return only buffers that are friendly toward the project."
(dirty nil)
(basedir-len (length (mk-proj-get-config-val 'basedir)))
(zeitgeist-prevent-send t))
- (dolist (b (mk-proj-friendly-buffers nil t))
+ (dolist (b (mk-proj-friendly-buffers nil))
(cond
((buffer-modified-p b)
(push (buffer-name) dirty))

No commit comments for this range

Something went wrong with that request. Please try again.