From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: master 1e3b0f2: Improve doc strings of project.el Date: Fri, 10 Jul 2020 17:57:12 +0300 Message-ID: References: <87bllfqj82.fsf@warpmail.net> <83imfnxgt3.fsf@gnu.org> <626efe11-0f9c-081b-11dd-0d61cee8168d@yandex.ru> <83h7v7xf7w.fsf@gnu.org> <831rmayj55.fsf@gnu.org> <6dc2c2ac-8e17-f044-dc78-8c109f936ad2@yandex.ru> <83wo42w83e.fsf@gnu.org> <6762abf5-71c1-aa54-1bac-d4c90c20870b@yandex.ru> <831rmavsuq.fsf@gnu.org> <83a70wv4mj.fsf@gnu.org> <5542db0c-cc0d-2743-87ae-7728a0cc94bb@yandex.ru> <83ftaf2rj2.fsf@gnu.org> <43a8f8d4-83fb-f012-8e1d-c1a618b0ef59@yandex.ru> <83mu4m0vub.fsf@gnu.org> <44f2f1f4-ae34-f0bf-b153-f33b8ee6069f@yandex.ru> <83mu4fvjh3.fsf@gnu.org> <7c2e93d4-8d86-bbbb-77a0-bf5d73051907@yandex.ru> <83imf2t4w4.fsf@gnu.org> <95fd893e-0da5-4cdc-a3e8-3c22af750aae@yandex.ru> <837dvfs6wg.fsf@gnu.org> <8bc1f381-248f-5cee-c3c6-a29d411a2f74@yandex.ru> <837dvbphs0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11088"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Cc: philip@warpmail.net, theo@thornhill.no, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jul 10 16:58:14 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jtuTe-0002nc-7T for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Jul 2020 16:58:14 +0200 Original-Received: from localhost ([::1]:41698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jtuTd-00041R-72 for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Jul 2020 10:58:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jtuSm-0003Z5-CZ for emacs-devel@gnu.org; Fri, 10 Jul 2020 10:57:20 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:45389) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jtuSk-0000Gu-FQ; Fri, 10 Jul 2020 10:57:20 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id s10so6226892wrw.12; Fri, 10 Jul 2020 07:57:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=hXUHLA1F2Dl3gBibBZdehK4QfzBvZsRIsxIdMtOUUSU=; b=gPontRXGXPuZQnmmqTSpi6PO9m3lqtwy2lWo4bESTXOfWlZckUAdhsbwEx/1cvaHFv cWyaCUqXEHzSyOcuI3+UkoSxJoiqb5EzfbJufruEO6plBE9tOwa9l8aS6j8ZrU6Af0vq iz7IbFY5Y7AoD/bTZJiJ2dsKl1lTp9va0qAlGQ3GPXWzWqCQX2uWSMFhuB3VaeVdhNBz MP3EHKhy7I3XWzvsbEJpCHQA6KwraMcRDy8VlXBMB75QgzrdNrFNhrH5AAxPvdpwzFTe yvEEYGPc99soEK0HcorFZJY+y1Our/PjNnpEY5prAcK3m4WAEM6y5ttyhD79X5RkQTxR 3PwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=hXUHLA1F2Dl3gBibBZdehK4QfzBvZsRIsxIdMtOUUSU=; b=huxscn8Be0cNTGFkC53lLtn7c8kcm1/0ZGNfLWOXp/YWC8B3XBvuq4xJY2Z1fsZuXV 2fp57AvdlW+V68NekT1hmRbetMTrngfFDtH5YJg2LXQMqpnYxgIncx+XMuIjhYlpOMOw x3sC4L2PHwSSN8TwailuNkHMmOEzFJFJm3igMyMLkYHSkdOwzBHTT5B2GgTz+YU1aNJN 4LfBTre7ZhcCdeDe+DrdpMc+KYRoQz8ZDrT0NK9sUYc4CeSY/4gCTHGuUkyNXRb3ZoJO C4U/VniOstH1B6POOmPLTMwIewTd2JT+Yx+62B30VjOC3U0geeRo8kzwEJ73RTY4xzs9 4/GQ== X-Gm-Message-State: AOAM5319AIn4hAO43yIwmcVNo6xDBFBC509S68NqpAX762PQnMygGRm+ OO0omL2BXLc+pZ0DwWjfyjgdpZmz X-Google-Smtp-Source: ABdhPJy8a0ZOXDog994Y3DIhXZzG+X3ry2XdEaSGqP1Zr5+RT8Y3e8WWwpkj7fGHQsczEtMJhvuy0A== X-Received: by 2002:a5d:6748:: with SMTP id l8mr75885269wrw.347.1594393035971; Fri, 10 Jul 2020 07:57:15 -0700 (PDT) Original-Received: from [192.168.0.142] ([109.110.245.170]) by smtp.googlemail.com with ESMTPSA id f12sm10785742wrj.48.2020.07.10.07.57.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 10 Jul 2020 07:57:14 -0700 (PDT) In-Reply-To: <837dvbphs0.fsf@gnu.org> Content-Language: en-US Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=raaahh@gmail.com; helo=mail-wr1-x433.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: 0 X-Spam_score: 0.0 X-Spam_bar: / X-Spam_report: (0.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=1, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:252823 Archived-At: On 10.07.2020 17:27, Eli Zaretskii wrote: >> In the same fashion that the author of bug#41029 arrived at the number >> of ~6000 buffers (we could ask). > > Please do ask, because I don't see how could hundreds of buffers > belong to a project without being created by commands that know about > the project. They can open a bunch of files that reside in a project's directory (roughly speaking; if the project backend is directory-based). You don't need a command named project-* to do that. >> I also worry about Tramp buffers, where both process invocations and >> traversals up the directory tree are unavoidably slower. > > Once again, as long as a buffer's project is determined when the > buffer is created I have already explained that we don't do that. project is not a minor mode, and we don't waste CPU cycles determining each buffer's project eagerly. Which is most likely a plus for Tramp, we don't need to make buffer opening even slower there. >>>> Speaking of standards set by other editors, have you ever seen an IDE >>>> with an "invalidate project cache" button? I haven't. >>> >>> I didn't say anything about a need for such a knob. You are probably >>> misinterpreting what I wrote above. >> >> All right. >> >> If you have suggestions of how we would reliably find outdated cached >> values, please don't hesitate to tell. >> >> Examples of caches we could use: >> >> * file or directory -> project >> * project -> list of files > > These should be updated when the file is added to a project or removed > from it. Or maybe I don't see the difficulties you have in mind. File can be added to a project in a multitude of different ways. By using Vim in a terminal, for instance. Or the 'touch' command. Removal also happens through different venues (removal in Dired, on 'rm' in the terminal, or changing the project configuration to ignore the said file). >> Does commit 4ca13d9 look good to you? > > Not really: > > . it makes the doc string of project-switch-to-buffer intentionally > obfuscated by "explaining" stuff in terms of the implementation, > which makes it not very useful (as I already tried to explain in > the past) What are you suggesting? > . the new doc string is confusing: "if 'project-current' returns the > same (equal) value" is incomplete, because it doesn't say the same > as what Same as the current project value, if any (otherwise, same as the value returned by the project selection prompt). Implementation-wise: same as the value returned by (project-current t) in the current buffer. > So that commit looks like a step backwards to me. Just because you don't like the new docstring? That's harsh. > (Also, the log message is in error (mentions the same function twice), > but that's water under the bridge.) Yes. Sorry. :-(