From: Jeff Filipovits <firstname.lastname@example.org> To: Adam Spiers <email@example.com> Cc: Protesilaos Stavrou <firstname.lastname@example.org>, email@example.com, Eric S Fraga <firstname.lastname@example.org> Subject: Re: variable-pitch-mode misaligns org-mode heading tags Date: Wed, 16 Sep 2020 15:03:02 -0400 [thread overview] Message-ID: <email@example.com> (raw) In-Reply-To: <firstname.lastname@example.org> Adam, Thanks. You are right of course and I realized the right-align issue right after I sent my email. Adam Spiers <email@example.com> writes: > But the whole point of this exercise is to support > variable-width > fonts. In this case, the correct position for the end of the > single > space is most likely not even a multiple of the fixed column > width, so > it would probably need to be measured in pixels rather than > columns. And in order to calculate it, it is first necessary to > calculate the exact width in pixels of the colon-delimited list > of > tags. As I mentioned in the comment linked above, I searched for > a way > of calculating the pixel width of the tag list, and the best I > could > find was `pos-visible-in-window-p' which has some issues which I > mentioned there. If you have thoughts on whether I'm right > about > those, and if so how to solve them, I'd love to hear! Cheers, > Adam It looks like (window-text-pixel-size) could be used to calculate the pixel length of the tags list? I am having trouble deciphering the manual (https://www.gnu.org/software/emacs/manual/html_node/elisp/Pixel-Specification.html#Pixel-Specification) for pixel specification for spaces, though. The right alignment specification for some reason sends the tags to the next line, as do most other solutions that I would expect to align the text to the right side of the window. I can experiment more in a couple days, but in the meantime maybe someone smarter than me give some hints on how to use the pixel specification properties. > BTW I tried your code and for some reason it didn't insert any > space > for me, but I didn't look into that yet. The way it’s written it would only reduce the gap between the headline and tags to a space, and it assumes there are multiple spaces there already. If there’s no space between the two, I don’t think it’ll insert one. Probably not the best way as it was thrown together to test the text property fix. I accepted long ago that the solution to using a variable pitch font for org headings was that the tags would not be aligned to the right and never looked back, so maybe this is not worth the price of fixing it if it is messy. And diving down to calculating the pixel width of text seems like it’s getting pretty messy. -- Jeff Filipovits Spears & Filipovits, LLC 1126 Ponce de Leon Avenue Atlanta, GA 30306 678.237.9302 (direct) firstname.lastname@example.org All emails confidential to the fullest extent of the law.
next prev parent reply other threads:[~2020-09-16 19:05 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-08 19:31 Protesilaos Stavrou 2020-09-09 8:44 ` Bastien 2020-09-09 11:03 ` Eric S Fraga 2020-09-09 14:39 ` Bastien 2020-09-15 17:41 ` Jeff Filipovits 2020-09-16 16:21 ` Adam Spiers 2020-09-16 19:03 ` Jeff Filipovits [this message] 2020-09-16 21:14 ` Samuel Wales 2020-09-16 22:55 ` Adam Spiers 2020-09-17 0:18 ` Adam Spiers 2020-09-17 2:03 ` Jeff Filipovits 2020-09-17 15:36 ` Jeff Filipovits 2020-09-18 12:49 ` Ihor Radchenko 2021-04-27 19:41 ` Bastien
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 \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: variable-pitch-mode misaligns org-mode heading tags' \ /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
Code repositories for project(s) associated with this 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).