all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Ankit Gadiya <ankit@argp.in>
Cc: dev@rjt.dev, 70939@debbugs.gnu.org
Subject: bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode
Date: Thu, 16 May 2024 19:01:11 +0300	[thread overview]
Message-ID: <86bk55iw54.fsf@gnu.org> (raw)
In-Reply-To: <CAN7zea1_xU9jbe2F2XaMC4E5y9T8CS=-LR=xt_2zSrsc-UWifg@mail.gmail.com> (message from Ankit Gadiya on Thu, 16 May 2024 20:33:31 +0530)

> From: Ankit Gadiya <ankit@argp.in>
> Date: Thu, 16 May 2024 20:33:31 +0530
> Cc: Randy Taylor <dev@rjt.dev>, 70939@debbugs.gnu.org
> 
> > If the variable is specific to go-ts-mode, it should indeed be
> > prefixed with "go-ts-".  But I don't see this variable in
> > go-ts-mode.el nor in the patch (did I miss something?), and I don't
> > understand why the above condition insists on using only a
> > buffer-local value of the variable in the first place?  What's wrong
> > with having a global value for the variable?
> 
> I'm not yet familiar with Elisp-idioms but I'll explain my idea and why I used
> the variable this way.
> 
> The build tags can be unique to the specific project and sometimes even per
> go package. So I thought to make it buffer specific rather than a global
> variable defined in the init.el. I'm using these changes on my machine and I'm
> defining the build tags in the dir-locals file. This way the variable is always
> available for the mode commands to access.

It's okay to support buffer-local values, but using the value of the
variable will do that automatically; you don't have to verify it has a
local binding.  What I don't understand is why does your code _reject_
global bindings.  If some user wants to set up a global value for some
reason, or have a default global value and special local values in
some cases, why should we prevent that?

> But now I'm thinking maybe it makes sense to add it as defvar-local under the
> go-ts-mode? Please guide me with what will be the correct way to implement it.

Yes, defvar-local could be what we want.  But I first would like to
understand what is special about this variable that it should be
buffer-local.





  reply	other threads:[~2024-05-16 16:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14 14:04 bug#70939: [PATCH] Add commands to run unit tests in go-ts-mode Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 16:52 ` Eli Zaretskii
2024-05-14 17:24   ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-14 17:59     ` Eli Zaretskii
2024-05-15  2:36 ` Randy Taylor
2024-05-15  4:55   ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-16  2:32     ` Randy Taylor
2024-05-16  8:27       ` Eli Zaretskii
2024-05-16 15:03         ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-16 16:01           ` Eli Zaretskii [this message]
2024-05-18  9:54             ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-25  2:35               ` Randy Taylor
2024-05-28  2:30                 ` Randy Taylor
2024-05-28 19:58                   ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-19 18:17                     ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-21  2:40                       ` Randy Taylor
2024-06-23 14:46                         ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-06-26  2:26                           ` Randy Taylor
2024-06-26 11:27                             ` Eli Zaretskii
2024-06-26 12:31                               ` Randy Taylor
2024-06-23 14:56                         ` Eli Zaretskii
2024-05-17  2:27       ` Randy Taylor
2024-05-18  8:55         ` Ankit Gadiya via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-15 11:21   ` Eli Zaretskii
2024-05-16  1:24     ` Randy Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86bk55iw54.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70939@debbugs.gnu.org \
    --cc=ankit@argp.in \
    --cc=dev@rjt.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.