From: Kyle Meyer <kyle@kyleam.com>
To: "Michaël Cadilhac" <michael@cadilhac.name>
Cc: Org-Mode mailing list <emacs-orgmode@gnu.org>,
No Wayman <iarchivedmywholelife@gmail.com>
Subject: Re: Proposal: do not align tags in Agenda
Date: Wed, 28 Oct 2020 22:21:26 -0400 [thread overview]
Message-ID: <87361xvkk9.fsf@kyleam.com> (raw)
In-Reply-To: <CADt3fpPppPKSoj1AjdacUK6X1dgegmw+mAOm=Fq7Yo=2OZwx9A@mail.gmail.com>
Michaël Cadilhac writes:
> My problem wasn't at all, as you point out, that the tag would erase the entry.
>
> It has to do with habits: The habit graph overwrites anything else. I
> like having org-agenda-tags-column to a low value (wide screen), but
> tags are crucial to my workflow, so them being overwritten is
> problematic.
>
> My previous patch is completely overkill for that purpose (it's even
> misguided since it does stem from a misunderstanding of tags
> alignment). Here's a simpler patch. It may be a matter of taste,
> though.
I see (and sorry for the slow reply). I've never used habits, but that
does sound good to avoid. Would you mind 1) wrapping the change below
into a patch (see <https://orgmode.org/worg/org-contribute.html>) and 2)
providing a minimal example like the one in my last reply so that
reviewers have something to quickly test?
No Wayman, I see that you replied [1] that your patch at
<https://orgmode.org/list/87ft8gelpn.fsf@gmail.com/> would allow working
around this issue [2], but do you still think the change below is a good
idea? Thanks.
[1] Note that it's detached from this thread because the References
and In-Reply-To headers weren't preserved.
[2] Sorry that that patch hasn't gotten any attention yet.
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index e4a334dbd..a80123853 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -9080,6 +9080,10 @@ current line."
> (goto-char (match-beginning 1))
> (delete-region (save-excursion (skip-chars-backward " \t") (point))
> (point))
> + (when (get-text-property (point) 'org-habit-p)
> + (setq c (max c (+ 1 org-habit-graph-column
> + org-habit-preceding-days
> + org-habit-following-days))))
I haven't applied this to check, but I suspect you'll need some amount
of guarding (e.g. with boundp) to silence the byte-compiler here.
> (insert (org-add-props
> (make-string (max 1 (- c (current-column))) ?\s)
> (plist-put (copy-sequence (text-properties-at (point)))
next prev parent reply other threads:[~2020-10-29 2:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 16:16 Proposal: do not align tags in Agenda Michaël Cadilhac
2020-09-30 3:36 ` Kyle Meyer
2020-10-04 16:03 ` Michaël Cadilhac
2020-10-29 2:21 ` Kyle Meyer [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-10-05 16:59 No Wayman
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=87361xvkk9.fsf@kyleam.com \
--to=kyle@kyleam.com \
--cc=emacs-orgmode@gnu.org \
--cc=iarchivedmywholelife@gmail.com \
--cc=michael@cadilhac.name \
/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).