[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/org/org-attach.el,v
From: |
Carsten Dominik |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/org/org-attach.el,v |
Date: |
Wed, 12 Nov 2008 08:01:12 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Carsten Dominik <cdominik> 08/11/12 08:01:10
Index: org-attach.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/org/org-attach.el,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- org-attach.el 25 Oct 2008 21:32:47 -0000 1.3
+++ org-attach.el 12 Nov 2008 08:01:06 -0000 1.4
@@ -4,7 +4,7 @@
;; Author: John Wiegley <address@hidden>
;; Keywords: org data task
-;; Version: 6.10c
+;; Version: 6.12a
;; This file is part of GNU Emacs.
;;
@@ -125,7 +125,7 @@
d Delete one attachment, you will be prompted for a file name.
D Delete all of a task's attachments. A safer way is
to open the directory in dired and delete from there.")))
- (shrink-window-if-larger-than-buffer (get-buffer-window "*Org
Attach*"))
+ (org-fit-window-to-buffer (get-buffer-window "*Org Attach*"))
(message "Select command: [acmlzoOfFdD]")
(setq c (read-char-exclusive))
(and (get-buffer "*Org Attach*") (kill-buffer "*Org Attach*"))))
@@ -156,11 +156,7 @@
(let ((uuid (org-id-get (point) create-if-not-exists-p)))
(when (or uuid create-if-not-exists-p)
(unless uuid
- (let ((uuid-string (shell-command-to-string "uuidgen")))
- (setf uuid-string
- (substring uuid-string 0 (1- (length uuid-string))))
- (org-entry-put (point) "ID" uuid-string)
- (setf uuid uuid-string)))
+ (error "ID retrieval/creation failed"))
(let ((attach-dir (expand-file-name
(format "%s/%s"
(substring uuid 0 2)
@@ -334,6 +330,17 @@
(interactive)
(org-attach-open 'in-emacs))
+(defun org-attach-expand (file)
+ "Return the full path to the current entry's attachment file FILE.
+Basically, this adds the path to the attachment directory."
+ (expand-file-name file (org-attach-dir)))
+
+(defun org-attach-expand-link (file)
+ "Return a file link pointing to the current entry's attachment file FILE.
+Basically, this adds the path to the attachment directory, and a \"file:\"
+prefix."
+ (concat "file:" (org-attach-expand file)))
+
(provide 'org-attach)
;; arch-tag: fce93c2e-fe07-4fa3-a905-e10dcc7a6248
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/org/org-attach.el,v,
Carsten Dominik <=