all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Augusto Stoffel <arstoffel@gmail.com>, Juri Linkov <juri@linkov.net>
Cc: Eli Zaretskii <eliz@gnu.org>, 58447@debbugs.gnu.org
Subject: bug#58447: [PATCH] In project-find-file, add absolute file name to history
Date: Thu, 15 Dec 2022 16:04:13 +0200	[thread overview]
Message-ID: <32c2e183-eb11-ad1c-d656-b7531cb46e6c@yandex.ru> (raw)
In-Reply-To: <871qp0ncvm.fsf@gmail.com>

On 15/12/2022 13:07, Augusto Stoffel wrote:
> On Thu, 15 Dec 2022 at 09:24, Juri Linkov wrote:
> 
>>> The patches could be combined, but v1 seems to be too invasive for
>>> emacs-29, yet v2 could be just small enough to be considered "bugfix-only".
>>>
>>> So, what does everyone think about the latter?
>>>
>>> If people agree that the v2 patch is an improvement, we can check it in and
>>> leave project-local histories until later.
>>
>> Does the second patch allow such workflows as re-visiting
>> the same relative filenames in another directory?
> 
> I don't think this should be the default behavior at all.  To me it
> seems much more likely that a user _does not_ want to see files from
> other projects when doing `C-x p f M-p'.

Do you think they will mind too much? At least if the relative names are 
shown, the user will recognize them and won't be too surprised.

> Your workflow seems more of a job the "find related file" feature that
> has been discussed recently in the list.
> 
>> IMHO, the safest fix for emacs-29 would be to add relative filenames
>> to the separate history.  If someone might want to use
>> 'file-name-history', then a new variable could be added like
>> 'query-replace-from-history-variable'.  Then this variable
>> could be customized to 'file-name-history', or nil.
> 
> Then let's do the opposite.  We define 'project-file-history-variable'
> and let it be nil by default.  In this case, we get the behavior of
> Dmitry's patch v2.  If it's not nil, then we assume it's to be used
> as-is, with no filtering or removal of project root prefix.  The user
> can set it whatever way they please and take care it makes sense.

The problem with that is storing relative history in such a variable 
will only work with one of the values of 
project-read-file-name-function. So we'll have two defcustoms which need 
to be changed in concert..?





  reply	other threads:[~2022-12-15 14:04 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-11 18:29 bug#58447: [PATCH] In project-find-file, add absolute file name to history Augusto Stoffel
2022-10-11 19:13 ` Eli Zaretskii
2022-10-26  9:04   ` Augusto Stoffel
2022-10-27  8:44     ` Dmitry Gutov
2022-10-27 13:15       ` Eli Zaretskii
2022-10-27 14:21         ` Dmitry Gutov
2022-10-27 14:26           ` Augusto Stoffel
2022-10-27 15:36             ` Dmitry Gutov
2022-10-27 15:56               ` Augusto Stoffel
2022-10-27 16:07                 ` Dmitry Gutov
2022-10-27 15:52           ` Eli Zaretskii
2022-10-27 16:10             ` Dmitry Gutov
2022-10-27 16:37               ` Augusto Stoffel
2022-10-27 16:48                 ` Dmitry Gutov
2022-10-27 16:53                   ` Augusto Stoffel
2022-10-27 17:34                     ` Dmitry Gutov
2022-10-27 17:48                       ` Augusto Stoffel
2022-10-27 18:05                         ` Dmitry Gutov
2022-10-27 18:12                           ` Augusto Stoffel
2022-10-27 19:51                             ` Dmitry Gutov
2022-10-27 19:41                 ` Juri Linkov
2022-10-28 18:11                   ` Dmitry Gutov
2022-10-29 17:45                     ` Juri Linkov
2022-10-30 19:42                       ` Dmitry Gutov
2022-10-31  8:06                         ` Augusto Stoffel
2022-11-01 17:30                           ` Juri Linkov
2022-11-01 22:14                             ` Dmitry Gutov
2022-11-18 16:28                               ` Augusto Stoffel
2022-11-25 13:39                                 ` Eli Zaretskii
2022-11-26  2:28                                 ` Dmitry Gutov
2022-11-28 22:58                                   ` Augusto Stoffel
2022-11-29 16:29                                     ` Dmitry Gutov
2022-12-09  7:38                             ` Juri Linkov
2022-12-09 13:00                               ` Dmitry Gutov
2022-12-10 17:27                                 ` Juri Linkov
2022-12-10 19:50                                   ` Dmitry Gutov
2022-12-11 17:57                                     ` Juri Linkov
2022-12-11 18:14                                       ` Dmitry Gutov
2022-12-12 17:41                                         ` Juri Linkov
2022-12-12 18:49                                           ` Augusto Stoffel
2022-12-13 17:28                                             ` Juri Linkov
2022-12-14 16:47                                               ` Augusto Stoffel
2022-12-14 18:45                                                 ` Dmitry Gutov
2022-12-14 19:32                                                   ` Augusto Stoffel
2022-12-14 23:04                                                     ` Dmitry Gutov
2022-12-15  7:24                                                       ` Juri Linkov
2022-12-15 11:07                                                         ` Augusto Stoffel
2022-12-15 14:04                                                           ` Dmitry Gutov [this message]
2022-12-15 13:54                                                         ` Dmitry Gutov
2022-12-15 17:24                                                           ` Juri Linkov
2022-12-15 22:20                                                             ` Dmitry Gutov
2022-12-16  7:48                                                               ` Juri Linkov
2022-12-18  0:32                                                                 ` Dmitry Gutov
2022-12-15 11:07                                                       ` Augusto Stoffel
2022-12-15 14:08                                                         ` Dmitry Gutov
2022-12-15 17:21                                                           ` Juri Linkov
2022-12-15 22:50                                                             ` Dmitry Gutov
2022-12-18  8:36                                                               ` Juri Linkov
2022-12-18 11:51                                                                 ` Dmitry Gutov
2022-12-19 17:55                                                                   ` Juri Linkov
2022-12-19 18:01                                                                     ` Eli Zaretskii
2022-12-19 19:48                                                                       ` Juri Linkov
2022-12-19 20:00                                                                         ` Eli Zaretskii
2022-12-19 19:18                                                                     ` Dmitry Gutov

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=32c2e183-eb11-ad1c-d656-b7531cb46e6c@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=58447@debbugs.gnu.org \
    --cc=arstoffel@gmail.com \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    /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.