Read the odd startup option from org-mode files.

This commit is contained in:
Tom Alexander
2023-09-15 22:31:15 -04:00
parent 8450785186
commit a74ea730f4
3 changed files with 31 additions and 0 deletions

View File

@@ -22,6 +22,11 @@ pub struct GlobalSettings<'g, 's> {
///
/// Corresponds to the tab-width elisp variable.
pub tab_width: IndentationLevel,
/// Whether to only allow odd headline levels.
///
/// Corresponds to org-odd-levels-only elisp variable.
pub odd_levels_only: HeadlineLevelFilter,
}
impl<'g, 's> GlobalSettings<'g, 's> {
@@ -35,6 +40,7 @@ impl<'g, 's> GlobalSettings<'g, 's> {
complete_todo_keywords: BTreeSet::new(),
org_list_allow_alphabetical: false,
tab_width: 8,
odd_levels_only: HeadlineLevelFilter::OddEven,
}
}
}
@@ -44,3 +50,9 @@ impl<'g, 's> Default for GlobalSettings<'g, 's> {
GlobalSettings::new()
}
}
#[derive(Debug, Clone)]
pub enum HeadlineLevelFilter {
Odd,
OddEven,
}