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:
245
245
* Adding heading via ` org_meta_return ` and ` org_insert_* ` mappings
246
246
* Adding a list item via ` org_meta_return `
247
247
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
+
248
253
### Agenda settings
249
254
250
255
#### ** org_deadline_warning_days**
Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ CONTENTS *orgmode-content
26
26
1.2.1.15. org_custom_exports..............|orgmode-org_custom_exports|
27
27
1.2.1.16. org_time_stamp_rounding_minutes.|orgmode-org_time_stamp_rounding_minutes|
28
28
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|
29
30
1.2.2. Agenda settings...........................|orgmode-agenda_settings|
30
31
1.2.2.1. org_deadline_warning_days.|orgmode-org_deadline_warning_days|
31
32
1.2.2.2. org_agenda_span.....................|orgmode-org_agenda_span|
@@ -430,6 +431,12 @@ Determine if blank line should be prepended when:
430
431
* Adding heading via `org_meta_return` and `org_insert_*` mappings
431
432
* Adding a list item via `org_meta_return`
432
433
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
+
433
440
AGENDA SETTINGS *orgmode-agenda_settings*
434
441
435
442
ORG_DEADLINE_WARNING_DAYS *orgmode-org_deadline_warning_days*
Original file line number Diff line number Diff line change @@ -152,4 +152,8 @@ return {
152
152
around_subtree_from_root = ' OR' ,
153
153
},
154
154
},
155
+ emacs_config = {
156
+ executable_path = ' emacs' ,
157
+ config_path = ' $HOME/.emacs.d/init.el' ,
158
+ },
155
159
}
Original file line number Diff line number Diff line change @@ -108,14 +108,18 @@ end
108
108
function Export .emacs (format , extension )
109
109
local file = vim .api .nvim_buf_get_name (0 )
110
110
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
112
114
return utils .echo_error (' emacs executable not found. Make sure emacs is in $PATH.' )
113
115
end
114
116
115
117
local cmd = {
116
- ' emacs' ,
118
+ emacs ,
117
119
' -nw' ,
118
120
' --batch' ,
121
+ ' --load' ,
122
+ emacs_config_path ,
119
123
string.format (' --visit=%s' , file ),
120
124
string.format (' --funcall=%s' , format ),
121
125
}
You can’t perform that action at this time.
0 commit comments