From: Sharon Kimble <boudiccas@skimble.plus.com>
To: Samuel W Flint <swflint@flintfam.org>
Cc: org-mode <emacs-orgmode@gnu.org>
Subject: Re: How can I autorun M-x linum-mode when file is opened?
Date: Mon, 11 Aug 2014 10:40:59 +0100 [thread overview]
Message-ID: <87bnrre53o.fsf@skimble.plus.com> (raw)
In-Reply-To: <87y4uwcj6f.fsf@turing.flintfam.org> (Samuel W. Flint's message of "Sun, 10 Aug 2014 13:07:36 -0500")
[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]
Samuel W Flint <swflint@flintfam.org> writes:
> 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’ve found that linum mode in an org file can be annoying, so
> in my init file I have =(add-hook ‘org-mode-hook #’(lambda ()
> (linum-mode -1)))=, and, while I have Linum on globally, this disables
> it for all org mode files.
>
Thanks for this Sam, it is now working beautifully.
Sharon.
--
A taste of linux = http://www.sharons.org.uk
my git repo = https://bitbucket.org/boudiccas/dots
TGmeds = http://www.tgmeds.org.uk
Debian testing, fluxbox 1.3.5, emacs 24.3.92.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
prev parent reply other threads:[~2014-08-11 9:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-10 16:46 How can I autorun M-x linum-mode when file is opened? Sharon Kimble
2014-08-10 17:11 ` Thomas S. Dye
2014-08-10 17:55 ` Sharon Kimble
2014-08-10 18:07 ` Samuel W Flint
2014-08-11 7:12 ` Suvayu Ali
2014-08-11 9:40 ` Sharon Kimble [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bnrre53o.fsf@skimble.plus.com \
--to=boudiccas@skimble.plus.com \
--cc=emacs-orgmode@gnu.org \
--cc=swflint@flintfam.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).