emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* incorrect indentation of new item inserted with capture template
@ 2021-12-06 17:48 Ian Garmaise
  2022-10-29  4:50 ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Garmaise @ 2021-12-06 17:48 UTC (permalink / raw)
  To: emacs-orgmode

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

I have had this problem for several months.

I keep a daily journal.  Each morning I add a new entry in a journal file
using a capture template.  The journal file is always loaded.
On some occasions the indentation of the new entry is incorrect.

Here's an example of incorrect indentation:

*** 2021-12-05 Sunday

- item 1
- item 2

* 2021-12-06 Monday

What I usually do is undo the insertion and reissue the command.
This always works.

I had thought this might have been due to a mixed org installation, but
recently, I deleted org and reinstalled from org elpa with emacs -q

I have no other current issues.
This is the capture template:

     ("j" "Journal entry" plain
      (file+olp+datetree "~/Dropbox/org/journal.org")
      "%i\n%?\n" :time-prompt 1 :jump-to-captured 1)

I am happy to do any other testing that is needed.

Running on Windows 10


Emacs  : GNU Emacs 27.2 (build 1, i686-w64-mingw32)
 of 2021-03-26
Package: Org mode version 9.5 (9.5-g0a86ad @
c:/users/ian/.emacs.d/elpa/org-9.5/)

current state:
==============
(setq
 org-link-abbrev-alist '(("gmail" . "
https://mail.google.com/mail/?view=cm&fs=1&to=%s"))
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-babel-load-languages '((emacs-lisp . t) (latex . t) (dot . t) (org .
t) (plantuml . t))
 org-agenda-time-grid '((daily today require-timed) (600 800 1000 1200 1400
1600 1800 2000) "......"
"----------------")
 org-babel-results-keyword "results"
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-html-format-headline-function
'org-html-format-headline-default-function
 org-export-before-parsing-hook '(org-attach-expand-links)
 org-capture-templates '(("z" "Toefl school entry" entry
 (file+olp "~/Dropbox/org/nowtutoradmin.org" "Tasks (billable)"
  "Contact schoools, consultants re B2B service" "Toefl Schools in NYC")
 "*** %^{School}\n:PROPERTIES\n:web_site: %^{web site}\n:Email_address:
%^{email address}\n:Gmail_link: [[gmail:%\\3]]\n:FirstName: %^{first
name}\n:LastName: %^{last name}\n:Position: %^{position}\n:datecreated:
%u\n:END\n" :jump-to-captured 1)
("n" "Candidate entry" entry
 (file+olp "~/Dropbox/org/nowtutoradmin.org" "datastores" "candidates")
 "** %^{Candidate} %^g\n:PROPERTIES:\n:Position: %^{Select
position|Portuguese Voice|In-China online}\n:Status: \n:Email_address:
[[gmail:%^{email
address}]]\n:Pronunciation_test_id:\n:LinkedInAddress:\n:ScreeningResult:\n:Datecreated:
%u\n:Skype:
\n:Ranking:\n:Video_url:\n:University_grad:\n:Certified:\n:Years_of_experience:\n:Open_to_onsite:\n:Resume_location:\n:Resume_link:\n:Citizenship:\n:Country:\n:END:\n***
%\\1                                           :sendScreener:\nDEADLINE:
%(org-insert-time-stamp (org-read-date nil t \"+3\"))\n" :jump-to-captured
1)
("s" "Submission entry" entry
 (file+olp "~/Dropbox/org/nowtutoradmin.org" "datastores" "submissions")
 "** TOSUBMIT %^{Client|Aston|Chengxun|Daqing EF|EF Xuzhou|Jing|Lin
Qiu|Micro-Language|Smilekid|Super Small Translation|Wowtalk}
%a\n:PROPERTIES:\n:Client: %\\1\n:Candidate: %a\n:Datecreated: %U\n:END:\n"
:jump-to-captured 1)
("j" "Journal entry" plain (file+olp+datetree "~/Dropbox/org/journal.org")
"%i\n%?\n"
 :time-prompt 1 :jump-to-captured 1)
("m" "meeting log entry" plain
 (file+olp+datetree "~/Dropbox/org/nowtutoradmin.org" "work log") "\n\n%?"
:clock-in 1
 :empty-lines 1 :jump-to-captured 1)
("w" "Web site" entry (file "") "* %a :website:\n\n%U %?\n\n%:initial")
("p" "Protocol" entry (file+headline (\, (concat org-directory "notes.org"))
"Inbox")
 "* %^{Title}\nSource: %u, %c\n #+BEGIN_QUOTE\n%i\n#+END_QUOTE\n\n\n%?")
("L" "Protocol Link" entry (file+headline (\, "~/Dropbox/org/inbox.org")
"Web captures")
 "* %? [[%:link][%(transform-square-brackets-to-round-ones
\"%:description\")]]\nCaptured On: %U")
("g" "Goals")
("ge" "Epic goals" entry (file+olp buffer-file-name "Goals" "Epic goals")
 (file "~/Dropbox/org/tpl-goal.txt") :empty-lines-after 1)
("gl" "Long term goal (2-5 years from now)" entry
 (file+olp buffer-file-name "Goals" "Long term goals")
 (file "~/Dropbox/org/tpl-goal.txt") :empty-lines-after 1)
("gm" "Medium term goal (6 months up to 2 years)" entry
 (file+olp buffer-file-name "Goals" "Medium term goals")
 (file "~/Dropbox/org/tpl-goal.txt") :empty-lines-after 1)
("gs" "Short term goals (next 6 months)" entry
 (file+olp buffer-file-name "Goals" "Short term goals")
 (file "~/Dropbox/org/tpl-goal.txt") :empty-lines-after 1)
)
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-clock-report-include-clocking-task t
 org-link-from-user-regexp "\\<ian@DESKTOP-5562SOU\\>"
 org-log-into-drawer t
 org-babel-tangle-lang-exts '(("latex" . "tex") ("emacs-lisp" . "el")
("elisp" . "el"))
 org-directory "~/Dropbox/org"
 org-clock-sound "/program files/itunes/itunes.resources/complete.wav"
 org-odt-format-headline-function 'org-odt-format-headline-default-function
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-agenda-loop-over-headlines-in-active-region nil
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-enforce-todo-dependencies t
 org-columns-default-format "%40ITEM(Task) %17Effort(Estimated Effort){:}
%CLOCKSUM %CLOCKSUM_T"
 org-agenda-include-diary t
 org-odt-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME CONTENTS)"]
 org-agenda-files '("~/Dropbox/org/organizer.org" "~/Dropbox/org/
nowtutoradmin.org" "~/Dropbox/org/notes.org")
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-link-elisp-confirm-function 'yes-or-no-p
 org-enforce-todo-checkbox-dependencies t
 org-global-properties '(("Effort_All" . "0 0:10 0:30 1:00 2:00 3:00 4:00
5:00 6:00 7:00"))
 org-babel-pre-tangle-hook '(save-buffer)
 org-odt-format-inlinetask-function
'org-odt-format-inlinetask-default-function
 org-occur-hook '(org-first-headline-recenter)
 org-mode-hook '(org-clock-load
#[0 "\300\301\302\303\304$\207" [add-hook change-major-mode-hook
org-show-all append local] 5]
#[0 "\300\301\302\303\304$\207"
  [add-hook change-major-mode-hook org-babel-show-result-all append local]
5]
org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-archive-subtree-save-file-p nil
 org-agenda-span 'day
 org-speed-command-hook '(org-speed-command-activate
org-babel-speed-command-activate)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-default-notes-file "~/Dropbox/org/notes.org"
 org-agenda-log-mode-items '(closed clock state)
 org-src-lang-modes '(("plantuml" . plantuml) ("C" . c) ("C++" . c++)
("asymptote" . asy) ("bash" . sh)
     ("beamer" . latex) ("calc" . fundamental) ("cpp" . c++) ("ditaa" .
artist)
     ("dot" . fundamental) ("elisp" . emacs-lisp) ("ocaml" . tuareg)
("screen" . shell-script)
     ("shell" . sh) ("sqlite" . sql))
 org-clock-persist 'history
 org-export-before-processing-hook
'(org-blackfriday--reset-org-blackfriday--code-block-num-backticks)
 org-latex-format-inlinetask-function
'org-latex-format-inlinetask-default-function
 org-bibtex-headline-format-function #[257 "\300 \236A\207" [:title] 3
"\n\n(fn ENTRY)"]
 org-confirm-shell-link-function 'yes-or-no-p
 org-mime-src-mode-hook '(org-mime-src-mode-configure-edit-buffer)
 org-ascii-format-drawer-function #[771 " \207" [] 4 "\n\n(fn NAME CONTENTS
WIDTH)"]
 org-link-shell-confirm-function 'yes-or-no-p
 org-todo-keywords '((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE"))
 org-protocol-protocol-alist '(("capture-eww-readable" :protocol
"capture-eww-readable" :function
org-protocol-capture-html--capture-eww-readable :kill-client t)
      ("capture-html" :protocol "capture-html" :function
org-protocol-capture-html--with-pandoc :kill-client t)
      )
 org-log-done t
 org-plantuml-jar-path "/users/ian/plantuml.jar"
 org-modules '(ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info
ol-irc ol-mhe ol-rmail ol-eww org-habit)
 org-catch-invisible-edits 'smart
 org-format-latex-options '(:foreground default :background default :scale
2.0 :html-foreground "Black"
   :html-background "Transparent" :html-scale 1.0 :matchers
   ("begin" "$1" "$" "$$" "\\(" "\\["))
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-trello-current-prefix-keybinding "C-c o"
 org-file-apps '((auto-mode . emacs) ("\\.mm\\'" . default)
("\\.x?html?\\'" . default) ("\\.pdf\\'" . default)
("\\.xlsx\\'" . default) ("\\.docx\\'" . default))
 org-latex-format-drawer-function #[514 "\207" [] 3 "\n\n(fn _ CONTENTS)"]
 org-agenda-start-with-clockreport-mode t
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent
org-block-todo-from-checkboxes)
 org-link-parameters '(("eww" :follow org-eww-open :store
org-eww-store-link)
      ("rmail" :follow org-rmail-open :store org-rmail-store-link)
      ("mhe" :follow org-mhe-open :store org-mhe-store-link)
      ("irc" :follow org-irc-visit :store org-irc-store-link :export
org-irc-export)
      ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
      ("gnus" :follow org-gnus-open :store org-gnus-store-link)
      ("docview" :follow org-docview-open :export org-docview-export :store
org-docview-store-link)
      ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
      ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link
:store org-bbdb-store-link)
      ("w3m" :store org-w3m-store-link)
      ("doi" :follow org-link-doi-open :export org-link-doi-export)
      ("attachment" :follow org-attach-follow :complete
org-attach-complete-link)
      ("id" :follow org-id-open) ("file+sys") ("file+emacs")
      ("shell" :follow org-link--open-shell)
      ("news" :follow
#[514 "\301\300\302 Q \"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"])
      ("mailto" :follow
#[514 "\301\300\302 Q \"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL
ARG)"])
      ("https" :follow
#[514 "\301\300\302 Q \"\207" ["https" browse-url ":"] 6 "\n\n(fn URL
ARG)"])
      ("http" :follow
#[514 "\301\300\302 Q \"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"])
      ("ftp" :follow
#[514 "\301\300\302 Q \"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"])
      ("help" :follow org-link--open-help :store org-link--store-help)
      ("file" :complete org-link-complete-file) ("elisp" :follow
org-link--open-elisp))
 org-agenda-start-with-log-mode t
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-agenda-clockreport-parameter-plist '(:link t :maxlevel 4)
 )

-- 
=====
Ian Garmaise
Consultant
Phorix Solutions Group
ian.g@phorixsol.com
Toronto cell: 416.432.2251 (also on Whatsapp)

https://www.linkedin.com/in/igarmaise/

http://www.PhorixSol.com

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

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

* Re: incorrect indentation of new item inserted with capture template
  2021-12-06 17:48 incorrect indentation of new item inserted with capture template Ian Garmaise
@ 2022-10-29  4:50 ` Ihor Radchenko
  2022-10-29 12:24   ` Ian Garmaise
  0 siblings, 1 reply; 4+ messages in thread
From: Ihor Radchenko @ 2022-10-29  4:50 UTC (permalink / raw)
  To: Ian Garmaise; +Cc: emacs-orgmode

Ian Garmaise <ian.g@phorixsol.com> writes:

> I have had this problem for several months.
>
> I keep a daily journal.  Each morning I add a new entry in a journal file
> using a capture template.  The journal file is always loaded.
> On some occasions the indentation of the new entry is incorrect.
>
> Here's an example of incorrect indentation:
>
> *** 2021-12-05 Sunday
>
> - item 1
> - item 2
>
> * 2021-12-06 Monday
>
> What I usually do is undo the insertion and reissue the command.
> This always works.

Sorry for the late reply.
I am unable to reproduce the problem of the latest main.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

* Re: incorrect indentation of new item inserted with capture template
  2022-10-29  4:50 ` Ihor Radchenko
@ 2022-10-29 12:24   ` Ian Garmaise
  2022-10-29 13:05     ` Ihor Radchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Garmaise @ 2022-10-29 12:24 UTC (permalink / raw)
  To: Ihor Radchenko; +Cc: emacs-orgmode

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

Hi Ihor,

I figured out the problem.  Seems like date trees expect only list items
between date headlines.
I had been adding headlines between dates, and this seems to confuse the
insertion mechanism.  I now stick to list items and it works perfectly.
Might be a good idea to add something about this to the manual.

Thanks for following up.

Cheers,

Ian


On Sat, Oct 29, 2022 at 12:49 AM Ihor Radchenko <yantar92@posteo.net> wrote:

> Ian Garmaise <ian.g@phorixsol.com> writes:
>
> > I have had this problem for several months.
> >
> > I keep a daily journal.  Each morning I add a new entry in a journal file
> > using a capture template.  The journal file is always loaded.
> > On some occasions the indentation of the new entry is incorrect.
> >
> > Here's an example of incorrect indentation:
> >
> > *** 2021-12-05 Sunday
> >
> > - item 1
> > - item 2
> >
> > * 2021-12-06 Monday
> >
> > What I usually do is undo the insertion and reissue the command.
> > This always works.
>
> Sorry for the late reply.
> I am unable to reproduce the problem of the latest main.
>
> --
> Ihor Radchenko // yantar92,
> Org mode contributor,
> Learn more about Org mode at <https://orgmode.org/>.
> Support Org development at <https://liberapay.com/org-mode>,
> or support my work at <https://liberapay.com/yantar92>
>


-- 
=====
Ian Garmaise
Consultant
Phorix Solutions Group
ian.g@phorixsol.com
Toronto cell: 416.432.2251 (also on Whatsapp)

https://www.linkedin.com/in/igarmaise/

http://www.PhorixSol.com

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

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

* Re: incorrect indentation of new item inserted with capture template
  2022-10-29 12:24   ` Ian Garmaise
@ 2022-10-29 13:05     ` Ihor Radchenko
  0 siblings, 0 replies; 4+ messages in thread
From: Ihor Radchenko @ 2022-10-29 13:05 UTC (permalink / raw)
  To: Ian Garmaise; +Cc: emacs-orgmode

Ian Garmaise <ian.g@phorixsol.com> writes:

> I figured out the problem.  Seems like date trees expect only list items
> between date headlines.
> I had been adding headlines between dates, and this seems to confuse the
> insertion mechanism.  I now stick to list items and it works perfectly.
> Might be a good idea to add something about this to the manual.

If you post an example where org-datetree gets confused, we can improve
things on Org side.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


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

end of thread, other threads:[~2022-10-29 13:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06 17:48 incorrect indentation of new item inserted with capture template Ian Garmaise
2022-10-29  4:50 ` Ihor Radchenko
2022-10-29 12:24   ` Ian Garmaise
2022-10-29 13:05     ` Ihor Radchenko

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