emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] make tags fast selection popup narrower
Date: Sun, 15 Apr 2018 17:49:39 +0800	[thread overview]
Message-ID: <87muy4ztn0.fsf@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 20 bytes --]

Here is the patch:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-org.el-make-fast-tags-selection-popup-narrower-to-lo.patch --]
[-- Type: text/x-patch, Size: 1070 bytes --]

From 7fc28443484f7b8c701d7c076f1c9c4e389651e7 Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
Date: Sun, 15 Apr 2018 17:41:44 +0800
Subject: [PATCH] * org.el: make fast tags selection popup narrower to look
 better.

* lisp/org.el (org-fast-tag-selection): original spaces behind each tag
  is calculated based on window width. It is big. Diffcult to find tags.
---
 lisp/org.el | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 4080f3884..e08129498 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14647,8 +14647,7 @@ Returns the new tags string, or nil to not change the current settings."
 	  (when (equal (caar tbl) :grouptags)
 	    (org-add-props tg nil 'face 'org-tag-group))
 	  (when (and (zerop cnt) (not ingroup) (not intaggroup)) (insert " "))
-	  (insert "[" c "] " tg (make-string
-				 (- fwidth 4 (length tg)) ?\ ))
+	  (insert "[" c "] " tg (make-string 2 ?\ ))
 	  (push (cons tg c) ntable)
 	  (when (= (cl-incf cnt) ncol)
 	    (insert "\n")
-- 
2.17.0


[-- Attachment #1.3: Type: text/plain, Size: 47 bytes --]


And I toke two screenshots.
Before my patch:


[-- Attachment #1.4: before.png --]
[-- Type: image/png, Size: 73272 bytes --]

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


After my patch:


[-- Attachment #1.6: after.png --]
[-- Type: image/png, Size: 69787 bytes --]

[-- Attachment #1.7: Type: text/plain, Size: 204 bytes --]



-- 
[ stardiviner ] don't need to convince with trends.
       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

             reply	other threads:[~2018-04-15  9:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-15  9:49 stardiviner [this message]
2018-04-15 15:26 ` [PATCH] make tags fast selection popup narrower Nicolas Goaziou
2018-04-15 15:56   ` stardiviner

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=87muy4ztn0.fsf@gmail.com \
    --to=numbchild@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).