zsh-workers
 help / color / mirror / code / Atom feed
From: Mikael Magnusson <mikachu@gmail.com>
To: Tim Eliseo <tre-zsh@crushedhat.com>
Cc: Bart Schaefer <schaefer@brasslantern.com>, zsh-workers@zsh.org
Subject: Re: [PATCH] Add option like tcsh's dextract
Date: Wed, 9 Aug 2023 15:16:54 +0200	[thread overview]
Message-ID: <CAHYJk3QeA1YRW-CU9eStUrqpQcA5yhyN-Wv3tfXi9MOOj1XPkA@mail.gmail.com> (raw)
In-Reply-To: <7105a328-a753-b5ce-0111-92e1b3fa781b@crushedhat.com>

On 8/9/23, Tim Eliseo <tre-zsh@crushedhat.com> wrote:
> On 2023-08-05 16:48:07, Bart Schaefer wrote:
>> On Fri, Aug 4, 2023 at 9:47 AM Tim Eliseo <tre-zsh@crushedhat.com> wrote:
>>> As my sample workaround script illustrates [...]
>>> achieving the original tcsh behavior
>>> without a builtin option is non-trivial.
>> # The chdir/cd builtin, with one argument in [+|-]n form and with
>> # the auto_pushd option set, has the desired stack extract behavior,
>>
>> I believe Mikael's assertion is that the extra nontrivial checks in
>> your sample workaround are not needed?  Where are you observing (or
>> where is Mikael failing to observe) a difference?
>>
> What Mikael said was “it seems that the same thing can be accomplished
> with setopt auto_pushd and using cd instead of pushd”. Yes, stack
> extract (as opposed to roll) behavior will happen using cd with a +/-
> argument and with auto_pushd set, a fact I exploit in my workaround
> script, but that does not make cd with auto_pushd set a suitable
> alternative to pushd if one desires stack extract behavior because:
>
> • cd doesn’t print the directory stack afterwards
>
> • cd behaves differently than pushd with no arguments (go to home
> instead of swap the top two)
>
> • With auto_pushd set, there is no longer a command to change directory
> without pushing the current (i.e. replace the top stack directory)
>
> My script works around this and implements a pushd replacement with
> extraction, and also has to deal with the complexity of other conditions
> like command options, pushd_silent, and interactive/non-interactive
> mode. One thing not possible to do correctly is output “pushd” instead
> of “chdir” in error messages.

This would all have been good information to include in the original
post, or as a followup to my initial mail which you never replied to,
where I was clearly not aware of these differences:
> in fact i
> was not aware that the list would be rolled with pushd because i have
> always been too lazy to type it instead of cd :).

> I wrote this script as a first attempt to implement the behavior I
> desired (which was to duplicate tcsh’s dextract option). I now regret
> even posting it, as it seems to have caused more confusion.

The mistake was including some details only in the comments of the
script and not in the mail, I did overlook some comments in it.

> BUT THERE’S A BETTER WAY! The patch in 51958 implements this new option
> (pushd stack extraction instead of rolling) very cleanly, without
> introducing any backward compatibility issues, and includes updates to
> documentation and a test case. I spent significant time trying to get
> this right, and feel it is a valuable (albeit small) addition to the zsh
> codebase which will help some other users making the transition from tcsh.
>
> I have to say that, as a new contributor, I’m not feeling particularly
> welcomed. Do the zsh maintainers have a process for deciding to accept
> contributions? I tried to be polite and patient, and got criticized for
> it. I asked for a second look, and then got asked what *I* didn’t
> understand. What more do I need to do to move this process forward?

Every time I've asked for more details you ignored me, which as I
pointed out earlier is not a good approach. I thought I very clearly
asked you in my first mail why just cd + autopushd was not enough, and
then you wouldn't even reply to my second request to answer my
question which surely put others off as well.

To summarize, when you send a mail with a patch, explain the patch and
why it's needed in the mail; if someone asks for clarifications or
seems to misunderstand you, rather than assume that they can't read,
assume that you were unclear, it is the safer assumption.

-- 
Mikael Magnusson


  parent reply	other threads:[~2023-08-09 13:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-18  9:54 Tim Eliseo
2023-07-18 15:17 ` Mikael Magnusson
2023-08-04 16:47 ` Tim Eliseo
2023-08-04 16:58   ` Mikael Magnusson
     [not found]     ` <ee258794-761e-8f48-01d2-f0db6d8b6dc7@crushedhat.com>
2023-08-04 18:08       ` Mikael Magnusson
2023-08-05 23:48   ` Bart Schaefer
2023-08-08 22:13     ` Tim Eliseo
2023-08-09  8:50       ` Peter Stephenson
2023-08-09 13:16       ` Mikael Magnusson [this message]
2023-08-09 14:19         ` Tim Eliseo
2023-08-09 16:24           ` Mikael Magnusson
2023-08-09 17:25             ` Bart Schaefer
2023-08-09 23:27               ` Tim Eliseo
2023-08-12  3:42                 ` Bart Schaefer
2023-08-09 22:49             ` Tim Eliseo

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=CAHYJk3QeA1YRW-CU9eStUrqpQcA5yhyN-Wv3tfXi9MOOj1XPkA@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=schaefer@brasslantern.com \
    --cc=tre-zsh@crushedhat.com \
    --cc=zsh-workers@zsh.org \
    /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 public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).