From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64108: hippie-expand's try-expand-all-abbrevs nil has trouble expanding abbrevs given as list(aka. expand.el snipets) Date: Fri, 16 Jun 2023 19:25:54 +0300 Message-ID: <83legjs7al.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38185"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64108@debbugs.gnu.org To: Yilkal Argaw Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 16 18:27:24 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 1qACIG-0009lE-Fu for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 16 Jun 2023 18:27:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qACHw-000057-GT; Fri, 16 Jun 2023 12:27:04 -0400 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 1qACHv-00004r-13 for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 12:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qACHu-0004qb-Oy for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 12:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qACHu-0005sl-BA for bug-gnu-emacs@gnu.org; Fri, 16 Jun 2023 12:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 16 Jun 2023 16:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64108 X-GNU-PR-Package: emacs Original-Received: via spool by 64108-submit@debbugs.gnu.org id=B64108.168693276922538 (code B ref 64108); Fri, 16 Jun 2023 16:27:02 +0000 Original-Received: (at 64108) by debbugs.gnu.org; 16 Jun 2023 16:26:09 +0000 Original-Received: from localhost ([127.0.0.1]:50249 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qACH3-0005rS-50 for submit@debbugs.gnu.org; Fri, 16 Jun 2023 12:26:09 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qACGy-0005qu-62 for 64108@debbugs.gnu.org; Fri, 16 Jun 2023 12:26:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qACGs-0004Hu-8n; Fri, 16 Jun 2023 12:25:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=KXyt4MJi/cebFb9DGmKsKn57w8K6aSowvNXXtdP0o30=; b=ZIuqMWJI98nw kIo0VcAWSkVS3nUQFH3bmY3VvGkIc1nwEkm1X8dtKzxZ7kAfbActZBMMdHzCYMJJWKep2/tXcK8D4 FGhDq6T0jhSGVQadggQX//fhCIvOSNa6OT7euH7yC21NZHZ6j0vK9mlZYQKseR6i/k9B3U1JwPHh7 sbJSqyIgNva9GUk69MAI9dsgcQhJzdoceAy9c8qLfE/0Za4D4wgh+EtqBvyjt6Gn/bxpxHjbrxyDR Ak5u1atDb0pqFfqkzirrd8Ai9ZeIwzqnPMheJ9udvACyvtHUDDg/JalBXfymD+R6ltZKd3sa3va0p TeuBnJAltloSlxJ1L3FvLA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qACGq-00014k-Tm; Fri, 16 Jun 2023 12:25:58 -0400 In-Reply-To: (message from Yilkal Argaw on Fri, 16 Jun 2023 17:24:15 +0300) 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:263477 Archived-At: > From: Yilkal Argaw > Date: Fri, 16 Jun 2023 17:24:15 +0300 > > When trying to use hippie-expand to expand a simple expand.el snippet causes a bug about lists not > being acceptable. > > To recreate the bug use the following init.el and try to expand def using hippie expand > ;;init.el > (defconst elisp-expand-list > '(("def" "(defun ()\n ) " (8 9 11 12))) > "Expansions for elisp mode") > (add-hook 'emacs-lisp-mode-hook > (lambda () (expand-add-abbrevs emacs-lisp-mode-abbrev-table elisp-expand-list))) > (add-hook 'lisp-interaction-mode-hook > (lambda () (expand-add-abbrevs emacs-lisp-mode-abbrev-table elisp-expand-list))) > (global-set-key [remap dabbrev-expand] 'hippie-expand) > > This error persists even when calling the (try-expand-all-abbrevs nil) using eval expression the debug > log is as follows. It looks like hippie-expand doesn't support "special" abbrevs, those whose expansion is obtained by running a hook function (as opposed to just using the string that is the abbrev's expansion). IOW, hippie-expand expects that abbrev-expansion returns a string, which is not what happens with "special" abbrevs. And expand.el, where expand-add-abbrevs is defined, defines such "special" abbrevs. Patches to adapt hippie-expand to abbrevs created by expand.el are welcome.