NetBSD Problem Report #59737

From www@netbsd.org  Wed Oct 29 16:39:37 2025
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 193821A9239
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 29 Oct 2025 16:39:37 +0000 (UTC)
Message-Id: <20251029163935.CC9E61A923C@mollari.NetBSD.org>
Date: Wed, 29 Oct 2025 16:39:35 +0000 (UTC)
From: jan@swi-prolog.org
Reply-To: jan@swi-prolog.org
To: gnats-bugs@NetBSD.org
Subject: Feature request to set word-characters for libedit
X-Send-Pr-Version: www-1.0

>Number:         59737
>Notify-List:    bsiegert@NetBSD.org
>Category:       lib
>Synopsis:       Feature request to set word-characters for libedit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 29 16:40:00 +0000 2025
>Last-Modified:  Sun Dec 14 18:10:01 +0000 2025
>Originator:     Jan Wielemaker
>Release:        http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libedit
>Organization:
>Environment:
n/a
>Description:
Using emacs mode, words for moving the cursor and deleting are defined by ce__isword() in chared.c.   This is hard defined as iswalnum(p) || wcschr(L"*?_-.[]~=", p) != NULL.   If I test GNU emacs, it only seems to accept alnum and the underscore (which is also the definition of words for libedit's vi word definition in cv__isword()).

Ideally, it would be great of the word characters can be defined in ~/.editrc.  Alternatively, it could be defined by a function set by el_set().   If neither is acceptable, synchronizing the emacs definition with the vi one would be great.
>How-To-Repeat:
n/a
>Fix:
n/a.   I'm happy to help.   I'd first like to see the opinion of the maintainers though.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->lib-bug-people
Responsible-Changed-By: bsiegert@NetBSD.org
Responsible-Changed-When: Tue, 04 Nov 2025 18:10:38 +0000
Responsible-Changed-Why:
Moving over to the lib category.
This was filed as a pkgsrc bug by accident.


From: Christos Zoulas <christos@zoulas.com>
To: gnats-bugs@netbsd.org
Cc: lib-bug-people@netbsd.org, pkg-manager@netbsd.org,
 netbsd-bugs@netbsd.org, gnats-admin@netbsd.org, bsiegert@netbsd.org,
 jan@swi-prolog.org
Subject: Re: lib/59737 (Feature request to set word-characters for libedit)
Date: Tue, 04 Nov 2025 13:57:14 -0500

 https://www.netbsd.org/~christos/wordchars.diff

 christos

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/59737 CVS commit: src/lib/libedit
Date: Sun, 14 Dec 2025 13:07:40 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Sun Dec 14 18:07:40 UTC 2025

 Modified Files:
 	src/lib/libedit: chared.c chared.h common.c editline.3 el.c eln.c
 	    emacs.c histedit.h map.c map.h search.c vi.c

 Log Message:
 PR/59737: Bernie Siegert: Add a method to set custom wordchars.


 To generate a diff of this commit:
 cvs rdiff -u -r1.64 -r1.65 src/lib/libedit/chared.c src/lib/libedit/vi.c
 cvs rdiff -u -r1.30 -r1.31 src/lib/libedit/chared.h
 cvs rdiff -u -r1.50 -r1.51 src/lib/libedit/common.c
 cvs rdiff -u -r1.102 -r1.103 src/lib/libedit/editline.3 src/lib/libedit/el.c
 cvs rdiff -u -r1.38 -r1.39 src/lib/libedit/eln.c src/lib/libedit/emacs.c
 cvs rdiff -u -r1.62 -r1.63 src/lib/libedit/histedit.h
 cvs rdiff -u -r1.56 -r1.57 src/lib/libedit/map.c
 cvs rdiff -u -r1.13 -r1.14 src/lib/libedit/map.h
 cvs rdiff -u -r1.52 -r1.53 src/lib/libedit/search.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2025 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.