unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#21174: 24.5; please make message-do-fcc respect local settings of message-handler-fcc-function
@ 2015-08-01  8:07 David Bremner
  2017-01-26 20:33 ` Lars Ingebrigtsen
  2017-01-26 20:39 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 3+ messages in thread
From: David Bremner @ 2015-08-01  8:07 UTC (permalink / raw)
  To: 21174


I'm trying to wrap message-mail in a function that (effectively)
temporarily sets the value of message-fcc-handler-function. This isn't
as easy as let-binding the variable since message-do-fcc is invoked
after the call to message-mail returns. The obvious next thing to try is
setting the variable buffer-locally. This fails because message-do-fcc
creates a new buffer and copies the buffer content from the message-mode
buffer, but not any of the buffer-local variables.

In GNU Emacs 24.5.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2015-06-28 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11702000
System Description:	Debian GNU/Linux testing (stretch)

Configured using:
 `configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --build x86_64-linux-gnu --prefix=/usr --sharedstatedir=/var/lib
 --libexecdir=/usr/lib --localstatedir=/var/lib
 --infodir=/usr/share/info --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.5/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.5/site-lisp:/usr/share/emacs/site-lisp
 --with-x=yes --with-x-toolkit=lucid --with-toolkit-scroll-bars
 --without-gconf --without-gsettings 'CFLAGS=-g -O2
 -fstack-protector-strong -Wformat -Werror=format-security -Wall'
 CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-z,relro'






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

* bug#21174: 24.5; please make message-do-fcc respect local settings of message-handler-fcc-function
  2015-08-01  8:07 bug#21174: 24.5; please make message-do-fcc respect local settings of message-handler-fcc-function David Bremner
@ 2017-01-26 20:33 ` Lars Ingebrigtsen
  2017-01-26 20:39 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-26 20:33 UTC (permalink / raw)
  To: David Bremner; +Cc: 21174

David Bremner <david@tethera.net> writes:

> I'm trying to wrap message-mail in a function that (effectively)
> temporarily sets the value of message-fcc-handler-function. This isn't
> as easy as let-binding the variable since message-do-fcc is invoked
> after the call to message-mail returns. The obvious next thing to try is
> setting the variable buffer-locally. This fails because message-do-fcc
> creates a new buffer and copies the buffer content from the message-mode
> buffer, but not any of the buffer-local variables.

Hm...  perhaps it would make sense to copy over all buffer-local
variables to this temporary buffer?  Does Emacs have a function to copy
buffer-local variables from one buffer to another?

Or would there be hideous consequences?  I can see how copying over
buffer-local mode-specific variables might be...  challenging in some
cases...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#21174: 24.5; please make message-do-fcc respect local settings of message-handler-fcc-function
  2015-08-01  8:07 bug#21174: 24.5; please make message-do-fcc respect local settings of message-handler-fcc-function David Bremner
  2017-01-26 20:33 ` Lars Ingebrigtsen
@ 2017-01-26 20:39 ` Lars Ingebrigtsen
  1 sibling, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2017-01-26 20:39 UTC (permalink / raw)
  To: David Bremner; +Cc: 21174

Oh, there's `message-clone-locals' and it seems to do the right thing.

I've now added a call to `message-do-fcc' so this should now be fixed on
the master.  Tested extremely lightly, though.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no






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

end of thread, other threads:[~2017-01-26 20:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-01  8:07 bug#21174: 24.5; please make message-do-fcc respect local settings of message-handler-fcc-function David Bremner
2017-01-26 20:33 ` Lars Ingebrigtsen
2017-01-26 20:39 ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).