From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: torys.anderson@gmail.com (Tory S. Anderson) Newsgroups: gmane.emacs.help Subject: Help writing a helm email-address-at-point fn Date: Sat, 09 Mar 2019 22:06:52 -0700 Message-ID: <87bm2jco7n.fsf@byu.edu> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="58912"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: Emacs Help List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 10 06:07:13 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h2qg5-000FDd-At for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Mar 2019 06:07:13 +0100 Original-Received: from localhost ([127.0.0.1]:40199 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2qg4-0007H7-9s for geh-help-gnu-emacs@m.gmane.org; Sun, 10 Mar 2019 00:07:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h2qfq-0007Gz-FA for help-gnu-emacs@gnu.org; Sun, 10 Mar 2019 00:06:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h2qfp-0006sl-O2 for help-gnu-emacs@gnu.org; Sun, 10 Mar 2019 00:06:58 -0500 Original-Received: from mail-pf1-x429.google.com ([2607:f8b0:4864:20::429]:45674) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h2qfp-0006qd-Ew for help-gnu-emacs@gnu.org; Sun, 10 Mar 2019 00:06:57 -0500 Original-Received: by mail-pf1-x429.google.com with SMTP id v21so1188397pfm.12 for ; Sat, 09 Mar 2019 21:06:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:content-transfer-encoding:date:message-id :user-agent:mime-version; bh=c2F86oLe6jdX+ZUK5TnDRupFK2e84/C6SNRnW1jOGV0=; b=Bo1/EmHDC5ynyBgnP8yVpI4u1jO2bqMKtVn5/Qq/oO4mZjaxKCUcXWdy9kk0BOkRr1 JEDAL79Hgns+a7VxQbFA7hmstN94XgaNWWhnPfLRDs95vtn7HksOVqwQmjVp6NXOau4M 2ioUVJ1XfYjDSJWYiEfTy5fsBat5SAxGaFM+zwWxo6bcFDaaURg/rDz567wnACVcMOW8 rNOFd4Suwhi5MGnbOUFSPXIQsupeq8XDvsuWm2U5ssCnyLw4kUbPdJvVFkhMrIiRevK3 PorNbTsnX6LWGaM0GWB1jAd1eQEaQ1WRVSnOVCc+0tCTZdnR8ornOhUIToXdLFT3I5F6 XvdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:content-transfer-encoding:date :message-id:user-agent:mime-version; bh=c2F86oLe6jdX+ZUK5TnDRupFK2e84/C6SNRnW1jOGV0=; b=kjpGU/xtiiQ7kctjNALozqP07hy6xqM5UVDpOmOgK1X3BTWpzRXGe5UpYPAD7zEEp4 KPekGUjMy98jpZo+By47nxn/YRjRuFw9ABXrNcUYTdGnX9HMYAbUPZ1JSJgNVP/qpRch 4MMDdezfPWBFOuF8a3P5ibNcjubvJ2ydRD3QePZTPrP+LkmL4eOqTeM5NTjv6cQt2s/k nI7w3Y8x9ZgoSTEM4Fp4T/SeKg7ENneANDy4EWv2TDTwqvKWySZ5RHbjBW9gUYPjLtZy qo/3adnWTOGZx4nLT8iBQc0zDXgjt0h8WmAodH8cEOSYXjA/Jw0VGzyJfeX5pV5SUbJC HOXw== X-Gm-Message-State: APjAAAVE1jSOcRzBk0CBE0Zb8colpAa+qbJioO9m3idTeDLuXVaa0vGp 6nuaXfM2bRj/kI1VOaJzv9ZaJOP2 X-Google-Smtp-Source: APXvYqxDP/U14BQmYZW3FGMYl7LQtcEnKzFpn/hCqdNcv7J2XTKkzt90ehQ5buUjNedcSGaAG7u2tQ== X-Received: by 2002:a17:902:bb0c:: with SMTP id l12mr27555156pls.108.1552194415687; Sat, 09 Mar 2019 21:06:55 -0800 (PST) Original-Received: from endlessinside ([128.187.112.30]) by smtp.gmail.com with ESMTPSA id e5sm2932467pfd.73.2019.03.09.21.06.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 09 Mar 2019 21:06:54 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::429 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119596 Archived-At: I use helm and bbdb to complete addresses in my to/from/cc fields. It sort-of works, but I'm leveraging word-at-point. This means that if I type "Joe" and type "", I see the completions I expect, but if I type "Joe Somebod" I get completions (and replace) just the "Somebod", both not taking into account the "Joe" and also leaving it there after I make my selection. It seems like I need to define a new "thing-at-point" function, but I'm having trouble figuring out how. Looking at how bbdb-company isolates the right match, I gleaned the following regexp: --8<---------------cut here---------------start------------->8--- (looking-back "^\\(To\\|Cc\\|Bcc\\): *.*? *\\([^,;]*\\)" (line-beginning-position)) --8<---------------cut here---------------end--------------->8--- But I can't quite figure out how to use that to make a thing-at-point I could drop in to replace my use of `word-at-point`. Any help would be much appreciated. - Tory