[Orgmode] Re: text-mode-abbrev-table default?
On 2009-10-28 15:30 +, Carsten Dominik wrote: On 2009-10-28 09:19 +, Carsten Dominik wrote: Because if I do tis by default, someone if going to want to have a separate table :-) You solution is good - a nice snippet for a FAQ, maybe? It seems natural to `define-abbrev-table' org-mode-abbrev-table with text-mode-abbrev-table being its parent ;) Hmm, after reconsidering, I think you are right. How exactly would that look like? Should that be a top-level form in org.el? And should I then define org-mode with :abbrev-table org-mode-abbrev- table ? Just make me a patch, and I will apply it. I make the following patch using the org.el in Emacs (cvs 20090922). diff -u -L /Applications/Emacs.app/Contents/Resources/lisp/org/org.el.gz -L /var/folders/b2/b2DGafs+EpaLFYrOC7ZWRTQ/-Tmp-/buffer-content-58096yEn /var/folders/b2/b2DGafs\+EpaLFYrOC7ZWR\+\+\+\+TQ/-Tmp-/jka-com58096_Ot /var/folders/b2/b2DGafs\+EpaLFYrOC7ZWR\+\+\+\+TQ/-Tmp-/buffer-content-58096yEn --- /Applications/Emacs.app/Contents/Resources/lisp/org/org.el.gz +++ /var/folders/b2/b2DGafs+EpaLFYrOC7ZWRTQ/-Tmp-/buffer-content-58096yEn @@ -4054,6 +4054,8 @@ (org-indent-mode 1)) (org-set-startup-visibility))) +(abbrev-table-put org-mode-abbrev-table + :parents (list text-mode-abbrev-table)) (put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify) (defun org-current-time () Diff finished. Thu Oct 29 08:20:52 2009 Thanks. - Carsten Best wishes, Leo -- Emacs uptime: 36 days, 23 hours, 32 minutes, 4 seconds ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: text-mode-abbrev-table default?
Applied, thanks. - Carsten On Oct 29, 2009, at 9:24 AM, Leo wrote: On 2009-10-28 15:30 +, Carsten Dominik wrote: On 2009-10-28 09:19 +, Carsten Dominik wrote: Because if I do tis by default, someone if going to want to have a separate table :-) You solution is good - a nice snippet for a FAQ, maybe? It seems natural to `define-abbrev-table' org-mode-abbrev-table with text-mode-abbrev-table being its parent ;) Hmm, after reconsidering, I think you are right. How exactly would that look like? Should that be a top-level form in org.el? And should I then define org-mode with :abbrev-table org-mode-abbrev- table ? Just make me a patch, and I will apply it. I make the following patch using the org.el in Emacs (cvs 20090922). diff -u -L /Applications/Emacs.app/Contents/Resources/lisp/org/ org.el.gz -L /var/folders/b2/b2DGafs+EpaLFYrOC7ZWRTQ/-Tmp-/ buffer-content-58096yEn /var/folders/b2/b2DGafs\+EpaLFYrOC7ZWR\+\+\+\ +TQ/-Tmp-/jka-com58096_Ot /var/folders/b2/b2DGafs\+EpaLFYrOC7ZWR\+\+\ +\+TQ/-Tmp-/buffer-content-58096yEn --- /Applications/Emacs.app/Contents/Resources/lisp/org/org.el.gz +++ /var/folders/b2/b2DGafs+EpaLFYrOC7ZWRTQ/-Tmp-/buffer- content-58096yEn @@ -4054,6 +4054,8 @@ (org-indent-mode 1)) (org-set-startup-visibility))) +(abbrev-table-put org-mode-abbrev-table + :parents (list text-mode-abbrev-table)) (put 'org-mode 'flyspell-mode-predicate 'org-mode-flyspell-verify) (defun org-current-time () Diff finished. Thu Oct 29 08:20:52 2009 Thanks. - Carsten Best wishes, Leo -- Emacs uptime: 36 days, 23 hours, 32 minutes, 4 seconds - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: text-mode-abbrev-table default?
You are right, it is probably not necessary. - Carsten On Oct 29, 2009, at 6:04 PM, Leo wrote: On 2009-10-29 11:48 +, Carsten Dominik wrote: Applied, thanks. 4144 (eval-after-load abbrev 4145 '(when (fboundp 'abbrev-table-put) 4146 (abbrev-table-put org-mode-abbrev-table 4147:parents (list text-mode-abbrev-table Is eval-after-load abbrev necessary? abbrev is preloaded on Emacs both 22 and 23, and xemacs 21.4.21. Best, Leo - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: text-mode-abbrev-table default?
On 2009-10-28 09:19 +, Carsten Dominik wrote: Because if I do tis by default, someone if going to want to have a separate table :-) You solution is good - a nice snippet for a FAQ, maybe? It seems natural to `define-abbrev-table' org-mode-abbrev-table with text-mode-abbrev-table being its parent ;) Leo -- Emacs uptime: 36 days, 1 hour, 45 minutes, 0 seconds ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: text-mode-abbrev-table default?
On Oct 28, 2009, at 11:32 AM, Leo wrote: On 2009-10-28 09:19 +, Carsten Dominik wrote: Because if I do tis by default, someone if going to want to have a separate table :-) You solution is good - a nice snippet for a FAQ, maybe? It seems natural to `define-abbrev-table' org-mode-abbrev-table with text-mode-abbrev-table being its parent ;) Org-mode is defined using define-derived-mode, so maybe that should already do this? - Carsten Leo -- Emacs uptime: 36 days, 1 hour, 45 minutes, 0 seconds ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
[Orgmode] Re: text-mode-abbrev-table default?
On 2009-10-28 10:37 +, Carsten Dominik wrote: It seems natural to `define-abbrev-table' org-mode-abbrev-table with text-mode-abbrev-table being its parent ;) Org-mode is defined using define-derived-mode, so maybe that should already do this? - Carsten I tested it in GNU Emacs 23.1.50.1 (i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2009-09-22 and it seems abbrevs in text-mode is not inherited. Leo ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: text-mode-abbrev-table default?
On Oct 28, 2009, at 11:32 AM, Leo wrote: On 2009-10-28 09:19 +, Carsten Dominik wrote: Because if I do tis by default, someone if going to want to have a separate table :-) You solution is good - a nice snippet for a FAQ, maybe? It seems natural to `define-abbrev-table' org-mode-abbrev-table with text-mode-abbrev-table being its parent ;) Hmm, after reconsidering, I think you are right. How exactly would that look like? Should that be a top-level form in org.el? And should I then define org-mode with :abbrev-table org-mode-abbrev- table ? Just make me a patch, and I will apply it. Thanks. - Carsten ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode
Re: [Orgmode] Re: text-mode-abbrev-table default?
Carsten Dominik wrote: On Oct 28, 2009, at 11:32 AM, Leo wrote: On 2009-10-28 09:19 +, Carsten Dominik wrote: Because if I do tis by default, someone if going to want to have a separate table :-) You solution is good - a nice snippet for a FAQ, maybe? It seems natural to `define-abbrev-table' org-mode-abbrev-table with text-mode-abbrev-table being its parent ;) Hmm, after reconsidering, I think you are right. How exactly would that look like? Should that be a top-level form in org.el? And should I then define org-mode with :abbrev-table org-mode-abbrev-table ? Just make me a patch, and I will apply it. Thanks. - Carsten It would be great, if user could choose the appropriate abbrev-table via customize too. For example my text-mode-abbrev-table contains german abbrevs, while writing this text an (english-mode-abbrev-table) is present. It might be useful being able to keep several org-mode projects witch different language abbrev tables. Thanks, Grüße Andreas ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode