|
@@ -259,8 +259,12 @@ exported source code blocks by language."
|
|
|
(goto-char (point-max))
|
|
|
(insert content)
|
|
|
(write-region nil nil file-name))))
|
|
|
- ;; if files contain she-bangs, then make the executable
|
|
|
- (when she-bang (set-file-modes file-name #o755))
|
|
|
+ (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
|
|
|
;; update counter
|
|
|
(setq block-counter (+ 1 block-counter))
|
|
|
(add-to-list 'path-collector file-name)))))
|