From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Newsgroups: gmane.emacs.bugs Subject: bug#67514: 30.0.50; completion preview symbol length calculation should use point Date: Tue, 28 Nov 2023 21:39:49 +0100 Message-ID: <87y1ehfw8a.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15408"; mail-complaints-to="usenet@ciao.gmane.io" To: 67514@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 28 21:41:49 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r84tw-0003sy-VM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 Nov 2023 21:41:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r84t9-0004fo-1O; Tue, 28 Nov 2023 15:40:59 -0500 Original-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 1r84t5-0004eM-Ku for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 15:40:56 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r84t5-0005of-Cl for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 15:40:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r84tC-00045t-EF for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 15:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Herman@debbugs.gnu.org, =?UTF-8?Q?G=C3=A9za?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Nov 2023 20:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67514 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170120404715685 (code B ref -1); Tue, 28 Nov 2023 20:41:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Nov 2023 20:40:47 +0000 Original-Received: from localhost ([127.0.0.1]:47837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84sw-00044u-ER for submit@debbugs.gnu.org; Tue, 28 Nov 2023 15:40:47 -0500 Original-Received: from lists.gnu.org ([2001:470:142::17]:35916) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r84sd-000432-IY for submit@debbugs.gnu.org; Tue, 28 Nov 2023 15:40:30 -0500 Original-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 1r84sR-0004Tj-5N for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 15:40:15 -0500 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r84sM-0005Tg-06 for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2023 15:40:14 -0500 Original-Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-332c7d4a6a7so3957919f8f.2 for ; Tue, 28 Nov 2023 12:40:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701204006; x=1701808806; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=lZ5jUwSpRUmbuFCv4GaEtDcZURfbA01iRsFoe/PbYr0=; b=Cz5E+WPWtZdt8zfDOFPeJyvihXiTqAM2xHNAP6Guh1Y2kkyeERiyYsOSjZd+U7yavQ xfk498litxovsRYy+ZwmArOyw3yIrykm4YYgbOZI3gYBqiJJfQ3sVKM7EB4OXj2l0QcF 2JUlNkP4vPJUxpbf9JZNPTwyARq2HCCzeE3E/1YfzbtJNcjLh+QyxqJNyZ4evsY5jgR3 IwNljGJLfgrBd4lQRWMAuISMi3XechrNe6m11QOP8PIWwCioFufNlRD85TGjmKr+z1lw sPu50YlYeAtSmQI4KJaxOfpPgDcFaPON4BVf+lbt3O4o9t3o5zcqSTnlylurY+hDUdqv vrvw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701204006; x=1701808806; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=lZ5jUwSpRUmbuFCv4GaEtDcZURfbA01iRsFoe/PbYr0=; b=JVW5OVesdFLEP459xYVZRX77PtiNcBL/xGIugNveYjjx50Si+XEvRGkezEQmBM6jUy m15hN93e9MJ8ErteUaTTS7zW5zpKYdjK3wQhGGOUxyMsPtQc6tlo44whc9LiLDGA5njC 4lFvxHtofA04OEEWsHMc6CPz+jDJH7efWO/ljtRKCPTMBG7R7n7Z8/LA3K31Fo7Thp52 v5TnvHssYfNa/YRnbACFjzN916323+ABy9MMmk2zdCTfBI7ajZpYeS6bJVQCqXPf3oOR 3143GwhDNf+/bI8CHqD4GYe1yNqB8d4t8+ZlbrE1I9cu0XQryPPxLuQKkxytQWLwkEpg 0MTg== X-Gm-Message-State: AOJu0YxfeqnxHkZ74/P3qRNRXEvhxdhvb1EV3LedS8M3jLEOxt/+ErBM gU63Hlr5AXNx0GysUoVsp0l2LikAKls= X-Google-Smtp-Source: AGHT+IESAYuDxsdmFsUJQVlodFxIm09lH5QL1I2T+gUkxb0xpzoLNUPNGxAx/y6zLMNM0cuUR+y4mg== X-Received: by 2002:adf:e84b:0:b0:333:86d:c28b with SMTP id d11-20020adfe84b000000b00333086dc28bmr3830140wrn.32.1701204006297; Tue, 28 Nov 2023 12:40:06 -0800 (PST) Original-Received: from localhost (netacc-gpn-4-30-169.pool.yettel.hu. [84.224.30.169]) by smtp.gmail.com with ESMTPSA id t8-20020a5d42c8000000b00332fa6cc8acsm8731546wrr.87.2023.11.28.12.40.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 12:40:05 -0800 (PST) Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=geza.herman@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:275178 Archived-At: I checked out completion-preview, and so far I like it. There is a thing which maybe can be improved (so this is not a bug report, just a suggestion): it's how completion-preview-require-minimum-symbol-length calculates the length. Currently it just returns the length of the symbol under the cursor. I think it would be better to use the length of the part that actually will be used for completion, because if the point is inside a word, then it should only consider the part between the symbol start end the point. I mean, completion-preview-require-minimum-symbol-length should look something like this: (let ((bounds (bounds-of-thing-at-point 'symbol))) (and bounds (<= completion-preview-minimum-symbol-length (- (point) (car bounds)))))