From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Willemsen Newsgroups: gmane.emacs.help Subject: Re: Turning comments into hyperlinks Date: Thu, 19 Jul 2012 11:45:27 +0200 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342691156 22706 80.91.229.3 (19 Jul 2012 09:45:56 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2012 09:45:56 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: "Sohail Somani" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 19 11:45:54 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrnIu-0004Rv-U0 for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Jul 2012 11:45:53 +0200 Original-Received: from localhost ([::1]:33653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrnIu-0002Fy-3p for geh-help-gnu-emacs@m.gmane.org; Thu, 19 Jul 2012 05:45:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58326) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrnIj-0002Fg-TN for help-gnu-emacs@gnu.org; Thu, 19 Jul 2012 05:45:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrnIh-0006VZ-Py for help-gnu-emacs@gnu.org; Thu, 19 Jul 2012 05:45:41 -0400 Original-Received: from smtpout1.alwaysdata.com ([46.105.78.239]:48948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrnIh-0006UT-K5 for help-gnu-emacs@gnu.org; Thu, 19 Jul 2012 05:45:39 -0400 Original-Received: from 78-20-157-62.access.telenet.be ([78.20.157.62] helo=localhost) by smtpout1.alwaysdata.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.77) (envelope-from ) id 1SrnIW-0003QB-E0; Thu, 19 Jul 2012 11:45:28 +0200 User-agent: mu4e 0.9.8.5; emacs 24.1.50.1 In-reply-to: X-alwaysdata-Spam-Score: -2.9 X-alwaysdata-Virus-Report: CLEAN X-alwaysdata-Scan-Date: 2012-07-19 11:45:36.502478 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 46.105.78.239 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85929 Archived-At: Hey Sohail, Sohail Somani writes: > I have come across an inconvenience which I would like to resolve. I am > working on a codebase which has the following patterns throughout the code: > > // JIRA 12312 > // ISSUE 12312 > // KEY-12312 > > What I would like to do is match these patterns and turn them into > hyperlinks that open in the browser. So for example, I might turn > KEY-12312 into a hyperlink to http://jira.myhomies.com/KEY-12312 but > continue to display the original text. > > How would I accomplish this with cc-mode or emacs in general? Have you looked at `bug-reference-prog-mode'? From what I read it seems to fit perfectly with what you're hoping to accomplish, though I haven't tried using it myself and I think its only available in emacs 24.