GNU bug report logs - #10897
copy-directory create new directory when copying a symlink

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Mon, 27 Feb 2012 08:51:02 UTC

Severity: minor

Tags: confirmed

Found in version 25.1

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 10897 in the body.
You can then email your comments to 10897 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Mon, 27 Feb 2012 08:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thierry Volpiatto <thierry.volpiatto <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 27 Feb 2012 08:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: copy-directory create new directory when copying a symlink
Date: Mon, 27 Feb 2012 09:47:02 +0100
Hi all,
when copying a directory symlink to another directory, the behavior of
'cp' is to create a new symlink in this directory:

--8<---------------cut here---------------start------------->8---
thierry <at> thierry-MM061:~ $ mkdir ~/Test
thierry <at> thierry-MM061:~ $ mkdir ~/tmp/Test1
thierry <at> thierry-MM061:~ $ ln -s ~/tmp/Test1 ~/tmp/foo
thierry <at> thierry-MM061:~ $ cp -r ~/tmp/foo ~/Test
thierry <at> thierry-MM061:~ $ ls -l ~/Test
total 0
lrwxrwxrwx   1 thierry        thierry  23 2012-02-27 09:08 foo -> /home/thierry/tmp/Test1
--8<---------------cut here---------------end--------------->8---

It is not what's copy-directory does:

--8<---------------cut here---------------start------------->8---
(copy-directory "~/tmp/foo" "~/Test" nil t)
=>
thierry <at> thierry-MM061:~ $ ls -l ~/Test
total 4
drwxrwxr-x   2 thierry        thierry  4096 2012-02-27 09:11 foo
--8<---------------cut here---------------end--------------->8---

NOTE:
I am not sending this bug-report via report-emacs-bug due to its last
silly modifications.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Mon, 27 Feb 2012 09:15:02 GMT) Full text and rfc822 format available.

Message #8 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
	symlink
Date: Mon, 27 Feb 2012 10:11:35 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> I am not sending this bug-report via report-emacs-bug due to its last
> silly modifications.

Which ones?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Mon, 27 Feb 2012 09:34:01 GMT) Full text and rfc822 format available.

Message #11 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
	symlink
Date: Mon, 27 Feb 2012 10:30:49 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> I am not sending this bug-report via report-emacs-bug due to its last
>> silly modifications.
>
> Which ones?
I just want to 'C-c C-c' like before, I don't want to be asked what to
do as I don't know what answering.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Mon, 27 Feb 2012 10:36:01 GMT) Full text and rfc822 format available.

Message #14 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
	symlink
Date: Mon, 27 Feb 2012 11:32:13 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

>>> I am not sending this bug-report via report-emacs-bug due to its last
>>> silly modifications.
>>
>> Which ones?
> I just want to 'C-c C-c' like before, I don't want to be asked what to
> do as I don't know what answering.

`report-emacs-bugs' hasn't changed (much) with regards to sending email.
But Emacs itself has changed wrt Email sending.  As you seem to be
sending your email with Emacs, I'm not quite sure what you mean.

Unless you're sending your bug reports with "emacs -Q"?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Mon, 27 Feb 2012 15:26:02 GMT) Full text and rfc822 format available.

Message #17 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
	symlink
Date: Mon, 27 Feb 2012 16:22:28 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>>>> I am not sending this bug-report via report-emacs-bug due to its last
>>>> silly modifications.
>>>
>>> Which ones?
>> I just want to 'C-c C-c' like before, I don't want to be asked what to
>> do as I don't know what answering.
>
> `report-emacs-bugs' hasn't changed (much) with regards to sending email.
> But Emacs itself has changed wrt Email sending.  As you seem to be
> sending your email with Emacs, I'm not quite sure what you mean.
I had to choose for "mail client" "nntp"(not sure) and something else I
don't remember.
I choose "mail client" and I end with something like "no method provided"

> Unless you're sending your bug reports with "emacs -Q"?
No.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 08:44:02 GMT) Full text and rfc822 format available.

Message #20 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 09:42:24 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>>>> I am not sending this bug-report via report-emacs-bug due to its last
>>>> silly modifications.
>>>
>>> Which ones?
>> I just want to 'C-c C-c' like before, I don't want to be asked what to
>> do as I don't know what answering.
>
> `report-emacs-bugs' hasn't changed (much) with regards to sending email.
> But Emacs itself has changed wrt Email sending.
Maybe I am wrong because I can't try without sending a bug-report, so
correct me if so.
It seem that `report-emacs-bug' is using the value of
`send-mail-function' when sending bug reports even if the buffer is a
message buffer.
The new value of `send-mail-function' is `mailclient-send-it'.
Which is not what I want.
Why the value of `message-send-mail-function' isn't used there?
I set here `message-send-mail-function' to `smtpmail-send-it'.

> As you seem to be sending your email with Emacs, I'm not quite sure
> what you mean.
>
> Unless you're sending your bug reports with "emacs -Q"?

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 08:51:02 GMT) Full text and rfc822 format available.

Message #23 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: larsi <at> gnus.org, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 10:49:40 +0200
> From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
> Date: Sat, 03 Mar 2012 09:42:24 +0100
> Cc: 10897 <at> debbugs.gnu.org
> 
> I can't try without sending a bug-report

Why can't you? just edit the "To" address to your own, before actually
sending it, and Bob's your uncle.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 09:31:01 GMT) Full text and rfc822 format available.

Message #26 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: larsi <at> gnus.org, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 10:29:41 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
>> Date: Sat, 03 Mar 2012 09:42:24 +0100
>> Cc: 10897 <at> debbugs.gnu.org
>> 
>> I can't try without sending a bug-report
>
> Why can't you? just edit the "To" address to your own, before actually
> sending it, and Bob's your uncle.
Of course :-), I can also change variable value.
But there is nothing to edit and this is not the problem.

Unless I have a Gnus session open, when I do M-x report-emacs-bug,
I am prompted for subject, I write subject, then RET and
"Subject" and "To" fields are empty, and when I do C-c C-c I have an
error like:

--8<---------------cut here---------------start------------->8---
Send this bug report to the Emacs maintainers? (y or n)  y
Sending...
message-send: No methods specified to send by
--8<---------------cut here---------------end--------------->8---

When a Gnus session is open and I do M-x report-emacs-bug, it works
normally. ("Subject" and "To" are completed.)

So I think this is a bug.

 
-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 10:06:02 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 11:04:27 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
>>> Date: Sat, 03 Mar 2012 09:42:24 +0100
>>> Cc: 10897 <at> debbugs.gnu.org
>>> 
>>> I can't try without sending a bug-report
>>
>> Why can't you? just edit the "To" address to your own, before actually
>> sending it, and Bob's your uncle.
> Of course :-), I can also change variable value.
> But there is nothing to edit and this is not the problem.
>
> Unless I have a Gnus session open, when I do M-x report-emacs-bug,
> I am prompted for subject, I write subject, then RET and
> "Subject" and "To" fields are empty, and when I do C-c C-c I have an
> error like:
>
> Send this bug report to the Emacs maintainers? (y or n)  y
> Sending...
> message-send: No methods specified to send by
>
> When a Gnus session is open and I do M-x report-emacs-bug, it works
> normally. ("Subject" and "To" are completed.)
>
> So I think this is a bug.
I confirm it is a bug as this doesn't happen in 24.0.92, it start to bug
at beginning of 24.0.93 pretest.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 14:31:02 GMT) Full text and rfc822 format available.

Message #32 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 15:29:19 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Unless I have a Gnus session open, when I do M-x report-emacs-bug,
> I am prompted for subject, I write subject, then RET and
> "Subject" and "To" fields are empty, and when I do C-c C-c I have an
> error like:

I'm unable to reproduce this bug with "emacs -Q" or just "emacs".  Do
you have some local customisations to your Message setup that wipes the
headers?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 14:34:02 GMT) Full text and rfc822 format available.

Message #35 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 15:33:00 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> It seem that `report-emacs-bug' is using the value of
> `send-mail-function' when sending bug reports even if the buffer is a
> message buffer.

Hm...  ah, I see.  It's consulting `send-mail-function' (to see whether
it really needs to worry about the From header, which it doesn't need to
when we're going to send via mailclient) even in Message buffers.  And
that's wrong.  I'll fix that...

> Why the value of `message-send-mail-function' isn't used there?

It does use `message-send-mail-function' when actually sending, though,
so I don't see what the bug could be here...

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 15:01:02 GMT) Full text and rfc822 format available.

Message #38 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 15:59:10 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> Unless I have a Gnus session open, when I do M-x report-emacs-bug,
>> I am prompted for subject, I write subject, then RET and
>> "Subject" and "To" fields are empty, and when I do C-c C-c I have an
>> error like:
>
> I'm unable to reproduce this bug with "emacs -Q" or just "emacs".  Do
> you have some local customisations to your Message setup that wipes the
> headers?
Maybe because in Emacs -Q the 'to' and 'subject' field are completed as
expected.

I use same configuration for Emacs-24.0.92 and 24.0.94 and behavior is
different. (i.e nothing in 'to' and 'subject' for 24.0.94)

Note: My Gnus configuration is not new and works fine since months (years).

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 15:06:02 GMT) Full text and rfc822 format available.

Message #41 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 16:05:00 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> I use same configuration for Emacs-24.0.92 and 24.0.94 and behavior is
> different. (i.e nothing in 'to' and 'subject' for 24.0.94)
>
> Note: My Gnus configuration is not new and works fine since months (years).

Well, I'm not able to reproduce the bug.

So do you have anything in your setup that could clear the headers?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 17:10:02 GMT) Full text and rfc822 format available.

Message #44 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 18:08:36 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> I use same configuration for Emacs-24.0.92 and 24.0.94 and behavior is
>> different. (i.e nothing in 'to' and 'subject' for 24.0.94)
>>
>> Note: My Gnus configuration is not new and works fine since months (years).
>
> Well, I'm not able to reproduce the bug.
>
> So do you have anything in your setup that could clear the headers?
Ok I found:

--8<---------------cut here---------------start------------->8---
(defun gnus-msg-mail (&optional to subject other-headers continue
				switch-action yank-action send-actions return-action)
  "Start editing a mail message to be sent.
Like `message-mail', but with Gnus paraphernalia, particularly the
Gcc: header for archiving purposes.
If Gnus isn't running, a plain `message-mail' setup is used
instead."
  (interactive)
  (if (not (gnus-alive-p))
      (message-mail)


[...]
--8<---------------cut here---------------end--------------->8---

`compose-mail' is calling `gnus-msg-mail' which have changed and call
`message-mail' with no arguments unless a gnus session is alive.

Fallback to old version of `gnus-msg-mail' and all works fine.


--8<---------------cut here---------------start------------->8---
(defun gnus-msg-mail (&optional to subject other-headers continue
		      switch-action yank-action send-actions return-action)
  "Start editing a mail message to be sent.
Like `message-mail', but with Gnus paraphernalia, particularly the
Gcc: header for archiving purposes."
  (interactive)
  (let ((buf (current-buffer))
	mail-buf)
    (gnus-setup-message 'message
      (message-mail to subject other-headers continue
		    nil yank-action send-actions return-action))
    (when switch-action
      (setq mail-buf (current-buffer))
      (switch-to-buffer buf)
      (apply switch-action mail-buf nil)))
  ;; COMPOSEFUNC should return t if succeed.  Undocumented ???
  t)
--8<---------------cut here---------------end--------------->8---

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 03 Mar 2012 17:23:02 GMT) Full text and rfc822 format available.

Message #47 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sat, 03 Mar 2012 18:20:44 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>>
>>> I use same configuration for Emacs-24.0.92 and 24.0.94 and behavior is
>>> different. (i.e nothing in 'to' and 'subject' for 24.0.94)
>>>
>>> Note: My Gnus configuration is not new and works fine since months (years).
>>
>> Well, I'm not able to reproduce the bug.
>>
>> So do you have anything in your setup that could clear the headers?
> Ok I found:
More exactly we need (if (not (gnus-alive-p))..., otherwise we fail with
error `gnus-setup-message' function not found.
So just need to call message-mail with args.
here a patch:

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el
--- a/lisp/gnus/gnus-msg.el
+++ b/lisp/gnus/gnus-msg.el
@@ -486,7 +486,8 @@
 instead."
   (interactive)
   (if (not (gnus-alive-p))
-      (message-mail)
+      (message-mail to subject other-headers continue
+                    nil yank-action send-actions return-action)
     (let ((buf (current-buffer))
 	  mail-buf)
       (gnus-setup-message 'message
--8<---------------cut here---------------end--------------->8---

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sun, 04 Mar 2012 15:04:01 GMT) Full text and rfc822 format available.

Message #50 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Sun, 04 Mar 2012 16:02:34 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> More exactly we need (if (not (gnus-alive-p))..., otherwise we fail with
> error `gnus-setup-message' function not found.
> So just need to call message-mail with args.

D'oh.

Thanks for the patch; applied to No Gnus (and Emacs 24 later).

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Mon, 05 Mar 2012 14:00:03 GMT) Full text and rfc822 format available.

Message #53 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: sending mail via report-emacs-bug
Date: Mon, 05 Mar 2012 14:58:27 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> More exactly we need (if (not (gnus-alive-p))..., otherwise we fail with
>> error `gnus-setup-message' function not found.
>> So just need to call message-mail with args.
>
> D'oh.
>
> Thanks for the patch; applied to No Gnus (and Emacs 24 later).
Now it is in Emacs 24 and works fine, thanks.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Fri, 09 Mar 2012 23:09:02 GMT) Full text and rfc822 format available.

Message #56 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
	symlink
Date: Sat, 10 Mar 2012 00:07:08 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> I had to choose for "mail client" "nntp"(not sure) and something else I
> don't remember.
> I choose "mail client" and I end with something like "no method provided"

Could you send a backtrace?

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sat, 10 Mar 2012 06:39:02 GMT) Full text and rfc822 format available.

Message #59 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
	symlink
Date: Sat, 10 Mar 2012 07:08:12 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> I had to choose for "mail client" "nntp"(not sure) and something else I
>> don't remember.
>> I choose "mail client" and I end with something like "no method provided"
>
> Could you send a backtrace?
I think its ok now.
What I did was trying to send the bug report with the "To" and "Subject"
not completed (didn't look at headers and just C-c C-c), so smtp or
something else was complaining and asking on what to do.
But now we have fixed "To" and "Subject" at startup of report-emacs-bug,
I think we can forget that.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Added tag(s) confirmed. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Thu, 11 Aug 2016 00:23:02 GMT) Full text and rfc822 format available.

bug Marked as found in versions 25.1. Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Thu, 11 Aug 2016 00:23:02 GMT) Full text and rfc822 format available.

Severity set to 'minor' from 'normal' Request was from npostavs <at> users.sourceforge.net to control <at> debbugs.gnu.org. (Thu, 11 Aug 2016 00:23:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Tue, 25 Aug 2020 12:48:02 GMT) Full text and rfc822 format available.

Message #68 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Tue, 25 Aug 2020 14:47:07 +0200
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> when copying a directory symlink to another directory, the behavior of
> 'cp' is to create a new symlink in this directory:
>
> thierry <at> thierry-MM061:~ $ mkdir ~/Test
> thierry <at> thierry-MM061:~ $ mkdir ~/tmp/Test1
> thierry <at> thierry-MM061:~ $ ln -s ~/tmp/Test1 ~/tmp/foo
> thierry <at> thierry-MM061:~ $ cp -r ~/tmp/foo ~/Test
> thierry <at> thierry-MM061:~ $ ls -l ~/Test
> total 0
> lrwxrwxrwx   1 thierry        thierry  23 2012-02-27 09:08 foo -> /home/thierry/tmp/Test1
>
> It is not what's copy-directory does:
>
> (copy-directory "~/tmp/foo" "~/Test" nil t)
> =>
> thierry <at> thierry-MM061:~ $ ls -l ~/Test
> total 4
> drwxrwxr-x   2 thierry        thierry  4096 2012-02-27 09:11 foo

I'm unable to reproduce the bug using this recipe -- at the end of this,
I just have an empty ~/Test directory.

Which is also different from what cp -r does, but I'm not sure that's a
bug -- when you tell copy-directory to copy a symlink, I think it's
natural to dereference that symlink first?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Tue, 13 Oct 2020 02:34:02 GMT) Full text and rfc822 format available.

Message #71 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Tue, 13 Oct 2020 04:33:17 +0200
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I'm unable to reproduce the bug using this recipe -- at the end of this,
> I just have an empty ~/Test directory.

More information was requested, but none was given, so I'm closing this
bug report.  If there's still problems in this area, please respond to
the debbugs address, and we'll reopen the report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 10897 <at> debbugs.gnu.org and Thierry Volpiatto <thierry.volpiatto <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 13 Oct 2020 02:34:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Tue, 13 Oct 2020 03:16:01 GMT) Full text and rfc822 format available.

Message #76 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 10897 <at> debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Mon, 12 Oct 2020 23:15:24 -0400
Lars Ingebrigtsen wrote:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> I'm unable to reproduce the bug using this recipe -- at the end of this,
>> I just have an empty ~/Test directory.
>
> More information was requested, but none was given, so I'm closing this
> bug report.  If there's still problems in this area, please respond to
> the debbugs address, and we'll reopen the report.

I saw this had previously been tagged "confirmed".

The issue from the OP is reproducible in emacs-27, but changes in Emacs
since it was reported means one now needs to use:

(copy-directory "~/tmp/foo" "~/Test/" nil t)
                                   ^




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Tue, 13 Oct 2020 03:20:02 GMT) Full text and rfc822 format available.

Message #79 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 10897 <at> debbugs.gnu.org, Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Tue, 13 Oct 2020 05:19:25 +0200
Glenn Morris <rgm <at> gnu.org> writes:

> The issue from the OP is reproducible in emacs-27, but changes in Emacs
> since it was reported means one now needs to use:
>
> (copy-directory "~/tmp/foo" "~/Test/" nil t)
>                                    ^

OK; reopening.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Did not alter fixed versions and reopened. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 13 Oct 2020 03:20:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Thu, 19 Aug 2021 22:17:01 GMT) Full text and rfc822 format available.

Message #84 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marco Centurion <mcenturion <at> fing.edu.uy>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Thu, 19 Aug 2021 18:47:33 -0300
[Message part 1 (text/plain, inline)]
This patch seems to fix this issue. Turns out that the code didn't take
into consideration the case when the directory we want to copy is itself
a symlink.

[bug#10897.patch (text/x-patch, inline)]
diff --git a/lisp/files.el b/lisp/files.el
index 875ac55316..424cf1bea0 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6193,42 +6193,48 @@ copy-directory
       (setq directory (directory-file-name (expand-file-name directory))
 	    newname (expand-file-name newname))
 
-      (cond ((not (directory-name-p newname))
-	     ;; If NEWNAME is not a directory name, create it;
-	     ;; that is where we will copy the files of DIRECTORY.
-	     (make-directory newname parents))
-	    ;; NEWNAME is a directory name.  If COPY-CONTENTS is non-nil,
-	    ;; create NEWNAME if it is not already a directory;
-	    ;; otherwise, create NEWNAME/[DIRECTORY-BASENAME].
-	    ((if copy-contents
-		 (or parents (not (file-directory-p newname)))
-	       (setq newname (concat newname
-				     (file-name-nondirectory directory))))
-	     (make-directory (directory-file-name newname) parents))
-	    (t (setq follow t)))
-
-      ;; Copy recursively.
-      (dolist (file
-	       ;; We do not want to copy "." and "..".
-	       (directory-files directory 'full
-				directory-files-no-dot-files-regexp))
-	(let ((target (concat (file-name-as-directory newname)
-			      (file-name-nondirectory file)))
-	      (filetype (car (file-attributes file))))
-	  (cond
-	   ((eq filetype t)       ; Directory but not a symlink.
-	    (copy-directory file target keep-time parents t))
-	   ((stringp filetype)    ; Symbolic link
-	    (make-symbolic-link filetype target t))
-	   ((copy-file file target t keep-time)))))
-
-      ;; Set directory attributes.
-      (let ((modes (file-modes directory))
-	    (times (and keep-time (file-attribute-modification-time
-				   (file-attributes directory))))
-	    (follow-flag (unless follow 'nofollow)))
-	(if modes (set-file-modes newname modes follow-flag))
-	(if times (set-file-times newname times follow-flag))))))
+      ;; If DIRECTORY is a symlink, create a NEWNAME symlink
+      ;; with the same target.
+      (if (file-symlink-p directory)
+	  (let ((target  (car (file-attributes directory))))
+	    (make-symbolic-link target newname t))
+        ;; Else proceed to copy as a regular directory
+        (cond ((not (directory-name-p newname))
+	       ;; If NEWNAME is not a directory name, create it;
+	       ;; that is where we will copy the files of DIRECTORY.
+	       (make-directory newname parents))
+	      ;; NEWNAME is a directory name.  If COPY-CONTENTS is non-nil,
+	      ;; create NEWNAME if it is not already a directory;
+	      ;; otherwise, create NEWNAME/[DIRECTORY-BASENAME].
+	      ((if copy-contents
+		   (or parents (not (file-directory-p newname)))
+	         (setq newname (concat newname
+				       (file-name-nondirectory directory))))
+	       (make-directory (directory-file-name newname) parents))
+	      (t (setq follow t)))
+
+        ;; Copy recursively.
+        (dolist (file
+	         ;; We do not want to copy "." and "..".
+	         (directory-files directory 'full
+				  directory-files-no-dot-files-regexp))
+	  (let ((target (concat (file-name-as-directory newname)
+			        (file-name-nondirectory file)))
+	        (filetype (car (file-attributes file))))
+	    (cond
+	     ((eq filetype t)       ; Directory but not a symlink.
+	      (copy-directory file target keep-time parents t))
+	     ((stringp filetype)    ; Symbolic link
+	      (make-symbolic-link filetype target t))
+	     ((copy-file file target t keep-time)))))
+
+        ;; Set directory attributes.
+        (let ((modes (file-modes directory))
+	      (times (and keep-time (file-attribute-modification-time
+				     (file-attributes directory))))
+	      (follow-flag (unless follow 'nofollow)))
+	  (if modes (set-file-modes newname modes follow-flag))
+	  (if times (set-file-times newname times follow-flag)))))))
 
 
 ;; At time of writing, only info uses this.
[Message part 3 (text/plain, inline)]
-- 
Marco Centurion
Unidad de Recursos Informáticos
Facultad de Ingeniería - UdelaR

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Fri, 20 Aug 2021 01:37:01 GMT) Full text and rfc822 format available.

Message #87 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marco Centurion <mcenturion <at> fing.edu.uy>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Thu, 19 Aug 2021 22:08:30 -0300
[Message part 1 (text/plain, inline)]
I failed to document the new behaviour in the docstring.

The patch I sent didn't manage the creation of the new symlink correctly
either, as it created it with the same name as the target.  That is, in
the examples given the result was:

-------------------------
(copy-directory "~/tmp/foo" "~/Test" nil t)
=>
[mcenturion <at> localhost ~]$ ls -l Test
total 4
lrwxrwxrwx. 1 mcenturion mcenturion 26 ago 19 21:21 Test1 -> /home/mcenturion/tmp/Test1
-------------------------

This new patch corrects both mistakes.

Sorry for the misfire.

[bug#10897.patch (text/x-patch, inline)]
diff --git a/lisp/files.el b/lisp/files.el
index 875ac55316..0bf8a2ea8d 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -6165,6 +6165,9 @@ copy-directory
 parent directories if they don't exist.  Interactively, this
 happens by default.
 
+If DIRECTORY is a symlink, create a symlink with the same target
+as DIRECTORY.
+
 If NEWNAME is a directory name, copy DIRECTORY as a subdirectory
 there.  However, if called from Lisp with a non-nil optional
 argument COPY-CONTENTS, copy the contents of DIRECTORY directly
@@ -6193,42 +6196,52 @@ copy-directory
       (setq directory (directory-file-name (expand-file-name directory))
 	    newname (expand-file-name newname))
 
-      (cond ((not (directory-name-p newname))
-	     ;; If NEWNAME is not a directory name, create it;
-	     ;; that is where we will copy the files of DIRECTORY.
-	     (make-directory newname parents))
-	    ;; NEWNAME is a directory name.  If COPY-CONTENTS is non-nil,
-	    ;; create NEWNAME if it is not already a directory;
-	    ;; otherwise, create NEWNAME/[DIRECTORY-BASENAME].
-	    ((if copy-contents
-		 (or parents (not (file-directory-p newname)))
-	       (setq newname (concat newname
-				     (file-name-nondirectory directory))))
-	     (make-directory (directory-file-name newname) parents))
-	    (t (setq follow t)))
-
-      ;; Copy recursively.
-      (dolist (file
-	       ;; We do not want to copy "." and "..".
-	       (directory-files directory 'full
-				directory-files-no-dot-files-regexp))
-	(let ((target (concat (file-name-as-directory newname)
-			      (file-name-nondirectory file)))
-	      (filetype (car (file-attributes file))))
-	  (cond
-	   ((eq filetype t)       ; Directory but not a symlink.
-	    (copy-directory file target keep-time parents t))
-	   ((stringp filetype)    ; Symbolic link
-	    (make-symbolic-link filetype target t))
-	   ((copy-file file target t keep-time)))))
-
-      ;; Set directory attributes.
-      (let ((modes (file-modes directory))
-	    (times (and keep-time (file-attribute-modification-time
-				   (file-attributes directory))))
-	    (follow-flag (unless follow 'nofollow)))
-	(if modes (set-file-modes newname modes follow-flag))
-	(if times (set-file-times newname times follow-flag))))))
+      ;; If DIRECTORY is a symlink, create a symlink with the same target.
+      (if (file-symlink-p directory)
+          (let ((target (car (file-attributes directory))))
+	    (if (directory-name-p newname)
+		(make-symbolic-link target
+				    (concat newname
+					    (file-name-nondirectory directory))
+				    t)
+	      (make-symbolic-link target newname t)))
+        ;; Else proceed to copy as a regular directory
+        (cond ((not (directory-name-p newname))
+	       ;; If NEWNAME is not a directory name, create it;
+	       ;; that is where we will copy the files of DIRECTORY.
+	       (make-directory newname parents))
+	      ;; NEWNAME is a directory name.  If COPY-CONTENTS is non-nil,
+	      ;; create NEWNAME if it is not already a directory;
+	      ;; otherwise, create NEWNAME/[DIRECTORY-BASENAME].
+	      ((if copy-contents
+		   (or parents (not (file-directory-p newname)))
+	         (setq newname (concat newname
+				       (file-name-nondirectory directory))))
+	       (make-directory (directory-file-name newname) parents))
+	      (t (setq follow t)))
+
+        ;; Copy recursively.
+        (dolist (file
+	         ;; We do not want to copy "." and "..".
+	         (directory-files directory 'full
+				  directory-files-no-dot-files-regexp))
+	  (let ((target (concat (file-name-as-directory newname)
+			        (file-name-nondirectory file)))
+	        (filetype (car (file-attributes file))))
+	    (cond
+	     ((eq filetype t)       ; Directory but not a symlink.
+	      (copy-directory file target keep-time parents t))
+	     ((stringp filetype)    ; Symbolic link
+	      (make-symbolic-link filetype target t))
+	     ((copy-file file target t keep-time)))))
+
+        ;; Set directory attributes.
+        (let ((modes (file-modes directory))
+	      (times (and keep-time (file-attribute-modification-time
+				     (file-attributes directory))))
+	      (follow-flag (unless follow 'nofollow)))
+	  (if modes (set-file-modes newname modes follow-flag))
+	  (if times (set-file-times newname times follow-flag)))))))
 
 
 ;; At time of writing, only info uses this.
[Message part 3 (text/plain, inline)]
-- 
Marco Centurion
Unidad de Recursos Informáticos
Facultad de Ingeniería - UdelaR

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Fri, 20 Aug 2021 05:52:02 GMT) Full text and rfc822 format available.

Message #90 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Marco Centurion <mcenturion <at> fing.edu.uy>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Fri, 20 Aug 2021 08:51:19 +0300
> From: Marco Centurion <mcenturion <at> fing.edu.uy>
> Date: Thu, 19 Aug 2021 22:08:30 -0300
> 
> I failed to document the new behaviour in the docstring.
> 
> The patch I sent didn't manage the creation of the new symlink correctly
> either, as it created it with the same name as the target.  That is, in
> the examples given the result was:
> 
> -------------------------
> (copy-directory "~/tmp/foo" "~/Test" nil t)
> =>
> [mcenturion <at> localhost ~]$ ls -l Test
> total 4
> lrwxrwxrwx. 1 mcenturion mcenturion 26 ago 19 21:21 Test1 -> /home/mcenturion/tmp/Test1
> -------------------------
> 
> This new patch corrects both mistakes.

Thanks.

FWIW, I think this feature should be controlled by a user option, at
least because it changes a very old behavior.  Also, on some systems
(MS-Windows, for example) creating a symlink requires non-default
privileges, so it could be a nuisance to force this on such users.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Fri, 20 Aug 2021 13:45:02 GMT) Full text and rfc822 format available.

Message #93 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Marco Centurion <mcenturion <at> fing.edu.uy>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Fri, 20 Aug 2021 15:44:28 +0200
Marco Centurion <mcenturion <at> fing.edu.uy> writes:

> This new patch corrects both mistakes.

Thanks; applied to Emacs 28 (but I added the user option to control
this, as Eli suggested).

This change was small enough to apply without assigning copyright to the
FSF, but for future patches you want to submit, it might make sense to
get the paperwork started now, so that subsequent patches can be applied
speedily. Would you be willing to sign such paperwork?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug marked as fixed in version 28.1, send any further explanations to 10897 <at> debbugs.gnu.org and Thierry Volpiatto <thierry.volpiatto <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 20 Aug 2021 13:45:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Fri, 20 Aug 2021 14:30:01 GMT) Full text and rfc822 format available.

Message #98 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Marco Centurion - URI <mcenturion <at> fing.edu.uy>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Fri, 20 Aug 2021 11:29:32 -0300
> This change was small enough to apply without assigning copyright to the
> FSF, but for future patches you want to submit, it might make sense to
> get the paperwork started now, so that subsequent patches can be applied
> speedily. Would you be willing to sign such paperwork?

Of course!  I'll email assign <at> gnu.org to get the paperwork going.

-- 
Marco Centurion
Unidad de Recursos Informáticos
Facultad de Ingeniería - UdelaR




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Fri, 20 Aug 2021 14:39:01 GMT) Full text and rfc822 format available.

Message #101 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Marco Centurion - URI <mcenturion <at> fing.edu.uy>
Cc: 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Fri, 20 Aug 2021 16:38:30 +0200
Marco Centurion - URI <mcenturion <at> fing.edu.uy> writes:

>> This change was small enough to apply without assigning copyright to the
>> FSF, but for future patches you want to submit, it might make sense to
>> get the paperwork started now, so that subsequent patches can be applied
>> speedily. Would you be willing to sign such paperwork?
>
> Of course!  I'll email assign <at> gnu.org to get the paperwork going.

Great!

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sun, 22 Aug 2021 13:36:02 GMT) Full text and rfc822 format available.

Message #104 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Marco Centurion <mcenturion <at> fing.edu.uy>, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Sun, 22 Aug 2021 15:34:57 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> FWIW, I think this feature should be controlled by a user option, at
> least because it changes a very old behavior.  Also, on some systems
> (MS-Windows, for example) creating a symlink requires non-default
> privileges, so it could be a nuisance to force this on such users.

Hmm. Is this something we want also in Tramp?

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sun, 22 Aug 2021 13:48:02 GMT) Full text and rfc822 format available.

Message #107 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: mcenturion <at> fing.edu.uy, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Sun, 22 Aug 2021 16:46:39 +0300
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: Marco Centurion <mcenturion <at> fing.edu.uy>,  10897 <at> debbugs.gnu.org
> Date: Sun, 22 Aug 2021 15:34:57 +0200
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > FWIW, I think this feature should be controlled by a user option, at
> > least because it changes a very old behavior.  Also, on some systems
> > (MS-Windows, for example) creating a symlink requires non-default
> > privileges, so it could be a nuisance to force this on such users.
> 
> Hmm. Is this something we want also in Tramp?

Which part, specifically?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sun, 22 Aug 2021 14:59:01 GMT) Full text and rfc822 format available.

Message #110 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mcenturion <at> fing.edu.uy, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Sun, 22 Aug 2021 16:58:16 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

Hi Eli,

>> > FWIW, I think this feature should be controlled by a user option, at
>> > least because it changes a very old behavior.  Also, on some systems
>> > (MS-Windows, for example) creating a symlink requires non-default
>> > privileges, so it could be a nuisance to force this on such users.
>>
>> Hmm. Is this something we want also in Tramp?
>
> Which part, specifically?

Copy a symbolic link as-is. Example:

--8<---------------cut here---------------start------------->8---
(make-directory "/ssh::/tmp/foo")
(write-region "baz" nil "/ssh::/tmp/foo/baz")
(make-symbolic-link "/ssh::/tmp/foo" "/ssh::/tmp/bar")
(copy-directory "/ssh::/tmp/bar" "/ssh::/tmp/bla")
--8<---------------cut here---------------end--------------->8---

Currently, this creates a new directory "/ssh::/tmp/bla", which contains
the file "baz". If the new user option copy-directory-create-symlink is
non-nil, this should create the symlink "/ssh::/tmp/bla", pointing to
"/tmp/foo".

There are many traps in implementation, especially in case DIRECTORY and
NEWNAME of copy-directory are located on different hosts. But first, we
shall decide whether such a feature is useful for Tramp files in general.

(I would say yes, with all pain I see in the implementation.)

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sun, 22 Aug 2021 16:48:02 GMT) Full text and rfc822 format available.

Message #113 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Albinus <michael.albinus <at> gmx.de>
Cc: mcenturion <at> fing.edu.uy, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Sun, 22 Aug 2021 19:47:12 +0300
> From: Michael Albinus <michael.albinus <at> gmx.de>
> Cc: mcenturion <at> fing.edu.uy,  10897 <at> debbugs.gnu.org
> Date: Sun, 22 Aug 2021 16:58:16 +0200
> 
> >> Hmm. Is this something we want also in Tramp?
> >
> > Which part, specifically?
> 
> Copy a symbolic link as-is. Example:
> 
> --8<---------------cut here---------------start------------->8---
> (make-directory "/ssh::/tmp/foo")
> (write-region "baz" nil "/ssh::/tmp/foo/baz")
> (make-symbolic-link "/ssh::/tmp/foo" "/ssh::/tmp/bar")
> (copy-directory "/ssh::/tmp/bar" "/ssh::/tmp/bla")
> --8<---------------cut here---------------end--------------->8---
> 
> Currently, this creates a new directory "/ssh::/tmp/bla", which contains
> the file "baz". If the new user option copy-directory-create-symlink is
> non-nil, this should create the symlink "/ssh::/tmp/bla", pointing to
> "/tmp/foo".

Yes, sure.  We should support that with remote files as much as
possible.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sun, 22 Aug 2021 17:14:02 GMT) Full text and rfc822 format available.

Message #116 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mcenturion <at> fing.edu.uy, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Sun, 22 Aug 2021 19:13:03 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

Hi Eli,

>> Copy a symbolic link as-is. Example:
>>
>> --8<---------------cut here---------------start------------->8---
>> (make-directory "/ssh::/tmp/foo")
>> (write-region "baz" nil "/ssh::/tmp/foo/baz")
>> (make-symbolic-link "/ssh::/tmp/foo" "/ssh::/tmp/bar")
>> (copy-directory "/ssh::/tmp/bar" "/ssh::/tmp/bla")
>> --8<---------------cut here---------------end--------------->8---
>>
>> Currently, this creates a new directory "/ssh::/tmp/bla", which contains
>> the file "baz". If the new user option copy-directory-create-symlink is
>> non-nil, this should create the symlink "/ssh::/tmp/bla", pointing to
>> "/tmp/foo".
>
> Yes, sure.  We should support that with remote files as much as
> possible.

Will do. Thinking about, it makes only sense when both DIRECTORY and
NEWNAME are located on the same host. That's what I'm going to implement.

Best regards, Michael.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10897; Package emacs. (Sun, 22 Aug 2021 18:49:02 GMT) Full text and rfc822 format available.

Message #119 received at 10897 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mcenturion <at> fing.edu.uy, 10897 <at> debbugs.gnu.org
Subject: Re: bug#10897: copy-directory create new directory when copying a
 symlink
Date: Sun, 22 Aug 2021 20:48:12 +0200
Michael Albinus <michael.albinus <at> gmx.de> writes:

Hi Eli,

>>> Currently, this creates a new directory "/ssh::/tmp/bla", which contains
>>> the file "baz". If the new user option copy-directory-create-symlink is
>>> non-nil, this should create the symlink "/ssh::/tmp/bla", pointing to
>>> "/tmp/foo".
>>
>> Yes, sure.  We should support that with remote files as much as
>> possible.
>
> Will do. Thinking about, it makes only sense when both DIRECTORY and
> NEWNAME are located on the same host. That's what I'm going to implement.

Done. I've implemented it for all methods declared in tramp-sh.el; for
other methods it isn't relevant.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Sep 2021 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 228 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.