From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filippo Argiolas Newsgroups: gmane.emacs.help Subject: Re: Replace filename from compilation buffer errors Date: Fri, 29 Nov 2024 12:26:06 +0100 Message-ID: References: <87jzcmfg0h.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="29589"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Robert Pluim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 29 12:26:52 2024 Return-path: Envelope-to: geh-help-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 1tGz9A-0007bt-1e for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 29 Nov 2024 12:26:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGz8b-0006pf-0R; Fri, 29 Nov 2024 06:26:17 -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 1tGz8X-0006pL-Dx for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 06:26:13 -0500 Original-Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tGz8U-0006oQ-RS for help-gnu-emacs@gnu.org; Fri, 29 Nov 2024 06:26:12 -0500 Original-Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-434a044dce2so19315175e9.2 for ; Fri, 29 Nov 2024 03:26:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732879569; x=1733484369; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=z5dUHgpXoWcqhudnG3vtVEpzolGylzeA6X69p97uy9Q=; b=U84GkzlMhrPa0RakXKo4wZGC/1Ce+5rbIhZJtUEdNX6OJ4AX+0PPatP+xUZaPEendB o8y6eu8GrdeXTsixdRKk98PMtIiR2yn6OqmyLlxAZebaVNiumX7CKi89aJyNQTJmufIV xN31I7pocod12xfg4qdXrIDHYH93Yjpma4wXZvHmtn/FNgfmgs5fTgCZGcRWPtWO/sKC 7dYVMtcb+WqbzI9rviRg1KzCYsfc5BzYSTm9/VIYk2IEyrJO+miggPNHhjDBzBLOTSJh F6/9FkyaJ4s14FTFMmEY4We+C48+VE4DII4lcRBAFgAKVmo2UAJ22xyAXU67OqFzlpuE dtIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732879569; x=1733484369; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=z5dUHgpXoWcqhudnG3vtVEpzolGylzeA6X69p97uy9Q=; b=sVnGafbx6XZEK8CE36WbxNAX2QlFBFif5llu+Wyur+bEXKpNJKigxVeclpuDuYiGx2 tL7lDHwtA0qziRa9RjOLmS8QTZBWq7TmmQy4riwsrot+5NeUyb/LjFH9+OvB1mNzDSCB rrNjjWzj4FXudlPAY75xLpmafWpNlW4jgt/513ZrVRaT0umIVB7cSDH8xFE/ouVwnMow 2QbPw8u71930QvjPfr5FY1d4rJBUhglAfO49oEemGZ3nmPwFQcv6RZi9caBa7rKTSpBC JUYfatzTEEWhq5z04BbzetVc+2V6y469oQdkrR6tCdeoWVndqvN+R3MvKfZaitLZuPhJ elyA== X-Gm-Message-State: AOJu0YyV4O0kaVQpCJ4gBZt+8KNkfSliodUQJ0BHkTxhDOgjJnQIm3yz 96iQJVf2kTE7Ji+51cvhQ5AHGtQwq48FVsHrKxFQRPntwRSB3K7bvfYmLQrA X-Gm-Gg: ASbGnctDK//YeKs+pz/4+cakDsEy+vfRUXRPKPrDm1nGmWs3QBfQ/0ZwvS45El1hBH7 9FH6+Xcq5VNQ+02xPywkFgHtRHWTnIXcRRhD8A4K3oJvfpWY8164qdW7tL1CIXME6VD99cGsfHU N+I2hKhep523Ysu5zitlUootgdw6/IUlKxwTCJkgiBOPzlbeDrEhLagomvRi6kHM/Fvh5wOmPP+ DkVz2K/glM7hUI4ZOfC71qmne8mbiibViZymSW8vxKKx9TihYdqf6rboXk= X-Google-Smtp-Source: AGHT+IEkXSe5NjOErV3OLAbCIDlwgqlZQGCbniKiPehsC9Jk1ilyxiMbTTsGoi/tBvpPSXW2IAw6mg== X-Received: by 2002:a5d:6c65:0:b0:385:e0ea:d4d9 with SMTP id ffacd0b85a97d-385e0ead709mr595158f8f.14.1732879568620; Fri, 29 Nov 2024 03:26:08 -0800 (PST) Original-Received: from mba ([151.81.191.240]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-385ccd3a5f7sm4180168f8f.54.2024.11.29.03.26.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Nov 2024 03:26:08 -0800 (PST) In-Reply-To: <87jzcmfg0h.fsf@gmail.com> Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=filippo.argiolas@gmail.com; helo=mail-wm1-x335.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: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148438 Archived-At: Robert Pluim writes: >>>>>> On Fri, 29 Nov 2024 12:01:51 +0100, Filippo Argiolas said: > > Filippo> Hi I am working on a project that builds in a temporary workspace. > Filippo> I'd like to take advantage of Emacs compilation mode, especially jumping > Filippo> from an error to the locus inside the file. > > Filippo> Problem is it jumps in the file inside the temp workspace instead of the > Filippo> one in the source tree. > > Filippo> Is there a way to achieve a simple string substitution in the file name > Filippo> before jumping while keeping existing compilation regexps? > > The following perhaps: > > compilation-transform-file-match-alist is a variable defined in `compile.el'. > > Its value is (("/bin/[a-z]*sh\\'" nil)) > > Alist of regexp/replacements to alter file names in compilation errors. > If the replacement is nil, the file will not be considered an > error after all. If not nil, it should be a regexp replacement > string. > Thank you! seems perfect, no idea how I missed that! Filippo