From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id gNTlKbiXEGZGOAEAqHPOHw:P1 (envelope-from ) for ; Sat, 06 Apr 2024 02:30:48 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id gNTlKbiXEGZGOAEAqHPOHw (envelope-from ) for ; Sat, 06 Apr 2024 02:30:48 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T7qIegAi; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712363448; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=acQvHHlb1+7MNUoH8lH2xFaJFNY4PHdh1UjNhGR17Rs=; b=HY/9YUz4E+LyWPWOzMtROZU/3I52GpziSA8kSNOngYFit2IvGa1ZC81nUoFGQIxtCWVK3L F08RtVlF6ptBefOlpglsm3qvw5H5IQQ/S5oxmMn05yOV26jqLsD1B+X9mraKHc710OXLcM jfpLxcEIplLYOfsiOh9st5PIeyHPQdW1iGh+qLYiPdqvSa/RZbQwWfUSGgKpXoVJK2Lg9s QbSQnPTn+KwcULOUdsMUceviI2ZnJ6Gep+sRcGCOovqTRCBJQhiY3CCMx7gG5tchRigo/n 7et3VbRBKDJGk+ocxPSJBpxB4LZ2pxwgqe6jen53lJZfnDFZQLEiMig6GjcVVg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712363448; a=rsa-sha256; cv=none; b=l2ptmpiVeUhiAIF4sEnFoz/PfAGhmvghj4QZejNJu92mZ5C6T6hPKP7UXGUKk+DsmSZhaa /SfVIfLDilMAe2w8zHS6sem9yPnM0v1Fc7xC3wEJ0u7hoZfvakDVOOoQ1RnXiRejbyA/Lx 8IfsfNuGXHR5DrtD2xcUwgm9JDj7AXAgrxzG7F1jGJC+pJC5zp1g/Vo7IM/YkRGPIWiICs LeBBYMGxcOmeMGUCdKwiytE+hm4HOUiI9WokhjzEKvG0aSl5AZf9qC5MXVd4byzoFD+5xR GjpaMdDRm8ZquWrjbjWsL5qh6SUMO5U5OorvZuNc8es7Hxycqz5zR8rItDrTfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=T7qIegAi; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5934934883 for ; Sat, 6 Apr 2024 02:30:48 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rstwE-0006G4-Ud; Fri, 05 Apr 2024 20:29:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rstwD-0006Fg-5L for emacs-orgmode@gnu.org; Fri, 05 Apr 2024 20:29:41 -0400 Received: from mail-oo1-xc33.google.com ([2607:f8b0:4864:20::c33]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rstwA-0006eH-Tu for emacs-orgmode@gnu.org; Fri, 05 Apr 2024 20:29:40 -0400 Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-5a58009fe88so1383685eaf.0 for ; Fri, 05 Apr 2024 17:29:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712363377; x=1712968177; darn=gnu.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=acQvHHlb1+7MNUoH8lH2xFaJFNY4PHdh1UjNhGR17Rs=; b=T7qIegAiSc1BBnZBNspYB5MCcM/AaJ0EKN9ipfvzZ42bCujy+3ASdDC6/75B7zOWDw Ga9FFYiuHcYWfZyzw0KdBVTDsjbWfnGiIzg/aEB2GIKhwT4cN8wq8Nf5/wph5B3zxgDl GQ9UX0gfYUSGvl+6ioFDyxZ9aMA21SPmEuxTZQxigQ6zy6aj2a2SEhvVad9fVbxftd3v bCBwNbP3YnH+/FL3YkGFRVwvA/60zDoQbhLypN3zz7wCCDglrpB4TbsRCzKqLVe51Q4S D0RKvI+iIR5W9mWgGCxuF0/FKFrKOVVvFVH91oSTqC7xQ5LLZeK4hiAjZOf06nhGYBlF PYvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712363377; x=1712968177; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=acQvHHlb1+7MNUoH8lH2xFaJFNY4PHdh1UjNhGR17Rs=; b=IJhsYj4N9YibK1la9XsqlkI6HPvdOchEAKy+Nm88vNsuIt0+f5k0Z6s0PCAWBYu6Iq hlRvm6KUOg3aKBOB/TNm2fHa9uvuavsdAgd2DbCnU50D1LZ9DB/TnhO4fGUQ5GoSU3Kk epXQNxM4+DlytGMIRWZpJGeTqwODyvTWNSQ7Vfvv2Kuj6TWBsPNhf2z/L2FmqGQzu+KQ poByMQ+TyKHuZ7G+G88IJ/ZuZTloe0TSHvoC2oKbzqxGnk2BZXAPDznPKK3Vt6uaNi89 BUnES6SDN8gk5u5CAdNzJXyI6mZX592XTyYA7e3ncRRkybj38wtBJFeqYcR+jHIu272b i97Q== X-Gm-Message-State: AOJu0Yzm+VpEUUA7mwP9IzKVZ4SMlf9wXee3sBlbFYV9DcihgzZs8sfV baahBFk/gYvSzcD96DreNFwCKjC3oEMtylex6logtJIqTfO/8/Qj00PpfcA5ZPWZ1HuM6BMvN6i hNR4QEhgz2PTbfj4ZxwFIw8BMx+rMlCEc5o8= X-Google-Smtp-Source: AGHT+IFCSqpAmvolPetWlLQoQnDcVDwX5cXx6zvF5grzBJv/ItI6BwRxLhfLFAtY2RQ2eOQEQfzLdKBkbKrxf5g1ue0= X-Received: by 2002:a05:6820:987:b0:5a5:2105:f209 with SMTP id cg7-20020a056820098700b005a52105f209mr3525992oob.6.1712363376913; Fri, 05 Apr 2024 17:29:36 -0700 (PDT) MIME-Version: 1.0 References: <87cyr3odq8.fsf@localhost> In-Reply-To: From: Lei Zhe Date: Sat, 6 Apr 2024 08:29:26 +0800 Message-ID: Subject: Fwd: [PATCH] Ensure org-table-header displays without cursor inside table To: emacs-orgmode@gnu.org Content-Type: multipart/alternative; boundary="000000000000ceb24e061562aa12" Received-SPF: pass client-ip=2607:f8b0:4864:20::c33; envelope-from=lzhes43@gmail.com; helo=mail-oo1-xc33.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.02 X-Spam-Score: -9.02 X-Migadu-Queue-Id: 5934934883 X-Migadu-Scanner: mx12.migadu.com X-TUID: E13teH5DaUGu --000000000000ceb24e061562aa12 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable > May you please explain in more details what problem you are trying to > solve? Sure. I've identified an issue on the master branch where, if the cursor is not inside the table at WS, `org-table-begin' in `org-table-header-set-header' gets the beginning position of the next table in the buffer. so `(pos-visible-in-window-p beg)' returns true, causing the header overlay of the table at WS to not display. > Moving point to WS and then immediately to the beginning of the table > makes no difference. So, your patch does nothing. Moving point to WS ensures`org-table-begin' to get the beginning position of the table at WS, regardless of the cursor position, resolves the above problem. Regards, Zhe Lei On Sat, Apr 6, 2024 at 2:40=E2=80=AFAM Ihor Radchenko = wrote: > Lei Zhe writes: > > > The patch ensures the header of an org-table displays without the curso= r > > inside the table when org-table-header-line-mode is enabled. > > > > BTW, this is my first patch for org-mode, so please correct me if there > > are any issues with it. > > Also, I've done the paperwork before. > > Thanks for the patch! > May you please explain in more details what problem you are trying to > solve? > > > (beg (save-excursion > > + (goto-char ws) > > (goto-char (org-table-begin)) > > (while (or (org-at-table-hline-p) > > (looking-at-p > ".*|\\s-+<[rcl]?\\([0-9]+\\)?>")) > > Moving point to WS and then immediately to the beginning of the table > makes no difference. So, your patch does nothing. > > -- > Ihor Radchenko // yantar92, > Org mode contributor, > Learn more about Org mode at . > Support Org development at , > or support my work at > --000000000000ceb24e061562aa12 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
> May you please explain in more details what problem you are tryin= g to
> solve?<= div>Sure. I've identified an issue on the master branch where,=C2=A0if = the cursor is=C2=A0
not inside the table at WS,=C2=A0 `org-table-= begin' in `org-table-header-set-header'
gets the beginnin= g position of the next table in the buffer.=C2=A0
so `(pos-visibl= e-in-window-p beg)' returns true, causing the header overlay=C2=A0
of the table at WS to not display.

> Movi= ng point to WS and then immediately to the beginning of the table
>= makes no difference. So, your patch does nothing.
Moving point to WS e= nsures`org-table-begin' to get the beginning position
of the table at WS, regardless of the cursor position, resolves the
above problem.=C2=A0

Regards,
Zhe Lei

On Sat, Apr 6, 2024 at 2:40=E2=80=AFAM Ihor Radchenko <<= a href=3D"mailto:yantar92@posteo.net" target=3D"_blank">yantar92@posteo.net= > wrote:
= Lei Zhe <lzhes43@= gmail.com> writes:

> The patch ensures the header of an org-table displays without the curs= or
> inside the table when org-table-header-line-mode is enabled.
>
> BTW, this is my first patch for org-mode, so please correct me if ther= e
> are any issues with it.
> Also, I've done the paperwork before.

Thanks for the patch!
May you please explain in more details what problem you are trying to
solve?

>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(b= eg (save-excursion
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 (goto-char ws)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (goto-char (org-table-begin))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 (while (or (org-at-table-hline-p)
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(looking-at-p= ".*|\\s-+<[rcl]?\\([0-9]+\\)?>"))

Moving point to WS and then immediately to the beginning of the table
makes no difference. So, your patch does nothing.

--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,=
or support my work at <https://liberapay.com/yantar92>
--000000000000ceb24e061562aa12--