mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
X.P.OrgMode: Simplify refile
This commit is contained in:
parent
1bcdbc9072
commit
6063855a3e
@ -333,17 +333,17 @@ mkOrgPrompt xpc oc@OrgMode{ todoHeader, orgFile, clpSupport } =
|
|||||||
-- | Let Emacs do the refiling, as this seems—and I know how this
|
-- | Let Emacs do the refiling, as this seems—and I know how this
|
||||||
-- sounds—more robust than trying to do it ad-hoc in this module.
|
-- sounds—more robust than trying to do it ad-hoc in this module.
|
||||||
refile :: String -> FilePath -> X ()
|
refile :: String -> FilePath -> X ()
|
||||||
refile parent fp =
|
refile (asString -> parent) (asString -> fp) =
|
||||||
proc $ inEmacs
|
proc $ inEmacs
|
||||||
>-> asBatch
|
>-> asBatch
|
||||||
>-> eval (progn [ findFile fp
|
>-> eval (progn [ "find-file" <> fp
|
||||||
, "end-of-buffer"
|
, "end-of-buffer"
|
||||||
, "org-refile nil nil"
|
, "org-refile nil nil"
|
||||||
<> list [ asString parent
|
<> list [ parent
|
||||||
, asString fp
|
, fp
|
||||||
, "nil"
|
, "nil"
|
||||||
, saveExcursion ["org-find-exact-headline-in-buffer"
|
, saveExcursion ["org-find-exact-headline-in-buffer"
|
||||||
<> asString parent]
|
<> parent]
|
||||||
]
|
]
|
||||||
, "save-buffer"
|
, "save-buffer"
|
||||||
])
|
])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user