emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [patch] Improve fast todo selection alignment
@ 2019-02-21  4:14 Carlos Pita
  2019-02-22 18:59 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Carlos Pita @ 2019-02-21  4:14 UTC (permalink / raw)
  To: emacs-orgmode

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

This avoids lines with just a closing "}", which look rather ugly.
Quite similar to my previous patch for fast tag selection.

Regards
--
Carlos

[-- Attachment #2: 0001-Fix-fast-todo-selection-menu-alignment.patch --]
[-- Type: text/x-patch, Size: 940 bytes --]

From 239e0d036da94b2a950db3ad1f7e82c5ca6d8daa Mon Sep 17 00:00:00 2001
From: memeplex <carlosjosepita@gmail.com>
Date: Thu, 21 Feb 2019 01:09:29 -0300
Subject: [PATCH] Fix fast todo selection menu alignment

* lisp/org.el (org-fast-todo-selection): Avoid lines with just a
  closing delimiter.
---
 lisp/org.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/org.el b/lisp/org.el
index ef6e40ca9..a34211b65 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12573,7 +12573,8 @@ Returns the new TODO keyword, or nil if no state change should occur."
 	    (when (and (= cnt 0) (not ingroup)) (insert "  "))
 	    (insert "[" c "] " tg (make-string
 				   (- fwidth 4 (length tg)) ?\ ))
-	    (when (= (setq cnt (1+ cnt)) ncol)
+	    (when (and (= (setq cnt (1+ cnt)) ncol)
+		       (not (equal (car tbl) '(:endgroup))))
 	      (insert "\n")
 	      (when ingroup (insert "  "))
 	      (setq cnt 0)))))
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] Improve fast todo selection alignment
  2019-02-21  4:14 [patch] Improve fast todo selection alignment Carlos Pita
@ 2019-02-22 18:59 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2019-02-22 18:59 UTC (permalink / raw)
  To: Carlos Pita; +Cc: emacs-orgmode

Hello,

Carlos Pita <carlosjosepita@gmail.com> writes:

> This avoids lines with just a closing "}", which look rather ugly.
> Quite similar to my previous patch for fast tag selection.
>
> Regards
> --
> Carlos
>
> From 239e0d036da94b2a950db3ad1f7e82c5ca6d8daa Mon Sep 17 00:00:00 2001
> From: memeplex <carlosjosepita@gmail.com>
> Date: Thu, 21 Feb 2019 01:09:29 -0300
> Subject: [PATCH] Fix fast todo selection menu alignment
>
> * lisp/org.el (org-fast-todo-selection): Avoid lines with just a
>   closing delimiter.

Applied. Thank you.

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-22 18:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-21  4:14 [patch] Improve fast todo selection alignment Carlos Pita
2019-02-22 18:59 ` Nicolas Goaziou

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).