[FR] Add customization for default answers to `org-attach-set/unset-directory' prompt (was: Org-attach risks)

2024-03-30 Thread Kepa
Hi Ihor In addition to the sequence of prompts when changing the attachment directory: 1. Copy over attachments from old attachment directory to new one? 2. Delete old attachment directory? we can introduce a custom variable `org-attach-move-attachments' with the following values: 1. 'ask

[FR] Add customization for default answers to `org-attach-set/unset-directory' prompt (was: Org-attach risks)

2024-03-21 Thread Ihor Radchenko
[ Adding Org mailing list back to CC. Please use "Reply all" to keep the discussion public ] Kepa writes: > I don't know enough to upload a patch, I barely know what is a patch... No problem. Then, I will turn this discussion into a feature request. It may be eventually implemented by other

Re: [PATCH] Re: Org-attach for a directory

2022-07-21 Thread Cletip Cletip
Thank you! On Thu, 21 Jul 2022, 13:23 Ihor Radchenko, wrote: > Ihor Radchenko writes: > > > As for the 'cp method, it does not work for directories on current main. > > The fix is attached. > > Applied onto main via d2a110ffe. > > Best, > Ihor >

Re: [PATCH] Re: Org-attach for a directory

2022-07-21 Thread Ihor Radchenko
Ihor Radchenko writes: > As for the 'cp method, it does not work for directories on current main. > The fix is attached. Applied onto main via d2a110ffe. Best, Ihor

Re: Org-attach for a directory

2022-06-09 Thread Juan Manuel Macías
Cletip Cletip writes: > Thank you for your answer. You're welcome. > Your answer seems perfect to answer my question: I modify a function > of org-mode, and it allows me to attach folders and files to a > heading. > Unfortunately, it doesn't work (probably because of my version of > org-mode

[PATCH] Re: Org-attach for a directory

2022-06-09 Thread Ihor Radchenko
-attach.el +++ b/lisp/org-attach.el @@ -517,12 +517,17 @@ (defun org-attach-attach (file visit-dir method) current-prefix-arg nil)) (setq method (or method org-attach-method)) + (when (file-directory-p file) +(setq file (directory-file-name file))) (let ((basename (file-n

Re: Org-attach for a directory

2022-06-08 Thread Cletip Cletip
Thank you for your answer. Unfortunately, I would like to copy the entire directory. To clarify my second question, I would like to have a folder system with org-mode, and therefore only use org-attach to store my documents Le mer. 8 juin 2022 à 12:27, Fraga, Eric a écrit : > On Wednesday, 8

Re: Org-attach for a directory

2022-06-08 Thread Juan Manuel Macías
Hi, Cletip Cletip writes: > My question is in the object : can we attach a directory to a heading? > If yes, how, if not, why. Can we solve the problem? I have in my init the following modification to the org-attach-attach function so that I can copy a directory. I have replaced the line ((eq

Re: Org-attach for a directory

2022-06-08 Thread Fraga, Eric
On Wednesday, 8 Jun 2022 at 11:59, Cletip Cletip wrote: > My question is in the object : can we attach a directory to a heading? If you mean copying the directory and all of its contents, I imagine not. However, you can link to the directory if you wish by visiting the directory using dired,

Org-attach for a directory

2022-06-08 Thread Cletip Cletip
Hello to all. I hope to have understood the operation to ask a question to all the members, I hope that my question will not disturb anybody. If this is not the right place, do not hesitate to tell me and I apologize in advance for the inconvenience My question is in the object : can we attach a

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-15 Thread Maxim Nikulin
On 15/08/2021 16:11, Marco Wahl wrote: Maxim Nikulin writes: Compiling single /home/ubuntu/org-mode/lisp/org-compat.el... In end of data: org-compat.el:1255:1:Warning: the function ‘directory-empty-p’ is not known to be defined. I have never fought with this kind of problem. After

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-15 Thread Marco Wahl
Maxim Nikulin writes: >>> Compiling single /home/ubuntu/org-mode/lisp/org-compat.el... >>> >>> In end of data: >>> org-compat.el:1255:1:Warning: the function ‘directory-empty-p’ is not >>> known to >>> be defined. > I have never fought with this kind of problem. After looking at the >

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-12 Thread Maxim Nikulin
On 12/08/2021 04:17, Marco Wahl wrote: Maxim Nikulin writes: Compiling single /home/ubuntu/org-mode/lisp/org-compat.el... In end of data: org-compat.el:1255:1:Warning: the function ‘directory-empty-p’ is not known to be defined. ... How make the compiler happy? I have never fought

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-11 Thread Marco Wahl
Maxim Nikulin writes: > On 11/08/2021 03:52, Marco Wahl wrote: >>> Kyle Meyer writes: >>> In 61e083732 (org-attach: Possibly delete empty attach directory, 2021-07-09), you added a call to directory-empty-p. This function was introduced in Emacs's 0806075520 (Add

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-11 Thread Maxim Nikulin
On 11/08/2021 03:52, Marco Wahl wrote: Kyle Meyer writes: In 61e083732 (org-attach: Possibly delete empty attach directory, 2021-07-09), you added a call to directory-empty-p. This function was introduced in Emacs's 0806075520 (Add directory-empty-p and new argument COUNT for

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-10 Thread Marco Wahl
Arthur Miller writes: > Kyle Meyer writes: > >> In 61e083732 (org-attach: Possibly delete empty attach directory, >> 2021-07-09), you added a call to directory-empty-p. This function was >> introduced in Emacs's 0806075520 (Add directory-empty-p and new argument >> COUNT for directory-files-*,

Re: org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-09 Thread Arthur Miller
Kyle Meyer writes: > Hi Marco, > > In 61e083732 (org-attach: Possibly delete empty attach directory, > 2021-07-09), you added a call to directory-empty-p. This function was > introduced in Emacs's 0806075520 (Add directory-empty-p and new argument > COUNT for directory-files-*, 2020-11-02) and

org-attach-sync uses directory-empty-p (new in Emacs 28)

2021-08-08 Thread Kyle Meyer
Hi Marco, In 61e083732 (org-attach: Possibly delete empty attach directory, 2021-07-09), you added a call to directory-empty-p. This function was introduced in Emacs's 0806075520 (Add directory-empty-p and new argument COUNT for directory-files-*, 2020-11-02) and hasn't yet made it into a