emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Daimrod <daimrod@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATH] Customize org-annotate-file
Date: Fri, 09 May 2014 15:02:30 +0900	[thread overview]
Message-ID: <871tw3v6a1.fsf@tanger.home> (raw)

[-- Attachment #1: Type: text/plain, Size: 206 bytes --]

Hi,

Here is a small patch for contrib/lisp/org-annotate-file.el.

This patch creates a customization group for org-annotate-file (child of
the org group) and convert defvars to defcustoms.

Okay to push?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-contrib-lisp-org-annotate-file.el-Create-a-customiza.patch --]
[-- Type: text/x-diff, Size: 1973 bytes --]

From ea5be445776f7d139f52b38306552e0012b47d0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= <gregoire.jadi@gmail.com>
Date: Fri, 9 May 2014 14:58:59 +0900
Subject: [PATCH] contrib/lisp/org-annotate-file.el: Create a customization
 group and convert `defvar' customization variables to `defcustom'

* contrib/lisp/org-annotate-file.el (org-annotate-file): New customization
group.

(org-annotate-file-storage-file org-annotate-file-add-search
org-annotate-file-always-open): Convert `defvar' symbols to `defcustom' using the new group.
---
 contrib/lisp/org-annotate-file.el | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

diff --git a/contrib/lisp/org-annotate-file.el b/contrib/lisp/org-annotate-file.el
index 8fbb590..b8e8bd9 100644
--- a/contrib/lisp/org-annotate-file.el
+++ b/contrib/lisp/org-annotate-file.el
@@ -59,14 +59,24 @@
 
 (require 'org)
 
-(defvar org-annotate-file-storage-file "~/.org-annotate-file.org"
-  "File in which to keep annotations.")
-
-(defvar org-annotate-file-add-search nil
-  "If non-nil, add a link as a second level to the actual file location.")
-
-(defvar org-annotate-file-always-open t
-  "If non-nil, always expand the full tree when visiting the annotation file.")
+(defgroup org-annotate-file nil
+  "Org Annotate"
+  :group 'org)
+
+(defcustom org-annotate-file-storage-file "~/.org-annotate-file.org"
+  "File in which to keep annotations."
+  :group 'org-annotate-file
+  :type 'file)
+
+(defcustom org-annotate-file-add-search nil
+  "If non-nil, add a link as a second level to the actual file location."
+  :group 'org-annotate-file
+  :type 'boolean)
+
+(defcustom org-annotate-file-always-open t
+  "If non-nil, always expand the full tree when visiting the annotation file."
+  :group 'org-annotate-file
+  :type 'boolean)
 
 (defun org-annotate-file-ellipsify-desc (string &optional after)
   "Return shortened STRING with appended ellipsis.
-- 
1.8.0.2722.gc0242e5


[-- Attachment #3: Type: text/plain, Size: 18 bytes --]


-- 
Daimrod/Greg

             reply	other threads:[~2014-05-09  6:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-09  6:02 Daimrod [this message]
2014-05-09 12:40 ` [PATH] Customize org-annotate-file Bastien
2014-05-09 13:23   ` Daimrod

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871tw3v6a1.fsf@tanger.home \
    --to=daimrod@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).