emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [bug?] Different whitespace behavior between capture, and capture w. refile
@ 2015-01-05  4:01 Yuri Niyazov
  2015-01-09  0:38 ` Yuri Niyazov
  0 siblings, 1 reply; 2+ messages in thread
From: Yuri Niyazov @ 2015-01-05  4:01 UTC (permalink / raw)
  To: emacs-orgmode

Let's say I start with a .notes file that looks like this:

#+BEGIN_EXAMPLE
* Tasks
* Refile Here
* Other Stuff
#+END_EXAMPLE

with all the default capture templates.

The only org-mode configuration I have is

(org-blank-before-new-entry (quote ((heading) (plain-list-item))))

as well as C-c c for capture. Everything else is default. This is on
Emacs 24.4, and org-mode 8.2.10

Let's say I have another file called ~/Spike.org open, and I am
capturing from it. This is not relevant to the example, but makes it
clearer where the links are coming from.

Then, I capture two items:

C-c c t "Capture Item 1" C-c C-c and C-c c t "Capture Item 2" C-c C-c.

Now, my .notes file looks like this:

#+BEGIN_EXAMPLE
* Tasks
** TODO Capture Item 1
  [2015-01-04 Sun]
  [[file:~/Spike.org]]
** TODO Capture Item 2
  [2015-01-04 Sun]
  [[file:~/Spike.org]]
* Refile Here
* Other Stuff
#+END_EXAMPLE

Note how there are no blank lines between the different capture items.

Now, I capture two items, but instead of finishing the capture with
C-c C-c, I refile right from the Capture window:

C-c c t "Refile Item 1" C-c C-w "Refile here" and C-c c t "Refile Item
2" C-c C-w "Refile here".

Now, my .notes file looks like this:

#+BEGIN_EXAMPLE
* Tasks
** TODO Capture Item 1
  [2015-01-04 Sun]
  [[file:~/Spike.org]]
** TODO Capture Item 2
  [2015-01-04 Sun]
  [[file:~/Spike.org]]
* Refile Here
** TODO Refile Item 1
  [2015-01-04 Sun]
  [[file:~/Spike.org]]

** TODO Refile Item 2
  [2015-01-04 Sun]
  [[file:~/Spike.org]]

* Other Stuff
#+END_EXAMPLE

Note how refiling from the capture window introduced whitespace
between items under "Refile here", but finishing the capture doesn't.
Needless to say, this inconsistency drives me mildly up the wall. I am
currently looking into writing some sort of hook for
org-after-refile-insert-hook, but exactly what to do there is unclear.
Is there some configuration option I am missing?

Thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [bug?] Different whitespace behavior between capture, and capture w. refile
  2015-01-05  4:01 [bug?] Different whitespace behavior between capture, and capture w. refile Yuri Niyazov
@ 2015-01-09  0:38 ` Yuri Niyazov
  0 siblings, 0 replies; 2+ messages in thread
From: Yuri Niyazov @ 2015-01-09  0:38 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]

Could someone please chime in on this?

On Sunday, January 4, 2015, Yuri Niyazov <yuri.niyazov@gmail.com> wrote:

> Let's say I start with a .notes file that looks like this:
>
> #+BEGIN_EXAMPLE
> * Tasks
> * Refile Here
> * Other Stuff
> #+END_EXAMPLE
>
> with all the default capture templates.
>
> The only org-mode configuration I have is
>
> (org-blank-before-new-entry (quote ((heading) (plain-list-item))))
>
> as well as C-c c for capture. Everything else is default. This is on
> Emacs 24.4, and org-mode 8.2.10
>
> Let's say I have another file called ~/Spike.org open, and I am
> capturing from it. This is not relevant to the example, but makes it
> clearer where the links are coming from.
>
> Then, I capture two items:
>
> C-c c t "Capture Item 1" C-c C-c and C-c c t "Capture Item 2" C-c C-c.
>
> Now, my .notes file looks like this:
>
> #+BEGIN_EXAMPLE
> * Tasks
> ** TODO Capture Item 1
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> ** TODO Capture Item 2
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> * Refile Here
> * Other Stuff
> #+END_EXAMPLE
>
> Note how there are no blank lines between the different capture items.
>
> Now, I capture two items, but instead of finishing the capture with
> C-c C-c, I refile right from the Capture window:
>
> C-c c t "Refile Item 1" C-c C-w "Refile here" and C-c c t "Refile Item
> 2" C-c C-w "Refile here".
>
> Now, my .notes file looks like this:
>
> #+BEGIN_EXAMPLE
> * Tasks
> ** TODO Capture Item 1
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> ** TODO Capture Item 2
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
> * Refile Here
> ** TODO Refile Item 1
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
>
> ** TODO Refile Item 2
>   [2015-01-04 Sun]
>   [[file:~/Spike.org]]
>
> * Other Stuff
> #+END_EXAMPLE
>
> Note how refiling from the capture window introduced whitespace
> between items under "Refile here", but finishing the capture doesn't.
> Needless to say, this inconsistency drives me mildly up the wall. I am
> currently looking into writing some sort of hook for
> org-after-refile-insert-hook, but exactly what to do there is unclear.
> Is there some configuration option I am missing?
>
> Thanks!
>

[-- Attachment #2: Type: text/html, Size: 2713 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-01-09  0:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-05  4:01 [bug?] Different whitespace behavior between capture, and capture w. refile Yuri Niyazov
2015-01-09  0:38 ` Yuri Niyazov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).