emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [PATCH] org-capture: Add a custom to control save target file or


From: Nicolas Goaziou
Subject: Re: [O] [PATCH] org-capture: Add a custom to control save target file or not.
Date: Thu, 12 Apr 2018 15:22:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux)

Hello,

tumashu <address@hidden> writes:

> I use org-capture to capture text to a file of my mobile phone
> with the help of tramp and termux's sshd, the save buffer is very
> slow, so I want to org-capture-finalize just update buffer, and
> I save buffer manually when need.

Thank you. Comments follow.

> By the way, can we contribute org-mode with the help of PR feature in
> code.orgmode.org?

AFAIC, I'd rather deal with email than with a web interface. However,
Bastien accepted PR from code.orgmode.org in the past.

The problem with PR in code.orgmode.org is that the discussion around
the patch happens somewhere else than on the ML.

> +(defcustom org-capture-finalize-save-buffer t
> +  "When nil, org-capture-finalize will not save target file's buffer."
> +  :group 'org-capture
> +  :version "24.1"
> +  :type 'boolean)

The :version value is incorrect. Also, it is missing ":safe #'booleanp".

>  (defcustom org-capture-bookmark t
>    "When non-nil, add a bookmark pointing at the last stored
>  position when capturing."
> @@ -791,7 +797,10 @@ captured item after finalizing."
>       (org-encrypt-entry)))
>  
>      ;; Kill the indirect buffer
> -    (save-buffer)
> +    (if org-capture-finalize-save-buffer
> +     (save-buffer)
> +      (message "The capture target file is not auto saved, please save it 
> manually."))

Would it make sense to simply not call `save-buffer' in all cases?
Saving buffer after a capture is rather opinionated.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]