Re: [O] default file for any .org file

2017-10-19 Thread Sébastien Le Maguer

Hello,

If I understand well, you are looking for a template. On my side, 
I used yatemplate coupled with auto-insert. Here is the part of 
configuration I have:


 (use-package yatemplate
   :ensure t
   :after yasnippet
   :config

   ;; Define template directory
   (setq yatemplate-dir (concat config-basedir 
   "/third_parties/templates"))


   ;; Coupling with auto-insert

   (setq auto-insert-alist nil)
   (yatemplate-fill-alist)
   (add-hook 'find-file-hook 'auto-insert)
   )

I use a template like the one attached which is place on the 
directory "/third_parties/templates". I let you 
adapt but technically it should work with many adaptations.


Kind regards,
Sébastien

#+TITLE:
#+AUTHOR: `user-full-name`
#+EMAIL: `user-mail-address`
#+DATE: `(format-time-string "%e %B %Y")`
#+DESCRIPTION:
#+KEYWORDS:
#+LANGUAGE:  fr
#+OPTIONS:   H:3 num:t toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t <:t
#+SELECT_TAGS: export
#+EXCLUDE_TAGS: noexport
#+HTML_HEAD: http://www.coli.uni-saarland.de/~slemaguer/default.css"; />
#+HTML_HEAD: 

* COMMENT some extra configuration




On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset 
 wrote:



Hello the list,

I apologize if the reply to my question has already be given 
here of if it

is in the org-mode website.

I would be happy to get in advance,  for any new .org file that 
I am going
to create, some properties given by default, for example the 
following

links for .bib file:


bibliography:/home/joseph/MEGA/org/reforg.bib
bibliographystyle:smfplain

and others things that I am always constrained to copy from 
previous .org

files and paste in the new one.

Your suggestions and your help will be very welcome,

Joseph



--
Save our in-boxes! http://emailcharter.org


Dr. Sébastien Le Maguer
Postdoctorate researcher
Co-chair of SYNSIG (https://synsig.org/index.php/Main_Page)

Saarland University
Campus C7.4 - room 2.03
D-66123 Saarbrücken
Germany

phone : +49-681-302-70030
Mail: slemag...@coli.uni-saarland.de
website :  http://www.coli.uni-saarland.de/~slemaguer/



Re: [O] default file for any .org file

2017-10-19 Thread Joseph Vidal-Rosset
Many thanks Sébastien ! You understood perfectly what I am looking for. I
am going to test your solution and I will be back to inform you.

Again, I am thankful to you, for your quick and certainly helpful reply.

Best wishes

Jo.

2017-10-19 9:02 GMT+02:00 Sébastien Le Maguer <
slemag...@coli.uni-saarland.de>:

> Hello,
>
> If I understand well, you are looking for a template. On my side, I used
> yatemplate coupled with auto-insert. Here is the part of configuration I
> have:
>
>  (use-package yatemplate
>:ensure t
>:after yasnippet
>:config
>
>;; Define template directory
>(setq yatemplate-dir (concat config-basedir
> "/third_parties/templates"))
>
>;; Coupling with auto-insert
>
>(setq auto-insert-alist nil)
>(yatemplate-fill-alist)
>(add-hook 'find-file-hook 'auto-insert)
>)
>
> I use a template like the one attached which is place on the directory
> "/third_parties/templates". I let you adapt but
> technically it should work with many adaptations.
>
> Kind regards,
> Sébastien
>
>
>
>
>
> On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset <
> joseph.vidal.ros...@gmail.com> wrote:
>
> Hello the list,
>>
>> I apologize if the reply to my question has already be given here of if it
>> is in the org-mode website.
>>
>> I would be happy to get in advance,  for any new .org file that I am going
>> to create, some properties given by default, for example the following
>> links for .bib file:
>>
>>
>> bibliography:/home/joseph/MEGA/org/reforg.bib
>> bibliographystyle:smfplain
>>
>> and others things that I am always constrained to copy from previous .org
>> files and paste in the new one.
>>
>> Your suggestions and your help will be very welcome,
>>
>> Joseph
>>
>
>
> --
> Save our in-boxes! http://emailcharter.org
>
> 
> 
> Dr. Sébastien Le Maguer
> Postdoctorate researcher
> Co-chair of SYNSIG (https://synsig.org/index.php/Main_Page)
>
> Saarland University
> Campus C7.4 - room 2.03
> D-66123 Saarbrücken
> Germany
>
> phone : +49-681-302-70030
> Mail: slemag...@coli.uni-saarland.de
> website :  http://www.coli.uni-saarland.de/~slemaguer/
> 
> 
>
>


Re: [O] default file for any .org file

2017-10-19 Thread Fabrice Popineau
More flexible imho : use a #+setupfile: directive.

#+setupfile: my-setup.org

http://orgmode.org/manual/In_002dbuffer-settings.html

Fabrice

2017-10-19 9:12 GMT+02:00 Joseph Vidal-Rosset :

> Many thanks Sébastien ! You understood perfectly what I am looking for. I
> am going to test your solution and I will be back to inform you.
>
> Again, I am thankful to you, for your quick and certainly helpful reply.
>
> Best wishes
>
> Jo.
>
> 2017-10-19 9:02 GMT+02:00 Sébastien Le Maguer <
> slemag...@coli.uni-saarland.de>:
>
>> Hello,
>>
>> If I understand well, you are looking for a template. On my side, I used
>> yatemplate coupled with auto-insert. Here is the part of configuration I
>> have:
>>
>>  (use-package yatemplate
>>:ensure t
>>:after yasnippet
>>:config
>>
>>;; Define template directory
>>(setq yatemplate-dir (concat config-basedir
>> "/third_parties/templates"))
>>
>>;; Coupling with auto-insert
>>
>>(setq auto-insert-alist nil)
>>(yatemplate-fill-alist)
>>(add-hook 'find-file-hook 'auto-insert)
>>)
>>
>> I use a template like the one attached which is place on the directory
>> "/third_parties/templates". I let you adapt but
>> technically it should work with many adaptations.
>>
>> Kind regards,
>> Sébastien
>>
>>
>>
>>
>>
>> On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset <
>> joseph.vidal.ros...@gmail.com> wrote:
>>
>> Hello the list,
>>>
>>> I apologize if the reply to my question has already be given here of if
>>> it
>>> is in the org-mode website.
>>>
>>> I would be happy to get in advance,  for any new .org file that I am
>>> going
>>> to create, some properties given by default, for example the following
>>> links for .bib file:
>>>
>>>
>>> bibliography:/home/joseph/MEGA/org/reforg.bib
>>> bibliographystyle:smfplain
>>>
>>> and others things that I am always constrained to copy from previous .org
>>> files and paste in the new one.
>>>
>>> Your suggestions and your help will be very welcome,
>>>
>>> Joseph
>>>
>>
>>
>> --
>> Save our in-boxes! http://emailcharter.org
>>
>> 
>> 
>> Dr. Sébastien Le Maguer
>> Postdoctorate researcher
>> Co-chair of SYNSIG (https://synsig.org/index.php/Main_Page)
>>
>> Saarland University
>> Campus C7.4 - room 2.03
>> D-66123 Saarbrücken
>> Germany
>>
>> phone : +49-681-302-70030 <+49%20681%2030270030>
>> Mail: slemag...@coli.uni-saarland.de
>> website :  http://www.coli.uni-saarland.de/~slemaguer/
>> 
>> 
>>
>>
>


-- 
Fabrice Popineau
-
SUPELEC
Département Informatique
3, rue Joliot Curie
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050>
Standard : +33 (0) 169851212 <01%2069%2085%2012%2012>
--


Re: [O] default file for any .org file

2017-10-19 Thread Joseph Vidal-Rosset
Many thanks Fabrice for this link. I am going to try theses two options.

Best wishes,

Jo.

2017-10-19 10:54 GMT+02:00 Fabrice Popineau :

> More flexible imho : use a #+setupfile: directive.
>
> #+setupfile: my-setup.org
>
> http://orgmode.org/manual/In_002dbuffer-settings.html
>
> Fabrice
>
> 2017-10-19 9:12 GMT+02:00 Joseph Vidal-Rosset <
> joseph.vidal.ros...@gmail.com>:
>
>> Many thanks Sébastien ! You understood perfectly what I am looking for. I
>> am going to test your solution and I will be back to inform you.
>>
>> Again, I am thankful to you, for your quick and certainly helpful reply.
>>
>> Best wishes
>>
>> Jo.
>>
>> 2017-10-19 9:02 GMT+02:00 Sébastien Le Maguer <
>> slemag...@coli.uni-saarland.de>:
>>
>>> Hello,
>>>
>>> If I understand well, you are looking for a template. On my side, I used
>>> yatemplate coupled with auto-insert. Here is the part of configuration I
>>> have:
>>>
>>>  (use-package yatemplate
>>>:ensure t
>>>:after yasnippet
>>>:config
>>>
>>>;; Define template directory
>>>(setq yatemplate-dir (concat config-basedir
>>> "/third_parties/templates"))
>>>
>>>;; Coupling with auto-insert
>>>
>>>(setq auto-insert-alist nil)
>>>(yatemplate-fill-alist)
>>>(add-hook 'find-file-hook 'auto-insert)
>>>)
>>>
>>> I use a template like the one attached which is place on the directory
>>> "/third_parties/templates". I let you adapt but
>>> technically it should work with many adaptations.
>>>
>>> Kind regards,
>>> Sébastien
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset <
>>> joseph.vidal.ros...@gmail.com> wrote:
>>>
>>> Hello the list,

 I apologize if the reply to my question has already be given here of if
 it
 is in the org-mode website.

 I would be happy to get in advance,  for any new .org file that I am
 going
 to create, some properties given by default, for example the following
 links for .bib file:


 bibliography:/home/joseph/MEGA/org/reforg.bib
 bibliographystyle:smfplain

 and others things that I am always constrained to copy from previous
 .org
 files and paste in the new one.

 Your suggestions and your help will be very welcome,

 Joseph

>>>
>>>
>>> --
>>> Save our in-boxes! http://emailcharter.org
>>>
>>> 
>>> 
>>> Dr. Sébastien Le Maguer
>>> Postdoctorate researcher
>>> Co-chair of SYNSIG (https://synsig.org/index.php/Main_Page)
>>>
>>> Saarland University
>>> Campus C7.4 - room 2.03
>>> D-66123 Saarbrücken
>>> Germany
>>>
>>> phone : +49-681-302-70030 <+49%20681%2030270030>
>>> Mail: slemag...@coli.uni-saarland.de
>>> website :  http://www.coli.uni-saarland.de/~slemaguer/
>>> 
>>> 
>>>
>>>
>>
>
>
> --
> Fabrice Popineau
> -
> SUPELEC
> Département Informatique
> 3, rue Joliot Curie
> 
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050>
> Standard : +33 (0) 169851212 <01%2069%2085%2012%2012>
> --
>
>


Re: [O] default file for any .org file

2017-10-19 Thread Joseph Vidal-Rosset
Hello again,

I am sorry to say that there is certainly something that I do not
understand. I have defined a firstemplate.org file in
"/home/joseph/MEGA/git/scimax/user/"  and I have adapted your code in my
user.el, Sébastien:

(use-package yatemplate
   :ensure t
   :after yasnippet
   :config

   ;; Define template directory
   (setq yatemplate-dir (concat config-basedir
"/home/joseph/MEGA/git/scimax/user/firstemplate.org"))

   ;; Coupling with auto-insert

   (setq auto-insert-alist nil)
   (yatemplate-fill-alist)
   (add-hook 'find-file-hook 'auto-insert)
   )

But it does not work for me. If I create a new .org file, I do not see the
wanted lines that refer to my orgref.bib  file...

Same thing with Fabrice's solution.  "Chou blanc ... " :(

I need at least a more precise example.

Best wishes

Jo.

2017-10-19 10:54 GMT+02:00 Fabrice Popineau :

> More flexible imho : use a #+setupfile: directive.
>
> #+setupfile: my-setup.org
>
> http://orgmode.org/manual/In_002dbuffer-settings.html
>
> Fabrice
>
> 2017-10-19 9:12 GMT+02:00 Joseph Vidal-Rosset <
> joseph.vidal.ros...@gmail.com>:
>
>> Many thanks Sébastien ! You understood perfectly what I am looking for. I
>> am going to test your solution and I will be back to inform you.
>>
>> Again, I am thankful to you, for your quick and certainly helpful reply.
>>
>> Best wishes
>>
>> Jo.
>>
>> 2017-10-19 9:02 GMT+02:00 Sébastien Le Maguer <
>> slemag...@coli.uni-saarland.de>:
>>
>>> Hello,
>>>
>>> If I understand well, you are looking for a template. On my side, I used
>>> yatemplate coupled with auto-insert. Here is the part of configuration I
>>> have:
>>>
>>>  (use-package yatemplate
>>>:ensure t
>>>:after yasnippet
>>>:config
>>>
>>>;; Define template directory
>>>(setq yatemplate-dir (concat config-basedir
>>> "/third_parties/templates"))
>>>
>>>;; Coupling with auto-insert
>>>
>>>(setq auto-insert-alist nil)
>>>(yatemplate-fill-alist)
>>>(add-hook 'find-file-hook 'auto-insert)
>>>)
>>>
>>> I use a template like the one attached which is place on the directory
>>> "/third_parties/templates". I let you adapt but
>>> technically it should work with many adaptations.
>>>
>>> Kind regards,
>>> Sébastien
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset <
>>> joseph.vidal.ros...@gmail.com> wrote:
>>>
>>> Hello the list,

 I apologize if the reply to my question has already be given here of if
 it
 is in the org-mode website.

 I would be happy to get in advance,  for any new .org file that I am
 going
 to create, some properties given by default, for example the following
 links for .bib file:


 bibliography:/home/joseph/MEGA/org/reforg.bib
 bibliographystyle:smfplain

 and others things that I am always constrained to copy from previous
 .org
 files and paste in the new one.

 Your suggestions and your help will be very welcome,

 Joseph

>>>
>>>
>>> --
>>> Save our in-boxes! http://emailcharter.org
>>>
>>> 
>>> 
>>> Dr. Sébastien Le Maguer
>>> Postdoctorate researcher
>>> Co-chair of SYNSIG (https://synsig.org/index.php/Main_Page)
>>>
>>> Saarland University
>>> Campus C7.4 - room 2.03
>>> D-66123 Saarbrücken
>>> Germany
>>>
>>> phone : +49-681-302-70030 <+49%20681%2030270030>
>>> Mail: slemag...@coli.uni-saarland.de
>>> website :  http://www.coli.uni-saarland.de/~slemaguer/
>>> 
>>> 
>>>
>>>
>>
>
>
> --
> Fabrice Popineau
> -
> SUPELEC
> Département Informatique
> 3, rue Joliot Curie
> 
> 91192 Gif/Yvette Cedex
> Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050>
> Standard : +33 (0) 169851212 <01%2069%2085%2012%2012>
> --
>
>


Re: [O] default file for any .org file

2017-10-19 Thread Fabrice Popineau
2017-10-19 15:38 GMT+02:00 Joseph Vidal-Rosset <
joseph.vidal.ros...@gmail.com>:

> Hello again,
>
> I am sorry to say that there is certainly something that I do not
> understand. I have defined a firstemplate.org file in
> "/home/joseph/MEGA/git/scimax/user/"  and I have adapted your code in my
> user.el, Sébastien:
>
> (use-package yatemplate
>:ensure t
>:after yasnippet
>:config
>
>;; Define template directory
>(setq yatemplate-dir (concat config-basedir
> "/home/joseph/MEGA/git/scimax/user/firstemplate.org"))
>
>;; Coupling with auto-insert
>
>(setq auto-insert-alist nil)
>(yatemplate-fill-alist)
>(add-hook 'find-file-hook 'auto-insert)
>)
>
> But it does not work for me. If I create a new .org file, I do not see the
> wanted lines that refer to my orgref.bib  file...
>
> Same thing with Fabrice's solution.  "Chou blanc ... " :(
>
>
If you add your setup by
#+setupfile: my-setup.org
you need to refresh it by C-c C-c on this line.
You won't see the content of my-setup.org, but it will be active in your
current orf buffer.

Fabrice


Re: [O] function for inserting a block

2017-10-19 Thread Carsten Dominik
Hi Eric,



On Wed, Oct 18, 2017 at 4:58 PM, Eric Abrahamsen 
wrote:

> Carsten Dominik  writes:
>
> > Dear all,
> >
> > this is great added functionality that I have missed a lot myself.
> Thanks for this!  Also, I like the key binding.
>
> I do too, though I also notice it conflicts with inlinetask insertion.
>


Ooops.  I overlooked that. Hmmm, that is not ideal.

Maybe then C-c C-x w would be better, w can stand for "wrap".


>
> > One improvement I can think of it to read the block type with completion
> (but still allow any word to be used).
>
> I'd be happy to do that. There would be a tiny bit of redundancy with
> `org-structure-template-alist', but nothing too terrible.
>

I agree.  You could pull it would of the alist, but I am not sure it is
worth it.

Carsten


>
> Eric
>
>
>


Re: [O] Add minlevel parameter to column view parameters

2017-10-19 Thread Nicolas Goaziou
Hello,

Thomas Cordival  writes:

> you will find attached a simple patch to add a new parameter to the
> column view dynamic block: minlevel.

Thank you!

> + (if (and minlevel maxlevel)
> +  (format "LEVEL>=%d&LEVEL<=%d" minlevel maxlevel)
> +   (if minlevel
> +(format "LEVEL>=%d" minlevel)
> +  (if maxlevel
> +  (format "LEVEL<=%d" maxlevel))
> +  ))

This could be refactored into a `cond'.

> + ;; (and (or (not minlevel) (format "LEVEL>=%d" minlevel))
> + ;;(or (not maxlevel) (format "LEVEL<=%d" maxlevel)))

This can be removed.

Have you signed FSF papers? Otherwise, you need to insert TINCHANGE at
the end of the commit message.


Regards,

-- 
Nicolas Goaziou



Re: [O] Formatting issues exporting to a man page

2017-10-19 Thread Nicolas Goaziou
Hello,

Anthony Michael Agelastos  writes:

> Greetings:
>
> Thank you, Nicolas, for your very prompt response. Your enhancements
> definitely improved things, however the formatting with == still
> appears to have issues (i.e., there is a “.nf” before the word and the
> question mark at the end of the sentence is absent). I have the output
> from `man` on the resultant Test.man file below. I would appreciate
> any guidance you can provide with fixing this issue. Thank you for
> your help with this.

I fixed it. 

The problem is to know what is verbatim markup in Groff. At the moment,
it italicizes the text and protect minus characters.

Regards,

-- 
Nicolas Goaziou



[O] Taskjuggler effort and days

2017-10-19 Thread edgar

Hello,

I got an example from the web to run Taskjuggler (attached; 
https://emacs.stackexchange.com/a/31513).


However, when I try to set efforts to units other than hours (~:Effort: 
5d~ or ~:Effort: 1w~; see [[tjp.org::Another task]]), org-export 
multiplies 24 hours times the number of days. This results in 120.0h (3 
weeks in the HTML report) for 5d.


I would like to know if, instead of having 24 hours as the factor, there 
is a way to have the actual value copied (~:Effort: 5d~ from the tjp.org 
to ~effort 5d~ in the tjp.tjp).


I modified the resulting .tjp, and I can set ~effort 5d~ to get 5 
effective days (if no other task is allocated to the resource). Also, if 
I set ~:Length: 5d~ instead of ~:Effort: 5d~, the time is well allocated 
(results in ~length 5d~; may be that is a clue..?).


If this question has been answered before, I would appreciate if someone 
points me in the right direction. Thanks!


* My configuration
Org mode version 9.1.2 (9.1.2-15-g1d5142-elpa
GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.8)
I copied and loaded the ox-taskjuggler.el from http://orgmode.org/elpa/ 
today.


#+BEGIN_SRC emacs-lisp
(require 'package)
(package-initialize)
(require 'org)
(add-to-list 'org-export-backends 'taskjuggler)
(require 'ox-taskjuggler)
#+END_SRC

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!

Commercial and Bulk Mail Options!  project nil "test project" "1.0" 2017-03-25 +280d {
}
shift s40 "Part time shift" {
  workinghours wed, thu, fri off
}
resource people "People" {
  resource sdude "Some Dude" {
limits { dailymax 8.0h }
workinghours mon - fri 9:00 - 12:00, 13:00 - 18:00
  }
}
task test "test project" {
  start 2017-03-25
  task milestones "Milestones" {
task start "Start" {
  milestone
}
task end "End" {
  milestone
}
  }
  task tasks "tasks" {
task first_task "Some task" {
  depends !!milestones.start
  purge allocate
  allocate sdude
  complete 50
  effort 4.0h
}
task second_task "Another task" {
  depends !first_task
  purge allocate
  allocate sdude
  complete 50
  effort 120.0h
}
  }
}
textreport report "Plan" {
  formats html
  header '== test project =='

  center -8<-
[#Plan Plan] | [#Resource_Allocation Resource Allocation]

=== Plan ===
<[report id="plan"]>

=== Resource Allocation ===
<[report id="resourceGraph"]>
  ->8-
}

# A traditional Gantt chart with a project overview.
taskreport plan "" {
  headline "Project Plan"
  columns bsi, name, start, end, effort, chart
  loadunit shortauto
  hideresource 1
}

# A graph showing resource allocation. It identifies whether each
# resource is under- or over-allocated for.
resourcereport resourceGraph "" {
  headline "Resource Allocation Graph"
  columns no, name, effort, weekly
  loadunit shortauto
  hidetask ~(isleaf() & isleaf_())
  sorttasks plan.start.up
}
#+COLUMNS: %25ITEM %TODO %3PRIORITY %ALLOCATE(Owner) %DEPENDS(depends) 
%EFFORT(Effort) %TAGS
* test project  :taskjuggler_project:
  :PROPERTIES:
  :start:2017-03-25
  :END:

** Milestones

the milestones for the project

*** Start
:PROPERTIES:
:task_id:  start
:END:

the start of the project.

*** End
:PROPERTIES:
:task_id:  end
:depends:  blah
:END:

this is the end of the project

** tasks

*** TODO Some task
DEADLINE: <2017-03-29 Wed> SCHEDULED: <2017-03-27 Mon>
:PROPERTIES:
:task_id:  first_task
:Effort:   4:00
:depends:  start
:complete: 50
:ALLOCATE: sdude
:END:

this is a test of the system.

*** TODO Another task
DEADLINE: <2017-03-29 Wed> SCHEDULED: <2017-03-28 Tue>
:PROPERTIES:
:task_id:  second_task
:Effort:   5d
:depends:  first_task
:complete: 50
:ALLOCATE: sdude
:END:

* Resources:taskjuggler_resource:
  :PROPERTIES:
  :workinghours: sat, sun off
  :END:

** People
:PROPERTIES:
:COLUMNS:  %30Item(Person) %workinghours(Work hours) %15resource_id(ID) %email 
%Phone
:END:
These are the resources available to the project.

*** Some Dude
   :PROPERTIES:
   :resource_id: sdude
   :limits:   { dailymax 8.0h }
   :workinghours: mon - fri 9:00 - 12:00, 13:00 - 18:00
   :END:


[O] org-capture-kill uses the kill ring

2017-10-19 Thread Allen Li
org-capture-kill (C-c C-k) used to abort capturing puts the contents
of the capture buffer into the kill ring.

This is obstructive when the user wants to abort a capture, but save a
portion of the text into the kill ring to yank elsewhere.  The aborted
capture contents will replace the desired content.

Aborting capture should act transparently like killing a buffer.  It
shouldn't affect the kill ring.  If the user wants to keep the capture
contents, he can trivially run C-x h mark-whole-buffer M-w
kill-ring-save



Re: [O] org-capture-kill uses the kill ring

2017-10-19 Thread Kaushal Modi
On Thu, Oct 19, 2017 at 11:28 PM Allen Li  wrote:

> org-capture-kill (C-c C-k) used to abort capturing puts the contents
> of the capture buffer into the kill ring.
>
> This is obstructive when the user wants to abort a capture, but save a
> portion of the text into the kill ring to yank elsewhere.  The aborted
> capture contents will replace the desired content.
>

I believe that's a good fail-safe mechanism. Imagine the joy when you
realize that Org simply saved your incomplete capture in the event you kill
it by mistake!

FWIW, I have never needed to make use of that failsafe mechanism, nor have
I ever needed to copy something from my capture and then kill it. The use
case you mention seems to be very rare IMO.


> Aborting capture should act transparently like killing a buffer.  It
> shouldn't affect the kill ring.  If the user wants to keep the capture
> contents, he can trivially run C-x h mark-whole-buffer M-w
> kill-ring-save
>

You can always C-y M-y to yank your second-last kill, C-y M-y M-y for the
third-last kill, and so on ..

To summarize:
- Current behavior helps users lose their incomplete captures by mistake.
- In the event you want to copy something and deliberately kill the capture
buffer, you can always paste it with C-y M-y.
-- 

Kaushal Modi