From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel W Flint Subject: Re: How can I autorun M-x linum-mode when file is opened? Date: Sun, 10 Aug 2014 13:07:36 -0500 Message-ID: <87y4uwcj6f.fsf@turing.flintfam.org> References: <87iom0i983.fsf@skimble.plus.com> <87tx5kfcvx.fsf@skimble.plus.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGXX8-0002gV-2s for emacs-orgmode@gnu.org; Sun, 10 Aug 2014 14:07:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XGXX3-0006T0-A3 for emacs-orgmode@gnu.org; Sun, 10 Aug 2014 14:07:54 -0400 Received: from flintfam.org ([50.116.25.174]:40706 helo=mail.flintfam.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XGXX3-0006Sr-4v for emacs-orgmode@gnu.org; Sun, 10 Aug 2014 14:07:49 -0400 In-Reply-To: <87tx5kfcvx.fsf@skimble.plus.com> (Sharon Kimble's message of "Sun, 10 Aug 2014 18:55:14 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Sharon Kimble Cc: org-mode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 10 Aug 2014, Sharon Kimble wrote: [Edited for the sake of brevity] >>> How can I have a command auto-run when a file is opened from >>> 'desktop recovery' please? I want to auto-run "M-x linum-mode" when >>> I open my daily journal, which stays open all the time. Running that >>> command will switch off linum-mode for that file, which may stop >>> "file-rot" that I have observed in the past. This can, at present, >>> only be resolved by shutting down emacs for half an hour or so, and >>> then restarting it, and normal functionality will have been >>> restored. Have you considered using a hook? That is what they are for, and generally, I=E2=80=99ve found that linum mode in an org file can be annoyin= g, so in my init file I have =3D(add-hook =E2=80=98org-mode-hook #=E2=80=99(lambd= a () (linum-mode -1)))=3D, and, while I have Linum on globally, this disables it for all org mode files. Sam =2D-=20 Samuel W. Flint swflint@flintfam.org (402) 517-8468 sip: swflint@ekiga.net =2D--------------------------------------------------------------- http://flintfam.org/~swflint http://samflint.com 4096R/266596F4 (9477 D23E 389E 40C5 2F10 DE19 68E5 318E 2665 96F4) =2D--------------------------------------------------------------- Why is this email likely less than five sentences? http://five.sentenc.es --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJT57TpAAoJEGjlMY4mZZb0/HcP/2/g26zJCUzL9hmSkyB8yFmS xvsuRntVGbCbCNS3cpgwCXhWCM03GVZO6yuPaJMinzaozDX3ingOSYDN2U8tIFQp 1RChXxJ9For0rngv9iU3brLPJ9TpZe7nPd8a+1pzFuBOrHsP3kL0mc3VgM76zQcr 7iRKelb/EhghI9zT8OsFEzTh0jrNZeaiWDWYoXg5d5Lg5If7UirhxDvwum0/sbAr Fpm0wKf379Ed+exYZs7sevzUVBKd7RFH93xzv74cYXl4Wk1mkjnTwgdsqLL3t4zK vTTE82Swc1xG4Qx1WP5568upqmBamTk2hKbHXcdAuukAXnlg9QXSuelBnVjcmcrp P8vp1klRJKlFs7Eahj3JaP7/imape5YdcXnNKIiI1NiOhaP1cEbd9dSGSwOruXS2 H9yG5AN3DlPxCIDWK2Ps8VeR1khG1ZbYe5SMG+2i+HHTjBu1v/NBKxQMj3BKpG6Z B0b7Qi2v3mLbTq1kpSOPDh8A6wsQNyrupSvQVjyQshmcMVVUkzDxGf/3gzfzXPf6 CvxnRYHiR+O2UoSqpjS+2K2F0QlWxVf9UhFHvRvghOSvwvLzmav6Ts7b+VvrBrp4 IfYevOM1Q0zSHD8oCJQip6bphqCSOEkG1ZXO8Lg5+0iZbr+4g6xyRsOqPsOqXkTF fCDuNdp/GqZnyDkPJzmr =8Z95 -----END PGP SIGNATURE----- --=-=-=--