emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alex Branham <branham@utexas.edu>
To: emacs-orgmode@gnu.org
Subject: [PATCH] allow users to customize string in org-agenda-time-grid
Date: Fri, 07 Jul 2017 08:37:44 +0200	[thread overview]
Message-ID: <871sps69c7.fsf@utexas.edu> (raw)

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

Hello,

This small patch allows users to customize the string to display after the time in the agenda view.

I think I formatted the patch correctly, but please let me know if I missed something,
Alex

------------------------------------------------------------

From 3e1a9a4a0cde14e1496c355028c9ef3c8b75b9e2 Mon Sep 17 00:00:00 2001
From: Alex Branham <branham@utexas.edu>
Date: Fri, 7 Jul 2017 08:25:38 +0200
Subject: [PATCH] org-agenda.el: Allow users to customize string after
 time-grid

* org-agenda.el: Users may now customize the string to display after
the time in the agenda with the variable
`org-agenda-time-grid-trailing-characters'.

TINYCHANGE
---
 lisp/org-agenda.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ddd1b7d11..43b844cc3 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1510,6 +1510,11 @@ a grid line."
     (string :tag "Grid String")
     (repeat :tag "Grid Times" (integer :tag "Time"))))

+(defcustom org-agenda-time-grid-trailing-characters "......"
+  "Characters to show after time when `org-agenda-use-time-grid' is non-nil."
+  :group 'org-agenda-time-grid
+  :type 'string)
+
 (defcustom org-agenda-show-current-time-in-grid t
   "Non-nil means show the current time in the time grid."
   :group 'org-agenda-time-grid
@@ -6478,8 +6483,8 @@ Any match of REMOVE-RE will be removed from TXT."
 			 (s1 (concat
 			      (org-agenda-time-of-day-to-ampm-maybe s1)
 			      (if org-agenda-timegrid-use-ampm
-				  "........ "
-				"......")))
+                                  (concat org-agenda-time-grid-trailing-characters " ")
+                                org-agenda-time-grid-trailing-characters)))
 			 (t ""))
 	      extra (or (and (not habitp) extra) "")
 	      category (if (symbolp category) (symbol-name category) category)
--
2.13.2


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-org-agenda.el-Allow-users-to-customize-string-after-.patch --]
[-- Type: text/x-diff, Size: 1615 bytes --]

From 3e1a9a4a0cde14e1496c355028c9ef3c8b75b9e2 Mon Sep 17 00:00:00 2001
From: Alex Branham <branham@utexas.edu>
Date: Fri, 7 Jul 2017 08:25:38 +0200
Subject: [PATCH] org-agenda.el: Allow users to customize string after
 time-grid

* org-agenda.el: Users may now customize the string to display after
the time in the agenda with the variable
`org-agenda-time-grid-trailing-characters'.

TINYCHANGE
---
 lisp/org-agenda.el | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ddd1b7d11..43b844cc3 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -1510,6 +1510,11 @@ a grid line."
     (string :tag "Grid String")
     (repeat :tag "Grid Times" (integer :tag "Time"))))
 
+(defcustom org-agenda-time-grid-trailing-characters "......"
+  "Characters to show after time when `org-agenda-use-time-grid' is non-nil."
+  :group 'org-agenda-time-grid
+  :type 'string)
+
 (defcustom org-agenda-show-current-time-in-grid t
   "Non-nil means show the current time in the time grid."
   :group 'org-agenda-time-grid
@@ -6478,8 +6483,8 @@ Any match of REMOVE-RE will be removed from TXT."
 			 (s1 (concat
 			      (org-agenda-time-of-day-to-ampm-maybe s1)
 			      (if org-agenda-timegrid-use-ampm
-				  "........ "
-				"......")))
+                                  (concat org-agenda-time-grid-trailing-characters " ")
+                                org-agenda-time-grid-trailing-characters)))
 			 (t ""))
 	      extra (or (and (not habitp) extra) "")
 	      category (if (symbolp category) (symbol-name category) category)
-- 
2.13.2


             reply	other threads:[~2017-07-07  6:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07  6:37 Alex Branham [this message]
2017-07-07  7:32 ` [PATCH] allow users to customize string in org-agenda-time-grid Nicolas Goaziou
2017-07-07  8:34   ` Alex Branham
2017-07-10 13:39     ` Nicolas Goaziou
2017-07-11  6:21       ` Alex Branham
2017-07-11  8:05         ` Nicolas Goaziou
2017-07-10 20:02 ` Samuel Wales
2017-07-11  6:16   ` Alex Branham

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=871sps69c7.fsf@utexas.edu \
    --to=branham@utexas.edu \
    --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).