all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How can I autorun M-x linum-mode when file is opened?
@ 2014-08-10 16:46 Sharon Kimble
  2014-08-10 17:11 ` Thomas S. Dye
  0 siblings, 1 reply; 6+ messages in thread
From: Sharon Kimble @ 2014-08-10 16:46 UTC (permalink / raw)
  To: org-mode

[-- Attachment #1: Type: text/plain, Size: 680 bytes --]

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.

Thanks
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 --]

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

* Re: How can I autorun M-x linum-mode when file is opened?
  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
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2014-08-10 17:11 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: org-mode

Aloha Sharon,

Sharon Kimble <boudiccas@skimble.plus.com> writes:

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

Is this a question about Org mode?

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: How can I autorun M-x linum-mode when file is opened?
  2014-08-10 17:11 ` Thomas S. Dye
@ 2014-08-10 17:55   ` Sharon Kimble
  2014-08-10 18:07     ` Samuel W Flint
  0 siblings, 1 reply; 6+ messages in thread
From: Sharon Kimble @ 2014-08-10 17:55 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: org-mode

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

tsd@tsdye.com (Thomas S. Dye) writes:

> Aloha Sharon,
>
> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
>> 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.
>
> Is this a question about Org mode?
>
Yes, the journal is written in org-mode, and its one big file of daily
observations, and its a big problem for me.

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 --]

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

* Re: How can I autorun M-x linum-mode when file is opened?
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Samuel W Flint @ 2014-08-10 18:07 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: org-mode

[-- Attachment #1: Type: text/plain, Size: 1350 bytes --]

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.

Sam

-- 
Samuel W. Flint
swflint@flintfam.org                  (402) 517-8468      <XMPP>
sip: swflint@ekiga.net
----------------------------------------------------------------
http://flintfam.org/~swflint
http://samflint.com
4096R/266596F4
      (9477 D23E 389E 40C5 2F10  DE19 68E5 318E 2665 96F4)
----------------------------------------------------------------
Why is this email likely less than five sentences?
http://five.sentenc.es

[-- Attachment #2: Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: How can I autorun M-x linum-mode when file is opened?
  2014-08-10 18:07     ` Samuel W Flint
@ 2014-08-11  7:12       ` Suvayu Ali
  2014-08-11  9:40       ` Sharon Kimble
  1 sibling, 0 replies; 6+ messages in thread
From: Suvayu Ali @ 2014-08-11  7:12 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, Aug 10, 2014 at 01:07:36PM -0500, Samuel W Flint wrote:
> 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.

FWIW, if anyone is curious, the following post gives some insight into
why that might be.

<http://article.gmane.org/gmane.emacs.orgmode/70356/match=linum+mode+eli+display>

Cheers,

-- 
Suvayu

Open source is the future. It sets us free.

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

* Re: How can I autorun M-x linum-mode when file is opened?
  2014-08-10 18:07     ` Samuel W Flint
  2014-08-11  7:12       ` Suvayu Ali
@ 2014-08-11  9:40       ` Sharon Kimble
  1 sibling, 0 replies; 6+ messages in thread
From: Sharon Kimble @ 2014-08-11  9:40 UTC (permalink / raw)
  To: Samuel W Flint; +Cc: org-mode

[-- 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 --]

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

end of thread, other threads:[~2014-08-11  9:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.