emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carlos Pita <carlosjosepita@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: [patch] Don't show trailing colon in agenda custom command desc
Date: Fri, 22 Feb 2019 00:37:58 -0300	[thread overview]
Message-ID: <CAELgYhcDhZcd4YaoHKDn6n0dEUzPrG_-FeJXhZGd8QzC1fUU1A@mail.gmail.com> (raw)

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

Hi all,

here is a simple patch to avoid showing ugly trailing colons in custom
agenda commands when no matcher was specified (for example, in the
case of alltodo).

Best regards
--
Carlos

[-- Attachment #2: 0001-org-agenda-don-t-show-trailing-color-if-no-matcher.patch --]
[-- Type: text/x-patch, Size: 966 bytes --]

From 4125d3ff9e4f26c3346b847288cad3e69a38da23 Mon Sep 17 00:00:00 2001
From: memeplex <carlosjosepita@gmail.com>
Date: Fri, 22 Feb 2019 00:32:58 -0300
Subject: [PATCH] org-agenda: don't show trailing color if no matcher

* lisp/org-agenda.el (org-agenda-get-restriction-and-command):
  when no matcher was specified there is no point in showing
  a trailing colon (and space).
---
 lisp/org-agenda.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index ff98cd65d..ab50d4274 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -3027,7 +3027,8 @@ s   Search for keywords                 M   Like m, but only TODO entries
 					    (symbol-name type)
 					  "Lambda expression"))
 		      (t "???"))))
-	      (if org-agenda-menu-show-matcher
+	      (if (and org-agenda-menu-show-matcher
+		       match (not (string-empty-p match)))
 		  (setq line
 			(concat line ": "
 				(cond
-- 
2.20.1


             reply	other threads:[~2019-02-22  3:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-22  3:37 Carlos Pita [this message]
2019-02-22 19:01 ` [patch] Don't show trailing colon in agenda custom command desc Nicolas Goaziou
2019-02-22 19:30   ` Carlos Pita

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=CAELgYhcDhZcd4YaoHKDn6n0dEUzPrG_-FeJXhZGd8QzC1fUU1A@mail.gmail.com \
    --to=carlosjosepita@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).