Discussion:
[O] (gnus-icalendar-org-setup) not evaluated in .emacs?
Eric S Fraga
2017-09-14 08:19:54 UTC
Permalink
Hi,
(require 'gnus-icalendar)
(gnus-icalendar-setup)
(gnus-icalendar-org-setup)
I have one setting alongside these:

(setq gnus-icalendar-org-capture-file "...path to my diary.org")

I wonder whether gnus needs this to be defined for it to show all the
buttons? Maybe check the value of this before and after?

I always see all the buttons (I think).
--
: Eric S Fraga via Emacs 26.0.50, Org release_9.1-57-gc6e563
Eric S Fraga
2017-09-14 09:29:16 UTC
Permalink
On Thursday, 14 Sep 2017 at 11:11, Loris Bennett wrote:

[...]
It obviously does work, in principle, for me too, as the re-eval shows.
However, it seems as if something later in my .emacs undoes some aspect
of whatever it is that the gnus-icalendar-org-setup does.
Well, may be time to bisect etc...?
--
: Eric S Fraga via Emacs 26.0.50, Org release_9.1-57-gc6e563
Matt Lundin
2017-09-15 18:00:19 UTC
Permalink
Rereading this, I decided to move the settings out from the Customize
(require 'gnus-icalendar)
(setq gnus-icalendar-org-capture-file "~/git/org.git/gtd.org")
(setq gnus-icalendar-org-capture-headline (quote ("Exchange")))
(gnus-icalendar-setup)
(gnus-icalendar-org-setup)
Now I get all the buttons first time round and didn't have to resort to
a flaky hack, so thanks, Eric.
But should this kind of ordering dependency happen? Or should my
Customize block just be at the beginning of my .emacs rather than at the
end?
I looked at the gnus-icalendar-code and this ordering dependency is
indeed hard-coded into gnus-icalendar-org-setup. From the code comments:

--8<---------------cut here---------------start------------->8---
;; to enable optional iCalendar->Org sync functionality
;; NOTE: both the capture file and the headline(s) inside must already exist
;; (setq gnus-icalendar-org-capture-file "~/org/notes.org")
;; (setq gnus-icalendar-org-capture-headline '("Calendar"))
;; (gnus-icalendar-org-setup)
--8<---------------cut here---------------end--------------->8---

Matt
Eric S Fraga
2017-09-19 09:05:56 UTC
Permalink
But should this kind of ordering dependency happen? Or should my
Customize block just be at the beginning of my .emacs rather than at the
end?
I make sure my customizations are loaded before anything else. I have
my customizations in a separate file and "(load custom-file)" as one of
the first things in my Emacs init. Not the first as such as I set the
load-path to point to the versions of packages I am using that may
conflict with built-in ones in Emacs.
--
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.10-729-gb792e2
Tim Cross
2017-09-19 22:11:19 UTC
Permalink
This post might be inappropriate. Click to display it.
Lars-Johan Liman
2017-09-20 13:49:30 UTC
Permalink
Post by Tim Cross
Having said that, having let my .emacs grow organically (think "rampant
weeds") for 30 years, maybe I should take the shears to it.
:-) :-) Hahaa! LOL! I was thinking exactly those words earlier this
morning, while trying to debug a complicated "cond" statement that tries
to figure out on which computer the Emacs is being starting, and which
windowing system is being used on it.

But I've stopped trying to maintain my PS:<LIMAN>EMACS.INIT. (Is anyone
else that old? :-) My TECO is getting rusty ... ;-)
Post by Tim Cross
Management of an emacs init file is a challenge for anyone who has been
using Emacs for a long time.
I have some files in CVS (yes, I'm that old ;-), but yes, Git is on my
mind too. Every new thing I archive I put in Git.

But, this looked interesting ...
Post by Tim Cross
3. I now use org to manage my init file. In fact, I have a few init
files. I have a bare bones minimal init file which I use when I need to
debug a specific feature/package or generate bug reports, I have an
experimental one where I play with new things and I have my stable
one. Using org, I can just 'tangle' a new init based on one of those
files whenever I need it. I started by just putting all my existing
setup into a block in an org file and exporting that as elisp. As time
permitted, I broke bits off into their own blocks with explanatory
comments/text so that I can remember why/what of the block.
Can you expand on how using Org for this is done? Examples?
Documentation?

Cheers,
/Liman
#-------------------------------------------------------------------------
# Lars-Johan Liman, M.Sc. ! E-mail: ***@cafax.se
# Cafax AB ! HTTP : //www.cafax.se/
# Computer Consultants, Sweden ! Voice : +46 8 - 564 702 30
#-------------------------------------------------------------------------
Thomas S. Dye
2017-09-20 19:34:20 UTC
Permalink
Aloha,
Post by Lars-Johan Liman
Post by Tim Cross
3. I now use org to manage my init file. In fact, I have a few init
files. I have a bare bones minimal init file which I use when I need to
debug a specific feature/package or generate bug reports, I have an
experimental one where I play with new things and I have my stable
one. Using org, I can just 'tangle' a new init based on one of those
files whenever I need it. I started by just putting all my existing
setup into a block in an org file and exporting that as elisp. As time
permitted, I broke bits off into their own blocks with explanatory
comments/text so that I can remember why/what of the block.
Can you expand on how using Org for this is done? Examples?
Documentation?
Cheers,
/Liman
#-------------------------------------------------------------------------
# Cafax AB ! HTTP : //www.cafax.se/
# Computer Consultants, Sweden ! Voice : +46 8 - 564 702 30
#-------------------------------------------------------------------------
An example from a few years ago is here:
https://github.com/eschulte/emacs24-starter-kit

hth,
Tom

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

Loading...