unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Abbrev in message-mode
@ 2013-05-15 22:41 Emanuel Berg
  2013-05-16 12:56 ` Suvayu Ali
       [not found] ` <mailman.25908.1368709005.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Emanuel Berg @ 2013-05-15 22:41 UTC (permalink / raw)
  To: help-gnu-emacs

Works:

(define-abbrev-table 'emacs-lisp-mode-abbrev-table
  '(("xx" "XX")) )

But, with `compose-mail', I get to "message-mode". Here, the
"mail-abbrevs" table works. It affects the "To:" header, and is setup
in ~/.mailrc:

alias jtr "Jack The Ripper <jack@ripper.com>"

But, how do I get abbrevs to work in the the actual *message*?

With `list-abbrev', I found these, but neither work. (They might even
relate to the *Messages* buffer, or to some other messages, I don't
know.)

(define-abbrev-table 'message-abbrevs
  '(("oh" "oh1")) )
(define-abbrev-table 'message-abbrev-table
  '(("oh" "oh2")) )
(define-abbrev-table 'message-mode-abbrev-table
  '(("oh" "oh3")) )

Note: Setting the "global-abbrev-table" works: it affects the "To:"
header as well as the message body.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Abbrev in message-mode
  2013-05-15 22:41 Abbrev in message-mode Emanuel Berg
@ 2013-05-16 12:56 ` Suvayu Ali
       [not found] ` <mailman.25908.1368709005.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Suvayu Ali @ 2013-05-16 12:56 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, May 16, 2013 at 12:41:26AM +0200, Emanuel Berg wrote:
> 
> But, how do I get abbrevs to work in the the actual *message*?

Doesn't message-mode-abbrev-table work?

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Abbrev in message-mode
       [not found] ` <mailman.25908.1368709005.855.help-gnu-emacs@gnu.org>
@ 2013-05-16 13:46   ` Emanuel Berg
  2013-05-16 17:29     ` Suvayu Ali
       [not found]     ` <mailman.25933.1368725404.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Emanuel Berg @ 2013-05-16 13:46 UTC (permalink / raw)
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

>> But, how do I get abbrevs to work in the the actual *message*?
>
> Doesn't message-mode-abbrev-table work?

Here it doesn't. The abbrev table is setup, and abbrev mode is
enabled. I agree it is strange. Why don't you try it? Perhaps I messed
something up. But for all other modes, Abbrev works fine.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Abbrev in message-mode
  2013-05-16 13:46   ` Emanuel Berg
@ 2013-05-16 17:29     ` Suvayu Ali
  2013-05-16 20:06       ` Stefan Monnier
       [not found]     ` <mailman.25933.1368725404.855.help-gnu-emacs@gnu.org>
  1 sibling, 1 reply; 8+ messages in thread
From: Suvayu Ali @ 2013-05-16 17:29 UTC (permalink / raw)
  To: help-gnu-emacs

On Thu, May 16, 2013 at 03:46:49PM +0200, Emanuel Berg wrote:
> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> 
> >> But, how do I get abbrevs to work in the the actual *message*?
> >
> > Doesn't message-mode-abbrev-table work?
> 
> Here it doesn't. The abbrev table is setup, and abbrev mode is
> enabled. I agree it is strange. Why don't you try it? Perhaps I messed
> something up. But for all other modes, Abbrev works fine.

This is my setup:

  (define-abbrev-table 'message-mode-abbrev-table
  '(("kfactor" "k-factor" nil 0)
    ("hth" "Hope this helps" nil 0)
    ("HTH" "Hope this helps" nil 0)
    ("cheers" "Cheers" nil 0)
    )
  "Abbreviation table for `message-mode'. Inherits from
  `text-mode-abbrev-table' and `unicode-abbrev-table'."
  :parents (list text-mode-abbrev-table unicode-abbrev-table))

  (add-hook 'message-mode-hook
            (lambda ()
              ;; dynamic abbreviations for org-mode
              (setq local-abbrev-table message-mode-abbrev-table)))

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Abbrev in message-mode
  2013-05-16 17:29     ` Suvayu Ali
@ 2013-05-16 20:06       ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2013-05-16 20:06 UTC (permalink / raw)
  To: help-gnu-emacs

>   (add-hook 'message-mode-hook
>             (lambda ()
>               ;; dynamic abbreviations for org-mode
>               (setq local-abbrev-table message-mode-abbrev-table)))

This should not be needed.  Please M-x report-emacs-bug RET


        Stefan




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

* Re: Abbrev in message-mode
       [not found]     ` <mailman.25933.1368725404.855.help-gnu-emacs@gnu.org>
@ 2013-05-16 22:26       ` Emanuel Berg
  2013-05-17 11:12         ` Suvayu Ali
       [not found]         ` <mailman.25986.1368789137.855.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Emanuel Berg @ 2013-05-16 22:26 UTC (permalink / raw)
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

>   (add-hook 'message-mode-hook
>             (lambda ()
>               ;; dynamic abbreviations for org-mode
>               (setq local-abbrev-table message-mode-abbrev-table)))

Yes, with the above code it works for me as well.

I have reported the bug.

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

* Re: Abbrev in message-mode
  2013-05-16 22:26       ` Emanuel Berg
@ 2013-05-17 11:12         ` Suvayu Ali
       [not found]         ` <mailman.25986.1368789137.855.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Suvayu Ali @ 2013-05-17 11:12 UTC (permalink / raw)
  To: help-gnu-emacs

Hi Emanuel,

On Fri, May 17, 2013 at 12:26:18AM +0200, Emanuel Berg wrote:
> Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> 
> >   (add-hook 'message-mode-hook
> >             (lambda ()
> >               ;; dynamic abbreviations for org-mode
> >               (setq local-abbrev-table message-mode-abbrev-table)))
> 
> Yes, with the above code it works for me as well.
> 
> I have reported the bug.

Thanks a lot.  Could you also post the bug number so that I can follow
it?  Thanks again.

-- 
Suvayu

Open source is the future. It sets us free.



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

* Re: Abbrev in message-mode
       [not found]         ` <mailman.25986.1368789137.855.help-gnu-emacs@gnu.org>
@ 2013-05-17 19:31           ` Emanuel Berg
  0 siblings, 0 replies; 8+ messages in thread
From: Emanuel Berg @ 2013-05-17 19:31 UTC (permalink / raw)
  To: help-gnu-emacs

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> Thanks a lot.  Could you also post the bug number so that I can
> follow it?  Thanks again.

No problem! (? - just a couple of keystrokes, but OK...)

Bug number: 14413

-- 
Emanuel Berg - programmer (hire me! CV below)
computer projects: http://user.it.uu.se/~embe8573
internet activity: http://home.student.uu.se/embe8573


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

end of thread, other threads:[~2013-05-17 19:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15 22:41 Abbrev in message-mode Emanuel Berg
2013-05-16 12:56 ` Suvayu Ali
     [not found] ` <mailman.25908.1368709005.855.help-gnu-emacs@gnu.org>
2013-05-16 13:46   ` Emanuel Berg
2013-05-16 17:29     ` Suvayu Ali
2013-05-16 20:06       ` Stefan Monnier
     [not found]     ` <mailman.25933.1368725404.855.help-gnu-emacs@gnu.org>
2013-05-16 22:26       ` Emanuel Berg
2013-05-17 11:12         ` Suvayu Ali
     [not found]         ` <mailman.25986.1368789137.855.help-gnu-emacs@gnu.org>
2013-05-17 19:31           ` Emanuel Berg

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