File tree Expand file tree Collapse file tree 4 files changed +22
-2
lines changed
Expand file tree Collapse file tree 4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,11 @@ Determine if blank line should be prepended when:
245245* Adding heading via ` org_meta_return ` and ` org_insert_* ` mappings
246246* Adding a list item via ` org_meta_return `
247247
248+ #### ** emacs_config**
249+ * type* : ` table ` <br />
250+ * default value* : ` { executable_path = 'emacs', configure_path='$HOME/.emacs.d/init.el' } ` <br />
251+ Set configuration for your emacs. This is useful for having the emacs export properly pickup your emacs config and plugins.
252+
248253### Agenda settings
249254
250255#### ** org_deadline_warning_days**
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ CONTENTS *orgmode-content
2626 1.2.1.15. org_custom_exports..............|orgmode-org_custom_exports|
2727 1.2.1.16. org_time_stamp_rounding_minutes.|orgmode-org_time_stamp_rounding_minutes|
2828 1.2.1.17. org_blank_before_new_entry.|orgmode-org_blank_before_new_entry|
29+ 1.2.1.18. emacs_config..........................|orgmode-emacs_config|
2930 1.2.2. Agenda settings...........................|orgmode-agenda_settings|
3031 1.2.2.1. org_deadline_warning_days.|orgmode-org_deadline_warning_days|
3132 1.2.2.2. org_agenda_span.....................|orgmode-org_agenda_span|
@@ -430,6 +431,12 @@ Determine if blank line should be prepended when:
430431* Adding heading via `org_meta_return` and `org_insert_*` mappings
431432* Adding a list item via `org_meta_return`
432433
434+ EMACS_CONFIG *orgmode-emacs_config*
435+
436+ type: `table`
437+ default value: `{ executable_path = 'emacs', configure_path='$HOME/.emacs.d/init.el' }`
438+ Set configuration for your emacs. This is useful for having the emacs export properly pickup your emacs config and plugins.
439+
433440AGENDA SETTINGS *orgmode-agenda_settings*
434441
435442ORG_DEADLINE_WARNING_DAYS *orgmode-org_deadline_warning_days*
Original file line number Diff line number Diff line change @@ -152,4 +152,8 @@ return {
152152 around_subtree_from_root = ' OR' ,
153153 },
154154 },
155+ emacs_config = {
156+ executable_path = ' emacs' ,
157+ config_path = ' $HOME/.emacs.d/init.el' ,
158+ },
155159}
Original file line number Diff line number Diff line change @@ -108,14 +108,18 @@ end
108108function Export .emacs (format , extension )
109109 local file = vim .api .nvim_buf_get_name (0 )
110110 local target = vim .fn .fnamemodify (file , ' :p:r' ) .. ' .' .. extension
111- if vim .fn .executable (' emacs' ) ~= 1 then
111+ local emacs = config .emacs_config .executable_path
112+ local emacs_config_path = config .emacs_config .config_path
113+ if vim .fn .executable (emacs ) ~= 1 then
112114 return utils .echo_error (' emacs executable not found. Make sure emacs is in $PATH.' )
113115 end
114116
115117 local cmd = {
116- ' emacs' ,
118+ emacs ,
117119 ' -nw' ,
118120 ' --batch' ,
121+ ' --load' ,
122+ emacs_config_path ,
119123 string.format (' --visit=%s' , file ),
120124 string.format (' --funcall=%s' , format ),
121125 }
You can’t perform that action at this time.
0 commit comments