From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Matthias Meulien Newsgroups: gmane.emacs.bugs Subject: bug#65702: 30.0.50; compile-command not honored in shell buffers Date: Sun, 03 Sep 2023 09:30:04 +0200 Message-ID: <87cyyzyarn.fsf@gmail.com> References: <87h6ocy9rr.fsf@gmail.com> <835y4sad6l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36903"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 65702@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Sep 03 09:31:19 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 1qchZm-0009SE-LW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Sep 2023 09:31:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qchZP-0007JJ-Bg; Sun, 03 Sep 2023 03:30:55 -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 1qchZN-0007J8-M3 for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 03:30:54 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qchZM-0003O1-L4 for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 03:30:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qchZW-0003xK-DW for bug-gnu-emacs@gnu.org; Sun, 03 Sep 2023 03:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthias Meulien Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Sep 2023 07:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65702 X-GNU-PR-Package: emacs Original-Received: via spool by 65702-submit@debbugs.gnu.org id=B65702.169372623010697 (code B ref 65702); Sun, 03 Sep 2023 07:31:02 +0000 Original-Received: (at 65702) by debbugs.gnu.org; 3 Sep 2023 07:30:30 +0000 Original-Received: from localhost ([127.0.0.1]:39162 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qchYz-0002lF-F6 for submit@debbugs.gnu.org; Sun, 03 Sep 2023 03:30:30 -0400 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:46556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qchYu-0002Gs-0i for 65702@debbugs.gnu.org; Sun, 03 Sep 2023 03:30:27 -0400 Original-Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-402c46c49f4so4406755e9.1 for <65702@debbugs.gnu.org>; Sun, 03 Sep 2023 00:30:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693726207; x=1694331007; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=V1c/w03+mAO90Vv5ZvVDZN3B9bD6ffZvG0zqZ5XlQ/E=; b=Oc62cPQgJJ0J4tPaKDCi5W7WgR9WErSX2XNWVb/LcYgl2m9ZCoCtEs5W3BWtiPFcP+ V02KT972OjjqVIE05l7fWcmMoU8LdKQpUNJONgYx2P7dbtHuw6JVqA0DcjjymfhAC9/2 ztLNDsc92oDTo/E6kbVayIsyNcD/M3To+WOlwoiyG0FTnvze4B3ulomgEuJxe7kREOBb hUD1NKlAPHh0X+hi6lyn2vYsFKvlSSyrGvJoMPCYDMP+ae+L0hWVJB3+fychMHqFSFTn GGEpR/f1h0BfNY/Z5yomBOMeC1pb41S+wZ2BOkIY9hrAU5wr7Ux83qlNo+GF893o0TQf sNpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693726207; x=1694331007; h=mime-version:user-agent: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=V1c/w03+mAO90Vv5ZvVDZN3B9bD6ffZvG0zqZ5XlQ/E=; b=WNclkm4vOJEZ7gzxJ95w6hbQ/TlqM7qKmKpVG4M0+3wmxzdCT4MkEAZKJkAm51+tVc Fi19Oe7sXNi+2mrMBkMTUnpEPxvbNEIK7vdk2Ws7DnPrkMOnrXonFtd5BKMiLUHp1B1U ehx5WgDgCxzdIVXfCoGc3HNsr1nsT3vKOHtZA/VcGpJDl8xEDnC+fPhx0ZxYXoTjK0Xt gzb3+X4kWkV1Ty5PeNUvqVw9h7f3/bVWiA76ZTP5GCeQt5ojgBiWZagHce7s6Tn+Fx6V j7J3hz4dTtjZxX6bMcidEWUwYyN3ds110xJKkXgRH4qpvH+A+4ArBf5ku0OiEZORRNBc nE9g== X-Gm-Message-State: AOJu0YxEZffcr6r8C7S5xrqqnVVsF/My1t4A3sM+ec30dE/NW3cF9/ZI u61RuKwXtk4ahSsNS9Qm66nlvuV82AI= X-Google-Smtp-Source: AGHT+IGmJ+AJREviCtrwHNcoOW1pxIRwjwz34fe9KVSAgQ3An+S7U41k3/BbVfVRI6Ejl//uTiJVlw== X-Received: by 2002:a05:600c:2051:b0:400:8d91:ffea with SMTP id p17-20020a05600c205100b004008d91ffeamr5181876wmg.37.1693726207399; Sun, 03 Sep 2023 00:30:07 -0700 (PDT) Original-Received: from carbon.localdomain ([2a01:e0a:245:c850:98f5:429a:aa8e:95bb]) by smtp.gmail.com with ESMTPSA id m13-20020a7bce0d000000b003fed630f560sm10279877wmc.36.2023.09.03.00.30.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Sep 2023 00:30:06 -0700 (PDT) In-Reply-To: <835y4sad6l.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 02 Sep 2023 16:59:30 +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:269081 Archived-At: Eli Zaretskii writes: >> From: Matthias Meulien >> Date: Sat, 02 Sep 2023 15:39:20 +0200 >> >> >> I customize the default compile command using directory local >> variables. For example, with a '.dir-locals' containing the following: >> >> ;;; Directory Local Variables -*- no-byte-compile: t -*- >> ;;; For more information see (info "(emacs) Directory Variables") >> >> ((nil . ((compilation-search-path . (nil "builddir")) >> (compile-command . "meson setup builddir . --cross-file crossfile_arm.ini ; pushd builddir && meson compile ; popd") >> (compilation-environment . ("TERM=ansi")) >> (ispell-local-dictionary . "en") >> (project-vc-merge-submodules . nil))) >> (c++-mode . ((c-basic-offset . 2) >> (indent-tabs-mode . nil)))) >> >> When I enter the *vc-dir* buffer for the corresponding Git local >> repository, and I press 'C-x p c' ('project-compile' command) then the >> default compile command has the value specified in the previous >> '.dir-locals.el'. >> >> Same with 'meson.build', 'README.md', '*.cc', '*.h', etc. files. >> >> But when 'project-compile' is called from a shell buffer after I pressed >> 'C-x p s' then the default compile command is 'make -k'. This is >> strange and looks like a bug to my eyes. > > Aren't directory-local variables in effect only in file-visiting > buffers? The shell buffer created by "C-x p s" doesn't visit a file, > so I think directory-local variables are not in effect for it. Oh thank you! I now understand, I should have realized that the same behavior is observable in *xref*, or *Occur* buffers. Thank you Eli. Sorry for the annoyance. I'll override 'project-compile' in order to use the 'compile-command' set for the project-root directory. It'll be ok for my use case. -- Matthias