unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Harald Judt <h.judt@gmx.at>
To: help-gnu-emacs@gnu.org
Subject: Re: dired cons bug?
Date: Thu, 11 Aug 2022 10:11:11 +0200	[thread overview]
Message-ID: <5cd31076-abc1-2df0-8471-cc74e31a639c@gmx.at> (raw)
In-Reply-To: <YvSZ3CgNYk1Ah60G@protected.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 1780 bytes --]

Am 11.08.22 um 07:55 schrieb Jean Louis:
> * Harald Judt <h.judt@gmx.at> [2022-08-11 08:05]:
>> Hi,
>>
>> I have a question regarding using dired programmatically in Emacs 28.1. Say I
>> do the following call to open a dired buffer and insert the files:
>>
>> (dired "/home/"(cons "/home/admin" '("/home/user/tmp/test/a/a" "/home/user/tmp/test/b/b" "/home/user/tmp/test/c/c")))
> 
> Function is not intended to be use that way.
> 
> (dired DIRNAME &optional SWITCHES)
> 
> DIRNAME must be directory name. Not cons and some files inside.

Documentation says something different, and why should it work if that was not 
true?

------------------------------------------------------------------------
If DIRNAME is a string, Dired displays a list of files in DIRNAME (which
may also have shell wildcards appended to select certain files).

If DIRNAME is a cons, its first element is taken as the directory name
and the rest as an explicit list of files to make directory entries for.
In this case, SWITCHES are applied to each of the files separately, and
therefore switches that control the order of the files in the produced
listing have no effect.

You can flag files for deletion with d and then
delete them by typing x.
Type h after entering Dired for more info.
------------------------------------------------------------------------

But then it also says this, which I have missed until now:

`If DIRNAME is already in a Dired buffer, that buffer is used without refresh.'

Maybe that has something to do with my problem? How could I get the buffer to 
be used *WITH* refresh?

Regards,
Harald

-- 
`Experience is the best teacher.'

PGP Key ID: 4FFFAB21B8580ABD
Fingerprint: E073 6DD8 FF40 9CF2 0665 11D4 4FFF AB21 B858 0ABD

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

  parent reply	other threads:[~2022-08-11  8:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-10 11:26 dired cons bug? Harald Judt
2022-08-11  5:55 ` Jean Louis
2022-08-11  6:42   ` Eli Zaretskii
2022-08-11  9:32     ` Jean Louis
2022-08-11  8:11   ` Harald Judt [this message]
2022-08-11  9:23 ` Harald Judt
2022-08-12  5:50   ` Eli Zaretskii
2022-08-11 13:30 ` Eli Zaretskii
2022-08-11 13:38 ` [External] : " Drew Adams
  -- strict thread matches above, loose matches on Subject: below --
2022-08-13 23:05 Harald Judt

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=5cd31076-abc1-2df0-8471-cc74e31a639c@gmx.at \
    --to=h.judt@gmx.at \
    --cc=help-gnu-emacs@gnu.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.
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 read-only IMAP folder(s) and NNTP newsgroup(s).