emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: It's not obvious how to keep LocalWords (spelling exceptions) conveniently [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)]
@ 2015-06-30 10:02 Reuben Thomas
  2015-06-30 13:35 ` Nicolas Goaziou
  0 siblings, 1 reply; 4+ messages in thread
From: Reuben Thomas @ 2015-06-30 10:02 UTC (permalink / raw)
  To: emacs-orgmode



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

I use flyspell/ispell, and add words to my org files’ LocalWords
stanzas. I keep these at the bottom of my document (as is typical for
other file types), but I don’t insist on that if there’s a better way.

The problem is that when I press Ctrl+Return near the bottom of the
buffer, just above the LocalWords stanza, point skips past the commented
LocalWords and makes a new entry underneath.

I searched to see if I could find a standard way to do this. I couldn’t:
I found an example document in worg which puts the LocalWords stanza
elsewhere in the document, with its own heading.

For now, I have added a heading just before the spelling list, and
tagged it :noexport:.

However, it would be good if this worked out of the box, i.e. if if
org-mode instrumented ispell suitably so that when LocalWords entries
are added, they are a) by default not included in the export, and b) by
default in their own suitable document node (I leave the language vague
on purpose: I’d imagine a top-level node, but maybe that’s not optimal.)

Emacs : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8) of
 2014-11-21 on skwd, modified by Debian Package: Org-mode version 8.2.10
 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)

current state:
==============
(setq
 org-export-backends '(ascii html icalendar latex odt)
 org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe
                      org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
 org-latex-classes '(("article" "\\documentclass[11pt]{article}" ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                      ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                     ("report" "\\documentclass[11pt]{report}" ("\\part{%s}" . "\\part*{%s}")
                      ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     ("book" "\\documentclass[11pt]{book}" ("\\part{%s}" . "\\part*{%s}")
                      ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
                     ("scrartcl" "\\documentclass{scrartcl}" ("\\section{%s}" . "\\section*{%s}")
                      ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                      ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                     )
 org-latex-default-packages-alist '(("postscript" "ucs" nil) ("" "pifont" nil) ("utf8x" "inputenc" t)
                                    ("T1" "fontenc" t) ("" "fixltx2e" nil) ("" "graphicx" t) ("" "longtable" nil)
                                    ("" "float" nil) ("" "wrapfig" nil) ("" "rotating" nil) ("normalem" "ulem" t)
                                    ("" "amsmath" t) ("" "textcomp" t) ("" "marvosym" t) ("" "wasysym" t)
                                    ("" "amssymb" t) ("" "hyperref" nil) "\\tolerance=1000" ("" "palatino" nil))
 org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-html-format-drawer-function '(lambda (name contents) contents)
 org-latex-format-inlinetask-function 'ignore
 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-export-with-section-numbers nil
 org-file-apps '((t . "xdg-open %s") (system . "xdg-open %s"))
 org-export-with-toc nil
 org-latex-format-headline-function 'org-latex-format-headline-default-function
 org-default-notes-file "~/Notes/Notes.org"
 org-startup-indented t
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-latex-format-drawer-function '(lambda (name contents) contents)
 org-odt-format-headline-function 'ignore
 org-from-is-user-regexp "\\<Reuben Thomas\\>"
 org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '((lambda nil (local-set-key "\351" (quote org-toggle-iimage-in-org))) window-margin-mode
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-show-block-all append local] 5]
                 #[nil "\300\301\302\303\304$\207"
                   [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5]
                 org-babel-result-hide-spec org-babel-hide-all-hashes turn-on-eldoc-mode)
 org-ascii-format-drawer-function '(lambda (name contents width) contents)
 org-odt-format-inlinetask-function 'ignore
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe)
 org-directory "~/Notes"
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks
                  org-cycle-show-empty-lines org-optimize-window-after-visibility-change)
 org-footnote-define-inline t
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-odt-format-drawer-function '(lambda (name contents) contents)
 org-latex-default-class "scrartcl"
 org-html-format-headline-function 'ignore
 org-footnote-auto-label nil
 org-html-format-inlinetask-function 'ignore
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 org-latex-inputenc-alist '(("utf8" . "utf8x"))
 )
-- 
http://rrt.sc3d.org/

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

* Re: Bug: It's not obvious how to keep LocalWords (spelling exceptions) conveniently [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)]
  2015-06-30 10:02 Bug: It's not obvious how to keep LocalWords (spelling exceptions) conveniently [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)] Reuben Thomas
@ 2015-06-30 13:35 ` Nicolas Goaziou
  2015-06-30 14:08   ` Daniele Pizzolli
  2015-06-30 16:57   ` Reuben Thomas
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Goaziou @ 2015-06-30 13:35 UTC (permalink / raw)
  To: Reuben Thomas; +Cc: emacs-orgmode

Hello,

Reuben Thomas <rrt@sc3d.org> writes:

Disclaimer: I don't know what are "LocalWords" and I could find
a reference either in the Emacs or Elisp manual.

> I use flyspell/ispell, and add words to my org files’ LocalWords
> stanzas. I keep these at the bottom of my document (as is typical for
> other file types), but I don’t insist on that if there’s a better way.

Put them at the beginning of the file, i.e., before the first headline,
and comment them.

> The problem is that when I press Ctrl+Return near the bottom of the
> buffer, just above the LocalWords stanza, point skips past the commented
> LocalWords and makes a new entry underneath.

See above.

> However, it would be good if this worked out of the box, i.e. if if
> org-mode instrumented ispell suitably so that when LocalWords entries
> are added, they are a) by default not included in the export,

It will not happen if you comment them.


Regards,

-- 
Nicolas Goaziou

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

* Re: Bug: It's not obvious how to keep LocalWords (spelling exceptions) conveniently [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)]
  2015-06-30 13:35 ` Nicolas Goaziou
@ 2015-06-30 14:08   ` Daniele Pizzolli
  2015-06-30 16:57   ` Reuben Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: Daniele Pizzolli @ 2015-06-30 14:08 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, Jun 30 2015, Nicolas Goaziou wrote:

> Hello,
>
> Reuben Thomas writes:
>
> Disclaimer: I don't know what are "LocalWords" and I could find
> a reference either in the Emacs or Elisp manual.

Hello,

In fact it is not so easy to find it!  There are too many way to search
in emacs and there is not an universal one (I guess).  If you have
reasonable defaults the following should work:

M-x apropos-value RET LocalWords

and should point to: ispell-words-keyword

Best,
Daniele

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

* Re: Bug: It's not obvious how to keep LocalWords (spelling exceptions) conveniently [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)]
  2015-06-30 13:35 ` Nicolas Goaziou
  2015-06-30 14:08   ` Daniele Pizzolli
@ 2015-06-30 16:57   ` Reuben Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: Reuben Thomas @ 2015-06-30 16:57 UTC (permalink / raw)
  To: Reuben Thomas, emacs-orgmode@gnu.org

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

On 30 June 2015 at 14:35, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:

> Hello,
>

​Hi, and thanks for your help with this.​


> Disclaimer: I don't know what are "LocalWords" and I could find
> a reference either in the Emacs or Elisp manual.
>

I'm sorry, I assumed it would be documented. By "LocalWords" it turns out
that I mean "the value of ispell-words-keyword".

Put them at the beginning of the file, i.e., before the first headline,
> and comment them.
>

​This is a distracting place to put them, and requires action on the part
of the user: ispell's non-configurable behaviour is to look for
ispell-words-keyword, and, if it doesn't find it, start adding words at the
end of the buffer. Hence it would be better if org-mode could work like
other modes.

The current behaviour, where org-insert-heading-respect-content skips not
only blank lines but also comments, does seem a bit odd in any case: I'd
expect the next heading to be inserted before any comments following point…


> > However, it would be good if this worked out of the box, i.e. if if
> > org-mode instrumented ispell suitably so that when LocalWords entries
> > are added, they are a) by default not included in the export,
>
> It will not happen if you comment them.
>

Sorry, I was mixing up the LocalWords entries, which are automatically
commented by ispell, and my heading. Ignore this!

-- 
http://rrt.sc3d.org

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

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

end of thread, other threads:[~2015-06-30 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-30 10:02 Bug: It's not obvious how to keep LocalWords (spelling exceptions) conveniently [8.2.10 (release_8.2.10 @ /usr/share/emacs/24.4/lisp/org/)] Reuben Thomas
2015-06-30 13:35 ` Nicolas Goaziou
2015-06-30 14:08   ` Daniele Pizzolli
2015-06-30 16:57   ` Reuben Thomas

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