forked from mirrors/org-mode
ox.el: Remove .gpg extension from the exported file-name
* ox.el (org-export-output-file-name): Remove .gpg extension.
Reported-by: Adalricus Ovicula <adalricus@inventati.org>
Link: https://orgmode.org/list/87a74x7g6v.fsf@xenon.ovicula/
This is a rework of the previous reverted commit e8c24b66a
.
This commit is contained in:
parent
82707041b0
commit
b1ff9afc3b
|
@ -6424,7 +6424,10 @@ Return file name as a string."
|
||||||
(throw :found
|
(throw :found
|
||||||
(org-element-property :value element))))))))
|
(org-element-property :value element))))))))
|
||||||
;; Extract from buffer's associated file, if any.
|
;; Extract from buffer's associated file, if any.
|
||||||
(and visited-file (file-name-nondirectory visited-file))
|
(and visited-file
|
||||||
|
(file-name-nondirectory
|
||||||
|
;; For a .gpg visited file, remove the .gpg extension:
|
||||||
|
(replace-regexp-in-string "\\.gpg\\'" "" visited-file)))
|
||||||
;; Can't determine file name on our own: ask user.
|
;; Can't determine file name on our own: ask user.
|
||||||
(read-file-name
|
(read-file-name
|
||||||
"Output file: " pub-dir nil nil nil
|
"Output file: " pub-dir nil nil nil
|
||||||
|
|
Loading…
Reference in a new issue