From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iDzSCSRNHmGSrAAAgWs5BA (envelope-from ) for ; Thu, 19 Aug 2021 14:23:00 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6MWSBSRNHmFHTQAAB5/wlQ (envelope-from ) for ; Thu, 19 Aug 2021 12:23:00 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8445913BFF for ; Thu, 19 Aug 2021 14:22:59 +0200 (CEST) Received: from localhost ([::1]:55400 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGh4U-0006Gb-IN for larch@yhetil.org; Thu, 19 Aug 2021 08:22:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGh44-0006Fm-UF for emacs-orgmode@gnu.org; Thu, 19 Aug 2021 08:22:33 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:34376) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGh43-0005p4-09 for emacs-orgmode@gnu.org; Thu, 19 Aug 2021 08:22:32 -0400 Received: by mail-pg1-x533.google.com with SMTP id x4so5733745pgh.1 for ; Thu, 19 Aug 2021 05:22:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:subject:date:in-reply-to:message-id :mime-version; bh=GKMCskzZ0ntDasW0dIlp4Tms4Ir91IGonqHt5PEMvgw=; b=WSkSLoGXxx+DSlq3wYMUBSJJMjyTRtRpyTRfiT8SAH6CqhvykYArxHlat44EVM0G/X HbliPEud633rkHbXTk1DGjRmdEk92cBqXXAUFjy91BboWGOBmLDbRoEFm0DnL3qTAjiT QTJaVHCcsIqOfomZmpFDZfTr549p1QugbgrP1QE/aREzlamyIb+QmLaGbPAV/CqR21+b JdJIOlsYEElEoNTmbPKteZBJNOown6gMJEkzZZB0+11JYOj6KA86OdZ+TuQF2rux1Pw5 GwDs32uQ+NhHyfsFLoDpwdVY3WdN49sDubDh7KXQoVUPrRpuu3G84D3CpkTBcqTrp9ew /omw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:subject:date :in-reply-to:message-id:mime-version; bh=GKMCskzZ0ntDasW0dIlp4Tms4Ir91IGonqHt5PEMvgw=; b=e7x+V5BummN7GmcxAkFUgIfloVLpGXpYudB6aWFq4xLqvtmwV2PbdcByGo/7ngTCa6 tZ4AwedEBo3c6ZP46jBxcXKBiUx5KIuTSdOqhJq0919mT69TA811vaQLXp/czRsflBt2 7Hz7oVguVv1GulI7+fChO40ZErAagtLS3BWG9lIh6vrglArBlXkDtXHsj7C3ncSDnj9h CMFaBMqcDYm06mV7nQviNUwHZ7iQHr+Fs4mFfL01pxogQrDAG/AitstCP46Z8Q2lf0UQ mvuudsLkLiYEOWQQO1ElTcMueTiuZuE7A9WaA8P8lPjfc5OH9yNVDxi+XNXL1cQkTu7t tqpw== X-Gm-Message-State: AOAM533B9FHzXGIcDzEePzpLHb4LaOT52ZvkBnO0sbHk7tQBTEAtulFG oAw6+6Ycqfxrq9LJKmRrCJ1zy/nDNs0= X-Google-Smtp-Source: ABdhPJxy+a1ZPQOPPQWe2u01o/avHRKhQG17lD8kmdz0qO720rF4AlYzANxns1KrOQicogHByVk+0A== X-Received: by 2002:a63:7c5:: with SMTP id 188mr13891081pgh.211.1629375748219; Thu, 19 Aug 2021 05:22:28 -0700 (PDT) Received: from tim-desktop (106-69-77-132.dyn.iinet.net.au. [106.69.77.132]) by smtp.gmail.com with ESMTPSA id w145sm3313361pfc.169.2021.08.19.05.22.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Aug 2021 05:22:27 -0700 (PDT) References: User-agent: mu4e 1.6.3; emacs 28.0.50 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Bug: campany-capf throwing an error in org-mode, while entering header args [9.4.6 (9.4.6-12-gdcc3a8-elpaplus @ /home/mypc/.emacs.d/elpa/org-plus-contrib-20210809/)] Date: Thu, 19 Aug 2021 22:21:08 +1000 In-reply-to: Message-ID: <87h7fl1v5r.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=theophilusx@gmail.com; helo=mail-pg1-x533.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629375779; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GKMCskzZ0ntDasW0dIlp4Tms4Ir91IGonqHt5PEMvgw=; b=fDf//+ZcOJW0dnz9bKIlw4sSwTp/EYKpnTfvYm+TaWR1pK7Igr05bshn9a8RNDRj25hCPL vtnjtY0RxIP8FNxxClgrvu57Xx0GG73rpFVu1c5iLt0gnoa1STw3qzJuSmACfnvmXW1ukN y4rx008g3lBRkdmbxKFyOGX8n1FrkqnaXy7Vqi23oo5l/onv+V1EaeSH8Yv4yyhdhsP6qV eSrFmnT6gyP7frzkScjyL1huUo5FVNZnKTKEzRmuLsii/UPy1n8K5aGBZHtxJI5fzvR6sa ZaXdtBZcutABBw3uFCQVmuHYd3OT0EGT/L7YA5J8arJuBZtIAW/7Cuju3QPSmg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1629375779; a=rsa-sha256; cv=none; b=DSDt1IHzlPN+9yUJgGr73M+ZVJIkUNT1C5PlQQJPWTEAjkrUez4gb1f1WD/454mTBcZs8H lCzRoGZfn84ldm6BpVDMe3U/XEEz1pZ4ZEtHS2dSXrNG2Qox9FsR7s/yoyPKZeaGs4XX6s 5mb0Ig6Kk5djxF1tFUJL1eo24cWFwhcj/Tqwoc6hyclDDFlMTEgTnfXT2nqSLYHLa2HezO k7o1MBJPaxGz78d+rm0Rr0leqRFLLOhSaM39QNwpdxQN6WkHVQm7ByJ0OYEBrtvs2C3ig/ +YYL+q5myINBycPJWk/b68pXjb/9rAl+ijqufC+m8YiEgH24iTdWsZKGi8kbNw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=WSkSLoGX; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -3.78 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=WSkSLoGX; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: 8445913BFF X-Spam-Score: -3.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: RwLoYB97kUPh Is this something which should really be reported to the company-capf maintainers? C K writes: > Remember to cover the basics, that is, what you expected to happen and > what in fact did happen. You don't know how to make a good report? See > > https://orgmode.org/manual/Feedback.html#Feedback > > Your bug report will be posted to the Org mailing list. > ------------------------------------------------------------------------ > > campany-capf throwing an error in org-mode, while entering header args > > #### Error in `*Messages*` buffer > > ``` > Company: backend company-capf error "Wrong type argument: char-or-string-p, nil" with args (prefix) > ``` > > #### Steps to reproduce > > - emacs -Q > - `(add-to-list 'load-path "~/.emacs.d/elpa/company-20210811.214/")` > - `M-x load-library` `company` > - Open a org-mode buffer > - enable `company-mode` > - enter the example below, you will get the error when typing `:var` > > ``` > #+Name: get-env > #+begin_src emacs-lisp > (print "hello") > #+end_src > > #+begin_src emacs-lisp :var env=get-env() > (print env) > #+end_src > ``` > > #### Expected behavior > This should not trigger an error. > > #### The error backtrace > > ``` > Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) > org-babel-balanced-split(nil 32) > #f(compiled-function (pair) #)((:var)) > org-babel-parse-multiple-vars(((:var))) > org-babel-parse-header-arguments(":var" light) > #f(compiled-function (h) #)(":var") > org-babel-get-src-block-info(light) > pcomplete/org-mode/block-option/src() > pcomplete-completions() > pcomplete-completions-at-point() > completion--capf-wrapper(pcomplete-completions-at-point optimist) > company--capf-data-real() > company--capf-data() > company-capf(prefix) > apply(company-capf prefix) > company-call-backend-raw(prefix) > company--force-sync(company-call-backend-raw (prefix) company-capf) > company-call-backend(prefix) > company--continue() > company--perform() > company-post-command() > > ``` > > with `C-M-i` I get this error in messages buffer > > ``` > Error in post-command-hook (completion-in-region--postch): (wrong-type-argument char-or-string-p nil) > ``` > > trace - > > ``` > Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil) > org-babel-balanced-split(nil 32) > #f(compiled-function (pair) #)((:var)) > org-babel-parse-multiple-vars(((:var))) > org-babel-parse-header-arguments(":var" light) > #f(compiled-function (h) #)(":var") > org-babel-get-src-block-info(light) > pcomplete/org-mode/block-option/src() > pcomplete-completions() > pcomplete-completions-at-point() > completion--capf-wrapper(pcomplete-completions-at-point optimist) > company--capf-data-real() > company--capf-data() > company-capf(prefix) > apply(company-capf prefix) > company-call-backend-raw(prefix) > company--force-sync(company-call-backend-raw (prefix) company-capf) > company-call-backend(prefix) > company--begin-new() > company--perform() > company-auto-begin() > company-idle-begin(# # 230 95) > apply(company-idle-begin (# # 230 95)) > timer-event-handler([t 24857 34109 966818 nil company-idle-begin (# # 230 95) > nil 848000]) > > ``` > > Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) > of 2021-07-22 > Package: Org mode version 9.4.6 (9.4.6-12-gdcc3a8-elpaplus @ /home/mypc/.emacs.d/elpa/org-plus-contrib-20210809/)