Browse Source

Revert "tangled files should not be writable"

This reverts commit 5e3b8259c7e5a8f2e09aa8e8b0769216ca9c5576.
Eric Schulte 12 years ago
parent
commit
458824493d
1 changed files with 2 additions and 6 deletions
  1. 2 6
      lisp/ob-tangle.el

+ 2 - 6
lisp/ob-tangle.el

@@ -264,12 +264,8 @@ exported source code blocks by language."
 			    (goto-char (point-max))
 			    (insert content)
 			    (write-region nil nil file-name))))
-		      (set-file-modes
-		       file-name
-		       ;; never writable (don't accidentally edit tangled files)
-		       (if she-bang
-			   #o555 ;; files with she-bangs should be executable
-			 #o444)) ;; those without should not
+		      ;; if files contain she-bangs, then make the executable
+		      (when she-bang (set-file-modes file-name #o755))
 		      ;; update counter
 		      (setq block-counter (+ 1 block-counter))
 		      (add-to-list 'path-collector file-name)))))