unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Aaron Jensen <aaronjensen@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 45748@debbugs.gnu.org
Subject: bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces
Date: Sat, 9 Jan 2021 11:49:34 -0600	[thread overview]
Message-ID: <CAHyO48yuiO-EM1=dXJHpcobT5a6yjrXpoSKBtx0_8mFRk+NfDg@mail.gmail.com> (raw)
In-Reply-To: <83r1mugg3w.fsf@gnu.org>

On Sat, Jan 9, 2021 at 11:44 AM Eli Zaretskii <eliz@gnu.org> wrote:
>
> You mean with
>
>   (window-text-pixel-size t t)
>
> right?

Yes, sorry bad copy/paste.

> ??? fit-frame-to-buffer always calls fit-frame-to-buffer-1, sow hat do
> you mean by "unless"?

I mean unless you call fit-frame-to-buffer-1 passing nil for from and
to, which I believe is the most likely desired behavior for something
like posframe, but I'm not the maintainer of that so I couldn't say
for certain.


> > The second loop looks like it's attempting to backtrack to the
> > beginning of the line, but FETCH_BYTE (bpos) after a dec_both returns
> > the same character that the first loop ended on.
>
> No, it doesn't, it returns the byte at bpos after decrementing bpos.
> So it's the character before that.

Maybe we're just getting hung up on my wording. After
fetch_char_advance, bpos points to the byte of the character after
what was returned from fetch_char_advance. If you then dec_both and
FETCH_BYTE, you will get the same character returned from the last
time fetch_char_advance was called, which was likely not the intent.

> > In other words, start and bpos are not in sync
>
> ??? FETCH_BYTE doesn't change bpos, so if it was in sync with start
> before FETCH_BYTE, it is still in sync after it.  So I don't think I
> understand what you mean here.
>
> Can you elaborate on your findings, please?

Yeah, I was mistaken on that point. They stay in sync. They both
needed to backtrack an extra time. See my patch in the email I sent
right before this one.





  reply	other threads:[~2021-01-09 17:49 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09 15:43 bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces Aaron Jensen
2021-01-09 15:57 ` Aaron Jensen
2021-01-09 16:27   ` Aaron Jensen
2021-01-09 17:07     ` martin rudalics
2021-01-09 17:44       ` Aaron Jensen
2021-01-09 17:55         ` Aaron Jensen
2021-01-09 18:14           ` Eli Zaretskii
2021-01-10  2:56             ` Aaron Jensen
2021-01-10 16:05               ` martin rudalics
2021-01-10 17:31                 ` Aaron Jensen
2021-01-10 17:49                   ` martin rudalics
2021-01-10 17:51                     ` Aaron Jensen
2021-01-10 17:57                       ` martin rudalics
2021-01-10 17:58                         ` Aaron Jensen
2021-01-13  4:34               ` Aaron Jensen
2021-01-13 14:26                 ` Eli Zaretskii
2021-01-15 12:11               ` Eli Zaretskii
2021-01-15 12:34                 ` Aaron Jensen
2021-01-15 13:15                   ` Eli Zaretskii
2021-01-15 14:04                     ` Aaron Jensen
2021-01-15 15:37                       ` Eli Zaretskii
2021-01-15 17:03                         ` Aaron Jensen
2021-01-09 18:03         ` Eli Zaretskii
2021-01-09 17:44     ` Eli Zaretskii
2021-01-09 17:49       ` Aaron Jensen [this message]
2021-01-09 17:07   ` martin rudalics
2021-01-16 17:12 ` bug#45748: [PATCH] * test/src/xdisp-tests.el Fix tests to work in batch mode Aaron Jensen
2021-01-16 17:57   ` Basil L. Contovounesios
2021-01-16 18:24 ` Aaron Jensen
2021-01-16 18:24   ` Aaron Jensen
2021-01-16 18:28 ` Aaron Jensen
2021-01-16 18:28   ` Aaron Jensen
2021-01-16 18:33     ` Eli Zaretskii
2021-01-18 17:04     ` Eli Zaretskii

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.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHyO48yuiO-EM1=dXJHpcobT5a6yjrXpoSKBtx0_8mFRk+NfDg@mail.gmail.com' \
    --to=aaronjensen@gmail.com \
    --cc=45748@debbugs.gnu.org \
    --cc=eliz@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.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).