all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: lamppilutti--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 58712@debbugs.gnu.org
Subject: bug#58712: Incorrect vtable edges recognizing
Date: Sat, 22 Oct 2022 07:21:45 +0000	[thread overview]
Message-ID: <rma9WTMSooPeE5NxkzSG7Is_Ailt5fMBAONwOztDeH-HcSS1Nx1zagYIcZW_P9vqVxpgN0cfiGv8dfwmL00jKeumuc1C9wwm6ukGwLJbG6c=@protonmail.com> (raw)


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

Functions `vtable-beginning-of-table' and `vtable-beginning-of-table' recognize
edges incorrectly. Because of this `vtable-narrow-current-column',
`vtable-widen-current-column', `vtable-sort-by-current-column' and
`vtable-header-line-sort' remove all text before and after the table.
There is small patch to fix this.

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-vtable-edges-recognizing.patch --]
[-- Type: text/x-patch; name=0001-Fix-vtable-edges-recognizing.patch, Size: 1333 bytes --]

From e9d4afecf512b4b7317b5cae93348c1346bf02d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?L=C3=A4mppi=20L=C3=BCtti?= <lamppilutti@protonmail.com>
Date: Sat, 22 Oct 2022 07:58:46 +0300
Subject: [PATCH] Fix vtable edges recognizing

* Fix `vtable-beginning-of-table' returns point-min, if point is on
  table or on one position before.

* Fix `vtable-end-of-table' returns point-max, if point is on table.
---
 lisp/emacs-lisp/vtable.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/emacs-lisp/vtable.el b/lisp/emacs-lisp/vtable.el
index de8503a1cb..20f88ed33a 100644
--- a/lisp/emacs-lisp/vtable.el
+++ b/lisp/emacs-lisp/vtable.el
@@ -240,13 +240,14 @@ See info node `(vtable)Top' for vtable documentation."

 (defun vtable-beginning-of-table ()
   "Go to the start of the current table."
-  (if (text-property-search-backward 'vtable (vtable-current-table))
+  (if (or (text-property-search-backward 'vtable (vtable-current-table) #'eq)
+          (get-text-property (point) 'vtable))
       (point)
     (goto-char (point-min))))

 (defun vtable-end-of-table ()
   "Go to the end of the current table."
-  (if (text-property-search-forward 'vtable (vtable-current-table))
+  (if (text-property-search-forward 'vtable (vtable-current-table) #'eq)
       (point)
     (goto-char (point-max))))

--
2.38.1

             reply	other threads:[~2022-10-22  7:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-22  7:21 lamppilutti--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-11-24 20:01 ` bug#58712: Incorrect vtable edges recognizing Stefan Kangas
2022-11-25 13:08   ` bug#58712: Ответ: " lamppilutti--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-09-07 20:27     ` Stefan Kangas

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

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

  git send-email \
    --in-reply-to='rma9WTMSooPeE5NxkzSG7Is_Ailt5fMBAONwOztDeH-HcSS1Nx1zagYIcZW_P9vqVxpgN0cfiGv8dfwmL00jKeumuc1C9wwm6ukGwLJbG6c=@protonmail.com' \
    --to=bug-gnu-emacs@gnu.org \
    --cc=58712@debbugs.gnu.org \
    --cc=lamppilutti@protonmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.