emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Lei Zhe <lzhes43@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Ensure org-table-header displays without cursor inside table
Date: Fri, 5 Apr 2024 22:20:20 +0800	[thread overview]
Message-ID: <CALjq+LZP_0z0riyek0bHwqBkAJkGe3LSxEu1QDOsDZqUDUC+eg@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 311 bytes --]

Hi org-mode community,

The patch ensures the header of an org-table displays without the cursor
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.

Regards,
Zhe Lei

[-- Attachment #1.2: Type: text/html, Size: 456 bytes --]

[-- Attachment #2: 0001-Ensure-org-table-header-displays-without-cursor-insi.patch --]
[-- Type: application/octet-stream, Size: 905 bytes --]

From 78a41e6d8367b8e70ca6a9b81ba20c0a86e01ce1 Mon Sep 17 00:00:00 2001
From: llcc <lzhes43@gmail.com>
Date: Fri, 5 Apr 2024 22:07:12 +0800
Subject: [PATCH] Ensure org-table-header displays without cursor inside table

---
 lisp/org-table.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/org-table.el b/lisp/org-table.el
index bd8d59f45..5475b6d42 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -494,6 +494,7 @@ This may be useful when columns have been shrunk."
           (redisplay)
           (let* ((ws (window-start))
                  (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]+\\)?>"))

base-commit: e9c288dfaccc2960e5b6889e6aabea700ad4e05a
-- 
2.39.3 (Apple Git-146)


             reply	other threads:[~2024-04-05 14:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 14:20 Lei Zhe [this message]
2024-04-05 18:39 ` [PATCH] Ensure org-table-header displays without cursor inside table Ihor Radchenko
     [not found]   ` <CALjq+LYwpu+Chej9ZbDV=qYGKhnTvBBeTgVvw3QV7dm-WB0WTQ@mail.gmail.com>
2024-04-06  0:29     ` Fwd: " Lei Zhe
2024-04-06 12:36     ` Ihor Radchenko
2024-04-12  9:23       ` Bastien Guerry
2024-04-12 18:05         ` Ihor Radchenko
2024-04-12 23:53           ` Lei Zhe

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=CALjq+LZP_0z0riyek0bHwqBkAJkGe3LSxEu1QDOsDZqUDUC+eg@mail.gmail.com \
    --to=lzhes43@gmail.com \
    --cc=emacs-orgmode@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/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).