~bzg/worg

ref: dea41fec71017fb96e1ba4e408cf900ed0c8bbf4 worg/org-faq.org -rw-r--r-- 167.2 KiB
dea41fecRussell Adams Updated expectations for non-subscriber posts to be delayed by moderation. 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
#+title:     Org-mode Frequently Asked Questions
#+author:    Worg people
#+language:  en
#+options:   toc:t H:2
#+setupfile: macros.setupfile
#+HTML_LINK_UP:    index.html
#+HTML_LINK_HOME:  https://orgmode.org/worg/

# This file is released by its authors and contributors under the GNU
# Free Documentation license v1.3 or later, code examples are released
# under the GNU General Public License v3 or later.

* Is my question already a Frequently Asked Questions?

You can find answers by asking on the mailing list, but people will
probably direct you here, so it is safer to start by checking this
FAQ.

* What is org-mode?
  :PROPERTIES:
  :CUSTOM_ID: What-is-org-mode
  :END:

** Can Org-mode do "x"? Does org have "x" feature?
   :PROPERTIES:
   :CUSTOM_ID: can-org-do-x
   :END:

In its default setup, Org-mode offers a simple outlining and task
management environment. But it also has a huge number of features and
settings "under the hood." Advanced users have configured Org-mode for
almost every conceivable use scenario.

Org-mode has a very active community and rich and extensive
documentation. Before emailing the mailing list to ask whether
Org-mode has a particular feature or setting, please consult the
following:

 - Read/search the manual.

   - https://orgmode.org/manual/index.html

     - Make sure to check out the following indexes:

       - [[https://orgmode.org/manual/Main-Index.html#Main-Index][Main Index]]
       - [[https://orgmode.org/manual/Key-Index.html#Key-Index][Key Index]]
       - [[https://orgmode.org/manual/Variable-Index.html#Variable-Index][Variable Index]]

   - The manual is also easily available from within Emacs.

     Choose your favorite way to access the manual in Info mode in
     Emacs.  You can

     - evaluate =(info "(org)")= within Emacs---i.e., type =C-x C-e=
       after the closing paren of the info expression above.

     - type =M-x info= and navigate to "Org Mode".

     - type =M-x org-info=.

     Search the manual using Info mode:

     - Type ~C-s term~ to search the entire manual.  Keep pressing
       ~C-s~ to cycle through the results.

     - Press ~i term RET~ to jump to a term stored in the Info index.
       Press ~,~ to cycle through the results.

     Access the manual about Info mode with =M-x info m info RET= for
     more.

 - Search the mailing list archives at [[http://lists.gnu.org/archive/html/emacs-orgmode/][lists.gnu.org]] or
   [[https://list.orgmode.org/][list.orgmode.org]].

   There is a good chance that the feature you are looking for has
   already been discussed (most likely several times).

 - Check for features from within emacs.

   - Emacs has a wonderful built-in help system.

   - You can browse (and change) most customization options by typing
     =M-x org-customize=.

   - You can check for a feature by typing =M-x apropos [RET] [word]= or
     =C-h a word=. This will search for all functions and variables
     matching the term (or regexp) you enter.

   - You can browse (and search for) org functions, variables, and
     faces by using =M-x describe-variable= (=C-h v=), =M-x
     describe-function= (=C-h f=), or =M-x describe-face=.

     After invoking one of these commands, simply type =org-[TAB]= to
     see a full list of relevant functions or variables or faces. You
     can then drill down further: e.g., =org-export-[TAB]= for export
     features.

 - Checkout the [[file:org-tutorials/index.org][tutorials on Worg]].

   Several of these tutorials discuss advanced features (e.g.,
   searching, custom agenda commands, tables, publishing) of Org-mode
   in depth.

   There are many other resources on Worg as well:

   - [[https://orgmode.org/worg/org-configs/index.html][Org Customization]] :: Includes a guide for beginners.

   - [[https://orgmode.org/worg/org-hacks.html][Org Hacks]] :: User-generated modifications and add-ons.

   - [[https://orgmode.org/worg/org-glossary.html][Org Glossary]] :: An explanation of basic Org-mode terms and
                     concepts.

** Can I implement a GTD workflow with Org-mode?
   :PROPERTIES:
   :CUSTOM_ID: GTD-workflow-with-Org-mode
   :END:

#+index: GTD!Workflow

   Yes, you can.  Check for discussions and pointers [[https://orgmode.org/worg/org-gtd-etc.html][here]].

** What is the difference between Org and TaskPaper?
   :PROPERTIES:
   :CUSTOM_ID: Org-and-TaskPaper
   :END:

#+index: TaskPaper

  There is really no difference.  Org is as /simple/ as [[http://hogbaysoftware.com/products/taskpaper][TaskPaper]].  It
  is just that, when using Org within Emacs, it lets you do many things
  that you wouldn't be able to do with TaskPaper.  Yes, TaskPaper is
  fiddle-proof and people using Emacs tends to like fiddling (which is
  orthogonal to the idea of using todo-lists efficiently), but this is
  just a matter of discipline and common sense, not one of Org's design.

  Read [[https://list.orgmode.org/0277B507-1486-4172-B1C6-1B73B84148DD@science.uva.nl][Carsten's enlightening statement]] on this.
** What is the meaning of the Unicorn on Org's website?
   :PROPERTIES:
   :CUSTOM_ID: unicorn
   :END:

#+index: Unicorn

The Unicorn is the logo of Org-mode because:

- Org-mode is the UNICs of ORgaNizers.

- Org-mode is an Emacs mode, so it makes sense to use an animal
  similar or related to the gnu used for GNU Emacs.

- Org-mode is meant to show you the way, and an animal with two horns
  can not do this very well, can it?

- Unicorn tears are said to reverse petrification, and wasn't this how
  we all felt before getting to some degree of time and task
  management?

- It will take forever to learn everything there is to know about a
  unicorn.

- A unicorn is a fabulous creature.  Org-mode wants to be a fabulous
  creation.

Using a unicorn was originally /Bastien Guerry's/ idea.  His friend,
the french artist [[http://intemperies.over-blog.com/][Christophe Bataillon]], designed the logo for us, and
/Greg Newman/ gave it a refresh some time later.  Bastien writes why
he chose a unicorn:

#+BEGIN_QUOTE
The first reason is not linked to the animal, but to the sounding of the
word "Unicorn" - because Org gives you a /uni/que way of producing files
in several format (HTML, LaTeX, etc.).

The second reason is that a Unicorn doesn't really exist, it is just
something you can dream about, and make others believe it does exist.
Just like the perfect organizer.
#+END_QUOTE

There was a [[https://list.orgmode.org/49A5BF02.1090400@rk-f.me][thread about unicorns]] on the mailing list.  [[https://list.orgmode.org/49A5BF02.1090400@rk-f.me][Christopher
Suckling]] posted a link showing how to make a simple foldable unicorn
(very appropriate for an outlining program!).

[[https://list.orgmode.org/18859.6342.338919.506488@nitrogen.rketburt][Tim Burt]] made a very complicated one which is now a treasured
possession of the Org-mode author.

- Official logo: [[https://orgmode.org/worg/images/orgmode/org-mode-unicorn.png][org-mode-unicorn.png]] This logo is available in a
  number of different formats including Photoshop /.psd/ and scaleable
  vector graphics /.svg/ [[https://orgmode.org/worg/images/orgmode/][here]].

- An [[https://orgmode.org/worg/images/orgmode/nrocinu4.jpg][alternative version]] from Christophe Bataillon (c):

- [[https://list.orgmode.org/B7CC380355F946DF8DCA0392A362CDB6@CUBE][Chris Randle]] made a [[https://orgmode.org/worg/images/orgmode/nrocinu.txt][text version]] using the logo and [[http://glassgiant.com][glassgiant.com]]:

- [[https://list.orgmode.org/43B268EF-3DDC-439F-B0DB-85B09974B037@nf.mpg.de][Stefan Vollmar]] made a [[https://orgmode.org/worg/images/orgmode/nrocinu.pdf][pdf version]] (here in [[https://orgmode.org/worg/images/orgmode/nrocinu_pdf.png][png]]) using "a simple
  threshold technique".

- [[https://list.orgmode.org/18859.6342.338919.506488@nitrogen.rketburt][Tim Burt]] made a folded Unicorn to match the spirit of Org - see the
  whole set of pictures [[http://www.flickr.com/photos/tcburt/sets/72157614543357071/][on his flickr page]].

- Are unicorns real?  Answer [[https://list.orgmode.org/87ljrru3vc.fsf@rosslaird.info][here]] by Ross Laird.

** Is Org's documentation written in Org?

As of January 2018, yes.  You can access the =.org= source of the manual
[[https://git.savannah.gnu.org/cgit/emacs/org-mode.git/tree/doc/org-manual.org][on the repository]].

Previously, Org mode documentation was written in TeXinfo, which is the
standard format for Emacs documentation. Today, the Org mode documentation is exported to TeXinfo with the ox-texinfo exporter written by Jonathan Leech-Pepin and Nicolas Goaziou.

** Is there a bibtex entry for the Org manual?

Yes.  Please evaluate this function and run =M-x
org-insert-manual-bibtex-citation-at-point RET=.

#+begin_src emacs-lisp
(defun org-insert-manual-bibtex-citation-at-point ()
  "Insert a BibTeX citation of the Org manual at point."
  (interactive)
  (insert
  "@book{dominik10:_org_mode_refer_manual,
  author =       {Carsten Dominik},
  title =        {The Org-Mode 7 Reference Manual: Organize
                  Your Life with GNU Emacs},
  publisher =    {Network Theory},
  year =         2010,
  address =      {UK},
  note =         {with contributions by David O'Toole, Bastien Guerry,
                  Philip Rooke, Dan Davison, Eric Schulte, and Thomas
                  Dye}
}"
  (message "Thanks for quoting the Org manual!")))
#+end_src

Please check [[file:org-papers.org][the Org papers page]] for more references related to Org.
* Mailing list
** I think my Org-mode is broken! How do I report a bug?
   :PROPERTIES:
   :CUSTOM_ID: bug-reporting
   :END:

#+index: Bug!Report

 1. Make sure you are running [[#updating-org][the latest version of Org-mode]].

 2. Read [[https://orgmode.org/manual/Feedback.html][the Feedback section]] of the manual.

 3. Provide a minimal example that duplicates the bug.

    - Create a minimal .emacs file and start emacs with that file as
      detailed in [[#minimal-emacs][these instructions]].

    - Create a sample, minimal .org file that reliably reproduces the
      problem and post it to the mailing list.

    - Some users call this an "[[#ecm][ECM]]", a French acronym that means a
      "minimal complete example".

** What is an "ECM"?
   :PROPERTIES:
   :CUSTOM_ID: ecm
   :END:

   #+index: ECM

   This is a French acronym used by some mailing list members; it
   stands for "Exemple Complet Minimal", or "Complete Minimal
   Example". The term refers to test files that can reliably reproduce
   a bug with the minimal amount of code. When you report a bug to the
   mailing list, you should provide a minimal .org file (with no more
   text than necessary) that demonstrates the bug. See [[https://list.orgmode.org/80oc3s13rg.fsf@somewhere.org][this post]] for
   more information.

** What should I do before contacting the mailing list?
   :PROPERTIES:
   :CUSTOM_ID: when-to-contact-mailing-list
   :END:

   The Org-mode mailing list is a high volume list, in which community
   members discuss use cases, configuration, bugs, and developments.

   If you are new to Org-mode, please read/search the excellent [[https://orgmode.org/manual/index.html][manual]]
   (and pay special attention to the indexes) before asking your
   question.

   You should also search the mailing list at [[http://lists.gnu.org/archive/html/emacs-orgmode/][lists.gnu.org]] or
   [[https://list.orgmode.org/][list.orgmode.org]] to see if your issue has already been discussed.

   See [[#can-org-do-x][this faq]] for more details.

** Why hasn't my email to the mailing list shown up yet?
   :PROPERTIES:
   :CUSTOM_ID: ml-post-delay
   :END:

   The org-mode mailing list is moderated. Thus, if you are not
   subscribed to the mailing list, your mail will only appear on the
   list after it has been approved by a moderator. To ensure that your
   mail appears quickly, please [[http://lists.gnu.org/mailman/listinfo/emacs-orgmode][subscribe to the list]].

** I read the mailing list through gmane. Should I subscribe?
   :PROPERTIES:
   :CUSTOM_ID: ml-subscription-and-gmane
   :END:

   #+index: Gmane

   The org-mode mailing list is available via nntp at
   =news.gmane.io/gmane.emacs.orgmode=.  Many participants in the list
   prefer to read the list in a newsreader, such as Gnus, instead of
   receiving emails.  If you choose to read the list via nntp, you can
   still [[http://lists.gnu.org/mailman/listinfo/emacs-orgmode][subscribe]] to the list and then opt not to receive any emails
   on the mailman settings page (see the "Mail Delivery" setting).

   This will ensure that your messages to the list get through
   quickly, reduce the work load of the mailing list moderators (who
   need to clear every mail from non-members), and provide more
   accurate information about the number of list readers.

* Keeping current
  :PROPERTIES:
  :CUSTOM_ID: Keeping-current
  :END:
** My Emacs ships with an older version Org-mode! How do I upgrade?
   :PROPERTIES:
   :CUSTOM_ID: updating-org
   :END:

#+index: Upgrade

Org-mode develops quickly, which means that versions of Org-mode
shipped with Emacs are often older than the last stable release.  If
you'd like to upgrade to the most recent version of org-mode, you have
a number of options.

 1. Install Org from GNU ELPA and the Emacs package manager as
    [[#installing-via-elpa][explained in this FAQ]].

 2. Clone and install the development git repository as [[#keeping-current-with-Org-mode-development][explained
    here]].  If you don't want to run the bleeding edge, you can still
    use git [[#using-stable-releases-only][to track the most recent stable releases]].

/Note/: Please also see [[#mixed-install][Is my Orgmode installation mixed?]] for a common
issue with mixed installations.

** How do I keep current with bleeding edge development?
   :PROPERTIES:
   :CUSTOM_ID: keeping-current-with-Org-mode-development
   :END:

#+index: Bleeding Edge

   Org-mode is developed in [[https://en.wikipedia.org/wiki/Git_(software)][Git]]. You can keep up-to-date with Org-mode
   developement by cloning the Org-mode repository and refreshing your
   copy with latest changes whenever you wish. You only need to use
   two Git commands (clone and pull.) Here are the steps in brief
   (assuming a POSIX compatible shell and please customize locations
   to suit your setup):

   1. Select a location to house the Org-mode repository (approx. 40
      MB; includes documentation, compiled elisp files and history
      going all the way back to v4.12a)

      : $ mkdir $HOME/elisp && cd $HOME/elisp

   2. Clone the Org-mode Git repository.

      Recommended approach:

      : $ git clone  git://git.savannah.gnu.org/emacs/org-mode.git

      (See [[file:worg-about.org::#contribute-to-worg][The first time you contribute to Worg]] for how to gain access).

   3. Compile and install Org-mode and build documentation.

      : $ cd $HOME/elisp/org-mode && make

      Please note that you can choose to /not/ compile at all and run
      using source =.el= files only (compiled files speed things up),
      but you will still need to generate the autoload files.

      : $ cd $HOME/elisp/org-mode && make uncompiled

      If you'd like to install org-mode someplace outside the source
      tree (private or system-wide), you should edit =local.mk= to
      point to the appropriate install location.  You may need
      administrator rights to do a system-wide installation.

      : $ cd $HOME/elisp/org-mode && make install

   4. This is where you configure Org-mode with Emacs.  Please refer
      to [[./org-tutorials/index.org][Org tutorials]].

   5. Keeping up-to-date.

      Cloning the repository is a one time activity.  From this point
      onwards you only need to /pull/ the latest changes, which the
      Makefile is set up to do automatically for certain make targets.

      : $ cd $HOME/elisp/org-mode && make update

      or if you immediately want to install as well

      : $ cd $HOME/elisp/org-mode && make update2

      Actually in this case it is recommended to run the test suite
      before installation so that you don't install a version that
      fails testing.

      : $ cd $HOME/elisp/org-mode && make up2

   6. You should reload Org-mode to have the changes take effect (if
      you are not restarting Emacs, which is recommended).  Also since
      the intention is to "keep up" with Org-mode, you should visit
      updated sections of documentation for latest updates (use =git
      log=.)

   7. As you use your repository over time it will accumulate loose objects.
      You can reduce the total size of your git repository with

      : $ git gc

      which will consolidate loose git objects into pack files.  This
      reduces the size of the repository and speeds up data access to
      the objects.

** How do I update the info manual pages to the latest org-mode version?
   :PROPERTIES:
   :CUSTOM_ID: update-info-manual-to-latest
   :END:

   *This is not a problem if org-mode is installed system-wide, which
   automatically takes care of this issue!* Since org-mode already
   ships with Emacs, a rather common problem among users is "How do I
   update the info documentation to the latest version of org-mode?".
   There are three ways to achieve this if for whatever reason you
   can't install into the standard, system-wide info directory:

   1. You can set the =INFOPATH= environment variable in your login
      script like this:

      #+begin_src shell-script :eval no
        # ~/.bash_profile
        export INFOPATH=/path/to/org-mode/info:$INFOPATH
        ...
      #+end_src

      =/path/to/org-mode/info= is wherever you install org-mode.

   2. You can achieve the same with elisp like this:

      #+begin_src emacs-lisp :eval no
        ;; Info directory
        (add-to-list 'Info-additional-directory-list
                     (expand-file-name "/path/to/org-mode/info"))
      #+end_src

   3. You should specify the same location in the Makefile while
      installing org-mode like this:

      #+begin_src makefile-gmake :eval no
        # Where local software is found
        prefix=/path/to/emacs-root
        ...
        # Where info files go.
        infodir = $(prefix)/share/info
      #+end_src

** How can I keep local changes and still track Org-mode development?
   :PROPERTIES:
   :CUSTOM_ID: keeping-local-changes-current-with-Org-mode-development
   :END:

  There is no need to do this anymore for the purpose of adapting the
  build system to the local environment, since this can now be
  specified in =local.mk=.  However, there may be a need to make other
  local changes to Org.

  Say you want to make minor changes to the =org.el= or any other
  version controlled file from Org and you want to keep these changes
  on top of the =main= branch from Org.  Create a local branch for
  your changes on top of origin/main as follows:

  : $ git checkout -b local origin/main
  : $ git config branch.local.rebase true
  : # Make your changes to the sources and create a new commit
  : $ git commit -am 'My local changes to Org'
  : # Update to a newer version
  : $ git pull

  Now each time you pull new commits from the distribution repository
  your local commits will be rewound and replayed on top of the new
  =origin/main=.  You would normally work on your =local= branch which
  includes your custom commits; there's no need to switch back to the
  =main= branch.

  If you get a conflict during a =git pull= (a change in Org and one
  of your local changes try to alter the same line of code) you will
  need to edit the file with the conflict to fix up the conflicting
  lines and then tell git that you have resolved the conflict:

  1. =git pull= fails with a conflict
  2. edit the file: look for the conflict markers =>>>>>>>= and
     =<<<<<<<= and either keep one version or create a new one and
     remove all conflict markers while doing this.
  3. =git add= the file to the index to mark the conflict resolved
  4. =git rebase --continue=
  5. lather, rinse, and repeat 2-4 as needed

  Note that it is possible to have silent conflicts when a change in
  Org and one of your local changes do not edit the same line of code,
  but are logically incompatible — for example Org might have changed
  to assume /roses are red/ while you've made a local change that
  defines /my roses are yellow/ in some other place.  Git will not
  warn you about such conflicts (it doesn't understand what the code
  _does_, of course).

  At anytime during the rebase conflict resolution you can say "oops
  this is all wrong - put it back the way it was before I did a pull"
  using
: $ git rebase --abort

** How can I use a stable release version instead of the bleeding edge main branch?
   :PROPERTIES:
   :CUSTOM_ID: using-stable-releases-only
   :END:

The =main= branch of the git repository always contains the bleeding
edge development code.  This is important for Org's fast development,
because code on =main= gets checked out by many people daily and we
quickly receive bug reports if something is wrong.  On rare occasions,
this code may not function perfectly for a limited time while we are
trying to fix things.  It is therefore recommended to keep a
known-good version of org-mode installed outside the source tree and
always run the full test suite before using a new version from =main=.

Not everyone like to use this bleeding-edge code and face the danger
to hit a surprising bug.  The branch =bugfix= is specifically for
collecting only fixes for known bugs between releases.  If you don't
want to wait for a new release, but don't want to live on the bleeding
edge, consider using =bugfix=.

From time to time, we make a release by merging all the new features
from =main= into =bugfix=.  This typically happens when the
maintainers feel that

1. they have reached a good point in the development
2. the code has a feature set that should stay and be supported in the
   future

Stable releases are used as the basis for [[https://orgmode.org/index.html#sec-3_3][alternative distributions]] of
Org, and they are also the code that gets merged into the Emacs
distribution. If you want to work only with stable releases, you can
always download [[https://orgmode.org/index.html#sec-3][them here]], but you can also also use the git
repository to keep automatically up-to-date with the most recent
stable releases (and save bandwidth!). Here's how to do so:

*** Run a specific stable release

In the repository, do

: $ git fetch --tags
: $ git tag

To see which release tags are available.  Let's say you decide to use
=release_7.01f=.

: $ git checkout release_7.01f

This set the working tree of the repository to the state of Org at the
moment of release 7.01f.  You can then run Org from the repository be
sure to use the stable release while development continues on the
=main= branch.

Later, when we release 7.02, you can switch to that using

: $ git fetch --tags                   # to get all the new stuff
: $ git tag
: $ git checkout release_7.02

*** Always run the most recent stable release

Alternatively, if you just want to always run whatever the latest
stable release is, you can do

: $ git checkout -b stable origin/bugfix

and then regularly update this branch by doing

: $ git pull

** How can I install an up-to-date version of org-mode without "make" tools?
   :PROPERTIES:
   :CUSTOM_ID: installing-org-without-make-tools
   :END:

If you are using org-mode on a computer that lacks developer tools for
compiling software, such as [[http://www.gnu.org/software/make/][GNU Make]], you will have to use a
*different* installation method than [[https://orgmode.org/manual/Installation.html#Installation][the one outlined in the manual]].
Please see this description for [[https://orgmode.org/worg/org-hacks.html#compiling-org-without-make][compiling org-mode without make]] so you
can install a recent version of org-mode without using the full build
system.

** I don't use git. Can I download bleeding edge .zip and .tar.gz archives?

   Yes.  You can install [[https://orgmode.org/org-latest.zip][org-latest.zip]] or [[https://orgmode.org/org-latest.tar.gz][org-latest.tar.gz]] of
   Org-mode -- these archives are updated every day at midnight.

** How do I install Org-mode through Emacs' Package Manager?
   :PROPERTIES:
   :CUSTOM_ID: installing-via-elpa
   :END:

   Releases of Org-mode are distributed as GNU ELPA package.

   Steps for installing Org with package manager:

   1) Do =M-x list-packages= to browse available packages.
   2) If the above command is unavailable you need to [[#installing-elpa][install the
      package manager]] before proceeding ahead.
   3) If you see =org= as an available package.
   4) Press =i= to mark the package for installation
   5) Press =x= to install
   6) Reload Emacs
   7) Use =M-x locate-library RET org=. If your installation is
      successful you would something like the following:

      =Library is file ~/.emacs.d/elpa/org-20110403/org.elc=

** How do I install Emacs package manager?
   :PROPERTIES:
   :CUSTOM_ID: installing-elpa
   :END:

   If you are running Emacs >=24 or find the command =M-x list-packages=
   available you already have the package manager installed.

   Steps for installing package manager on emacs-23:

   1. Download the package manager [[http://git.savannah.gnu.org/gitweb/?p=emacs.git;a=blob_plain;hb=ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09;f=lisp/emacs-lisp/package.el][package.el]]

   2. Add the following to your =.emacs= and reload Emacs.
      #+begin_src emacs-lisp
        ;; change "~/elisp/" as appropiate
        (setq load-path (cons "~/elisp" load-path))

        ;; Add the below lines *at the beginning* of your .emacs.
        (require 'package)
        (package-initialize)
      #+end_src
      
* Setup
  :PROPERTIES:
  :CUSTOM_ID: Setup
  :END:

#+index: Setup

** How can I quickly browse all Org options?

#+index: Options

=M-x org-customize RET=

See also [[file:org-tutorials/org-customize.org][Carsten's Org customize tutorial]] and [[file:org-configs/org-customization-guide.org][this customization guide]]
for details.

** Can I use the editing features of org-mode in other modes?
   :PROPERTIES:
   :CUSTOM_ID: use-editing-features-in-other-modes
   :END:

   Not really---but there are a few editing features you can use in
   other modes.

   - For tables there is =orgtbl-mode= which implements the table
     editor as a minor mode. (To enable, type =M-x orgtbl-mode=)
   - For ordered lists there is =orgstruct-mode= which allows for easy
     list editing as a minor mode. (To enable, type =M-x
     orgstruct-mode=)

   You can activate these modes automatically by using hooks:

   : (add-hook 'mail-mode-hook 'turn-on-orgtbl)
   : (add-hook 'mail-mode-hook 'turn-on-orgstruct)

   For footnotes, there is the function =org-footnote-action=, which
   works in non-org buffers. This function is a powerful tool for
   creating and sorting footnotes. To use it globally, you can add the
   following keybinding to your =.emacs= file (requires Org 6.17 or
   greater):

   : (global-set-key (kbd "C-c f") 'org-footnote-action)

   For other features you need to switch to Org-mode temporarily, or
   prepare text in a different buffer.

** Why isn't feature "X" working the way it is described in the manual?
   :PROPERTIES:
   :CUSTOM_ID: making-sure-org-mode-is-up-to-date
   :END:

Org-mode develops very quickly. If you are using a version of Org-mode
that shipped with emacs, there is a good chance that it is somewhat
out of date.

Many of the users on the Org-mode mailing list are using either a
recent release of Org-mode or the
[[https://orgmode.org/index.html#sec-3.2][development version of
org-mode from the git repository]].

If some settings and features aren't working the way you expect, make
sure that the version of the manual you are consulting matches the
version of Org-mode you are using.

   - You can check which version of Org-mode you are using by
     selection =Org --> Documentation --> Show Version= in the Emacs
     menu.

   - The [[https://orgmode.org/manual/index.html][online manual]] at [[https://orgmode.org][orgmode.org]] corresponds to the most recent
     release.

   - The [[http://www.gnu.org/software/emacs/manual/html_node/org/index.html][manual]] at [[http://www.gnu.org][www.gnu.org]] corresponds to the version of Org-mode
     released with the latest official Gnu Emacs release. Compared
     with the manual at the orgmode.org, the manual at www.gnu.org is
     somewhat out of date.

For instructions on how to stay current with Org-mode, consult [[#keeping-current-with-Org-mode-development][this
FAQ]] or follow the instructions on [[https://orgmode.org][the official Org-mode site]].

** Can I get the visibility-cycling features in emacs-lisp-mode?

Yes.  This snippet in your =.emacs= will bind =C-M-]= and =M-]= to global
and local cycling:

#+BEGIN_SRC emacs-lisp
(global-set-key (kbd "C-M-]") (lambda () (interactive) (org-cycle t)))
(global-set-key (kbd "M-]") (lambda ()
                              (interactive)
                              (ignore-errors
				(end-of-defun)
				(beginning-of-defun))
                              (org-cycle)))
#+END_SRC

** Can I get the visibility-cycling features in outline-mode and outline-minor-mode?
   :PROPERTIES:
   :CUSTOM_ID: use-visibility-cycling-in-outline-mode
   :END:

#+index: Visibility!Cycling

   Yes, these functions are written in a way that they are independent of
   the outline setup.  The following setup provides standard Org-mode
   functionality in outline-mode on =TAB= and =S-TAB=.  For
   outline-minor-mode, we use =C-TAB= instead of =TAB=,
   because =TAB= usually has mode-specific tasks.

#+BEGIN_SRC emacs-lisp
(add-hook 'outline-minor-mode-hook
  (lambda ()
    (define-key outline-minor-mode-map [(control tab)] 'org-cycle)
    (define-key outline-minor-mode-map [(shift tab)] 'org-global-cycle)))
(add-hook 'outline-mode-hook
  (lambda ()
    (define-key outline-mode-map [(tab)] 'org-cycle)
    (define-key outline-mode-map [(shift tab)] 'org-global-cycle)))
#+END_SRC

Or check out /outline-magic.el/, which does this and also provides
promotion and demotion functionality.  /outline-magic.el/ is
available at [[http://www.astro.uva.nl/~dominik/Tools/outline-magic.el][Outline Magic]].

** Can I save and restore the visibility state of an org-mode buffer?
   :PROPERTIES:
   :CUSTOM_ID: saving-visibility-state
   :END:

#+index: Visibility!Restore

Well, no---at least not automatically. You can, however, control the
visibility of an org-file or of individual trees by adding
instructions to your org file. See [[https://orgmode.org/manual/Visibility-cycling.html#Visibility-cycling][this section of the manual]] for more
information.

** How can I keep track of changes in my Org files?
   :PROPERTIES:
   :CUSTOM_ID: track-of-changes-in-Org-files
   :END:

  Use git to track the history of the files, use a cronjob to check in
  changes regularly.  Such a setup is described by Bernt Hansen in
  [[https://list.orgmode.org/87tzilzgkv.fsf@gollum.intra.norang.ca][this message]].

** Can I use Org-mode as the default mode for all README files?
   :PROPERTIES:
   :CUSTOM_ID: Org-mode-as-default-mode
   :END:

#+index: default-major-mode

Add the following to your .emacs file:

: (add-to-list 'auto-mode-alist '("README$" . org-mode))

You can even make it the default mode for any files with unspecified
mode using

: (setq default-major-mode 'org-mode)

** Can I use ido.el for completing stuff in Org?
   :PROPERTIES:
   :CUSTOM_ID: ido-complete
   :END:

#+index: Ido

   Yes, you can.  If you are an ido user and ido-mode is active, the
   following setting will make Org use =ido-completing-read= for most
   of its completing prompts.

: (setq org-completion-use-ido t)

** Should I use one big org file or multiple files?
   :PROPERTIES:
   :CUSTOM_ID: how-to-organize-org-mode-files
   :END:

Org-mode is flexible enough to accomodate a variety of organizational and
time management schemes.  Org's [[https://orgmode.org/manual/Document-structure.html#Document-structure][outline cycling and convenient editing and
navigation commands]] make it possible to maintain all of your projects and
notes in a single file.  But org-mode's [[https://orgmode.org/manual/Hyperlinks.html#Hyperlinks][quick and easy hyperlinks]], along
with [[https://orgmode.org/manual/Refile-and-copy.html#Refile-and-copy][easy refiling of notes and todos]], also make it a delight to maintain a
private "wiki" consisting of multiple files.

No matter how you organize your org files, org-mode's agenda commands
make it easy to search all your notes and gather together crucial data
in a single view.

Moreover, several org-mode settings can be configured either globally in
your =.emacs= file or locally (per file or per outline tree).  See the
[[https://orgmode.org/manual/index.html#Top][manual]] for more details.  For an example of local customizations see [[#limit-agenda-with-category-match][this
FAQ]].

Here are a few ideas for organizing org-mode files:

- A single file for all your projects and notes.
- One file per project.
- One file per client.
- One file per area of responsibility or type of work (e.g.,
  household, health, work, etc.).
- One file for projects, one for appointments, one for reference
  material, one for someday/maybe items, etc.
- A wiki of hyperlinked files that grows and adapts to meet your
  needs.

For more ideas, see some of the links on the [[file:org-tutorials/index.org][org-tutorial index]] or
[[file:org-gtd-etc.org][this page on org-mode and GTD]].

** Why doesn't C-c a call the agenda? Why don't some org keybindings work?
   :PROPERTIES:
   :CUSTOM_ID: setting-global-keybindings
   :END:

Org-mode has a few global keybindings that the user must set explicitly in
an =.emacs= file.  These keybindings include the customary shortcut for
calling the agenda (=C-c a=).  If nothing happens when you type =C-c a=,
then make sure that the following lines are in your =.emacs= file:

#+BEGIN_SRC emacs-lisp
  ;; The following lines are always needed.  Choose your own keys.
  (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
  (global-set-key "\C-cl" 'org-store-link)
  (global-set-key "\C-ca" 'org-agenda)
  (global-set-key "\C-cb" 'org-iswitchb)
#+END_SRC

You may, of course, choose whatever keybindings work best for you
and do not conflict with other modes.

Please see [[https://orgmode.org/manual/Activation.html][this section of the manual]] if you have additional
questions.

** Why aren't some of the variables I've customized having an effect?
   :PROPERTIES:
   :CUSTOM_ID: load-org-after-setting-variables
   :END:

Some org variables have to be set before org.el is loaded or else they
will not work. (An example is the new variable
=org-enforce-todo-dependencies=.)

You should also make sure that you do not require any other =org-...=
files in your =.emacs= file before you have set your org variables,
since these will also cause org.el to be loaded. To be safe, load org
files *after* you have set your variables.

** How can I make sure that timestamps appear in English?
   :PROPERTIES:
   :CUSTOM_ID: timestamps-and-system-time-locale
   :END:

If your system's locale is not set to English, but you would like the
timestamps in your org-mode files to appear in English, you can set
the following variable:

#+begin_src emacs-lisp
  (setq system-time-locale "C")
#+end_src

** What does a minimal .emacs look like?
   :PROPERTIES:
   :CUSTOM_ID: minimal-emacs
   :END:

Using a stripped down minimal .emacs files removes broken custom
settings as the cause of an issue and makes it easy to reproduce for
other people.  The example below has system-specific paths that you'll
need to change for your own use.

#+begin_src emacs-lisp
  (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
  (add-to-list 'auto-mode-alist '("\\.\\(org\\  |org_archive\\|txt\\)$" . org-mode))
  (setq org-agenda-files '("/tmp/test.org"))
  (require 'org)
  (require 'org-habit)

  (global-set-key "\C-cl" 'org-store-link)
  (global-set-key "\C-ca" 'org-agenda)
  (global-set-key "\C-cb" 'org-iswitchb)
#+end_src

You can save the minimal .emacs file to ~/minimal.emacs, add suspect
configuration code to it, then start emacs something like this:

#+begin_src sh
emacs -Q -l ~/minimal.emacs
#+end_src

On OS X, starting emacs with minimal configuration might look
something like this:

#+begin_src sh
/Applications/emacs.app/Contents/MacOS/Emacs -Q -l ~/minimal.emacs
#+end_src

** What is the best setup for indenting?
   :PROPERTIES:
   :CUSTOM_ID: indentation
   :END:

Indentation, both appearance and behavior, is a matter of personal
preferences.  You may try if the following adjustments suits better
for you than the defaults.  Set ~org-adapt-indentation~ to have
content aligned to headline titles.  Disable ~electric-indent-mode~ to
avoid automatic indentation in response to =RET= key.

In more details, ~org-adapt-indentation~ controls indentation with
regards to previous element.  Apparent effect is increased indentation
for content of deeper nested headings.  The variable accepts three
values: =nil= (no special indentation), =t= (always indent relatively
to the element above) and =headline-data= (only indent the
~PROPERTIES/LOGBOOK~ drawers relatively to the current level).  Value
=t= is suitable for short entries especially if you plan to share your
documents with someone who does not use Emacs.  If you just want to
make heading level more prominent then consider adding visual left
margin using =#+STARTUP: indent= as described in the [[https://orgmode.org/manual/Clean-View.html#Clean-View][Clean View]]
section of the manual.  The option works without adding extra spaces
to the document text.

Configured indentation may be applied in response to =RET= or to
=C-j= depending on the state of ~electric-indent-mode~.  The following
tables summarizes the difference.  Version number is added to column
header if it describes default settings.

With ~electric-indent-mode~ enabled:

| org-adapt-indentation =>  | nil (Org >= 9.5)       | t (Org 9.4)                | headline-data              |
|---------------------------+------------------------+----------------------------+----------------------------|
| RET after a headline      | Do not indent          | Indent                     | Do not indent              |
| C-j after a headline      | Do not indent          | Do not indent              | Do not indent              |
| RET elsewhere             | Indent wrt previous    | Indent wrt previous        | Indent wrt previous        |
| C-j elsewhere             | Do not indent wrt prev | Do not indent wrt previous | Do not indent wrt previous |
| Insert PROPERTIES/LOGBOOK | Do not indent          | Indent wrt headline        | Indent wrt headline        |

With ~electric-indent-mode~ disabled:

| org-adapt-indentation =>  | nil                 | t                          | headline-data (Org < 9.4)  |
|---------------------------+---------------------+----------------------------+----------------------------|
| RET after a headline      | Do not indent       | Do not indent              | Do not indent              |
| C-j after a headline      | Do not indent       | Indent                     | Do not indent              |
| RET elsewhere             | Do not indent       | Do not indent wrt previous | Do not indent wrt previous |
| C-j elsewhere             | Indent wrt previous | Indent wrt previous        | Indent wrt previous        |
| Insert PROPERTIES/LOGBOOK | Do not indent       | Indent wrt headline        | Indent wrt headline        |

Do not try to avoid or to ignore indentation of heading body or
properties drawer determined by current state of
~org-adapt-indentation~ and ~electric-indent-mode~ by pressing =C-j=
instead of =RET= (or vice versa). The result is transient and you will
lose formatting when you refile heading or change its level (promote
or demote it).

You may have noticed recommendation to disable ~electric-indent-mode~
to restore behavior prior to Org 9.4.  In Org 9.5
~org-adapt-indentation~ default value changed to =nil= and, more
importantly, a number of bugs related to indentation were fixed.
Using =RET= with enabled ~electric-indent-mode~ should be convenient
now.  Just customize ~org-adapt-indentation~ variable accordingly to
you preferences.

** Can I migrate from Planner?

   Yes.  This [[http://www.c0t0d0s0.de/plan2org/plan2org.pl][perl script]] or [[http://gitorious.org/bkuhn-small-hacks/org-mode/blobs/master/planner2org.plx
][this Perl script]] can help.

* Errors and general problems
  :PROPERTIES:
  :CUSTOM_ID: Errors
  :END:
** Is my Orgmode installation mixed?
   :PROPERTIES:
   :CUSTOM_ID: mixed-install
   :END:
   Emacs is distributed with a version of Orgmode bundled with it.  A
   common problem among users who install a [[#updating-org][newer version]] of Orgmode
   separately is a mixed install where Emacs loads some files from the
   bundled and the rest from the latest version.  This can lead to
   /unending/ troubles in the future.  With a recent installation of
   Org mode =M-x org-version= will indicate if the installation is mixed.

   With somewhat older Org mode installations, the procedure is more
   involved and indeterminate. An easy first step is to look
   at the output of =M-x org-version=.
   - Good :: ~Org-mode version 7.8.11 (release_7.8.11-448-g1737d3 @
             /path/to/org-mode/lisp/)~
   - Bad :: ~Org-mode version 6.33x (release_7.8.11.409.ga3778)~

   A second step is to go through the output of =list-load-path-shadows=
   line-by-line to get hints to what in your configuration is causing
   the issue.  Among the most common reasons is Orgmode gets loaded
   before the =load-path= variable is updated to include the
   installation directory of the latest Orgmode.  To avoid issues like
   this, it is recommended that the load path is updated very early on
   in your init file.

   /Note:/ The formatting of the version information, as shown in the
   examples above, will be different for older Org mode releases,
   e.g. ~Org-mode version 7.8.02~.

** Opening Org files in Emacs leads to a crash
   :PROPERTIES:
   :CUSTOM_ID: Emacs-crashes-with-org-indent-mode
   :END:
   The only known case where Org-mode can crash Emacs is when you are
   using =org-indent-mode= with Emacs 23.1 (in fact, any version of
   Emacs before version 23.1.50.3).  Upgrade to Emacs 23.2 and the
   problem should go away.

** When I try to use Org-mode, I always get the error message =(wrong-type-argument keymapp nil)=
   :PROPERTIES:
   :CUSTOM_ID: wrong-type-argument-keymapp
   :END:

   This is a conflict with an outdated version of the /allout.el/, see
   the [[https://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section in the manual

** How can I control the application launched by Org-mode to open a certain file type like pdf, html...?
   :PROPERTIES:
   :CUSTOM_ID: external-application-launched-to-open-file-link
   :END:

If you want special control about how Org-mode opens files, see the
variables =org-file-apps=, =org-file-apps-defaults-gnu=,
=org-file-apps-defaults-macosx=, =org-file-apps-defaults-windowsnt=.

*However*, normally it is best to just use the mechanism the
operating-system provides:

*** GNU/Linux systems
    You you have to check your mailcap settings, find the files:

    : /etc/mailcap
    :
    : or
    :
    : $HOME/.mailcap

and modify them accordingly. Please read their manual entry.

*** Windows systems
    + for html pages you may configure the =browse-url-= variables through
      the Customize interface,
    + the pdf files are automatically opened with Acrobat Reader (if it is
      installed)

*** Mac OSX
    Change the application responsible for this file type by selecting
    such a file in the Finder, select =File->Get Info= from the menu
    and select the application to open this file with.  Then, to
    propagate the change to all files with the same extension, select
    the =Change all= button.

** Org-mode takes over the TAB key.  I also want to use YASnippet, is there a way to fix this conflict?
   :PROPERTIES:
   :CUSTOM_ID: YASnippet
   :END:

[[http://code.google.com/p/yasnippet/][yasnippet]] is yet another snippet expansion system for Emacs.  It is
inspired by TextMate's templating syntax.
- watch the [[http://www.youtube.com/watch?v=vOj7btx3ATg][video on YouTube]]
- see the [[http://yasnippet.googlecode.com/svn/trunk/doc/index.html][intro and tutorial]]

*Note*: yasnippet is not compatible with =org-indent-mode= currently
there is no known way to use both successfully with =yas/trigger-key=
set to =TAB= (or =[tab]= etc...)

The way Org-mode binds the =TAB= key (binding to =[tab]= instead of
=\t=) overrules yasnippets' access to this key.  The following code
fixes this problem:

#+begin_src emacs-lisp
(add-hook 'org-mode-hook
	  (lambda ()
	    (org-set-local 'yas/trigger-key [tab])
	    (define-key yas/keymap [tab] 'yas/next-field-group)))
#+end_src

If the above code doesn't work (which it may not with later versions
of yasnippet).  Then try the following

#+begin_src emacs-lisp
  (defun yas/org-very-safe-expand ()
    (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))

  (add-hook 'org-mode-hook
            (lambda ()
              ;; yasnippet (using the new org-cycle hooks)
              (make-variable-buffer-local 'yas/trigger-key)
              (setq yas/trigger-key [tab])
              (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
              (define-key yas/keymap [tab] 'yas/next-field)))
#+end_src

Rick Moynihan maintains a [[http://github.com/RickMoynihan/yasnippet-org-mode][git repository]] (or [[http://github.com/eschulte/yasnippet-org-mode][Eric's fork of the same]])
with YASnippets for Org-mode.

** Org-mode takes over the S-cursor keys.  I also want to use CUA-mode, is there a way to fix this conflict?
   :PROPERTIES:
   :CUSTOM_ID: CUA-mode
   :END:

Yes, see the  [[https://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual.

** Org-mode takes over the S-cursor keys.  I also want to use windmove.el, is there a way to fix this conflict?
   :PROPERTIES:
   :CUSTOM_ID: windmove.el
   :END:

Yes, see the [[https://orgmode.org/manual/Conflicts.html#Conflicts][Conflicts]] section of the manual.

** Org behaves strangely: some keys don't work, some features are missing, my settings have no effect, ...
   :PROPERTIES:
   :CUSTOM_ID: loaded-old-org
   :END:

When this sort of things happen, it probably is because Emacs is
loading an old version of Org-mode instead of the one you expected.
Check it with =M-x org-version=.

This happens because Emacs loads first the system org-mode (the one
included with Emacs) before the one in your directory. Check the
=load-path= variable; you might see that your org-mode appears /after/
the system-wide path; this is bad.

You should add your directories to the =load-path= at the beginning:

:  (add-to-list 'load-path "~/.emacs.d/org-mode/lisp")

Function =add-to-list= adds at the beginning. Don't use =append= because
it appends at the end.

This wrong version loading may also happen if you have a byte-compiled
=org.elc= from an old version together with a new =org.el=. Since
Emacs prefers loading byte-compiled files (even if the =.el= is
newer), it will load the old Org-mode.

** Why doesn't org-batch-agenda work under Win32?
   :PROPERTIES:
   :CUSTOM_ID: org-batch-agenda-under-win32
   :END:

When I run the example batch files to print my agenda to the console
under Win32 I get the failure:

: End of file during parsing

and no agenda is printed.

The problem is the use of single quotes surrounding the eval in the
emacs command-line. This gets confused under Win32. All string
parameters with spaces must be surrounded in double quotes. This means
that double quotes being passed to the eval must be escaped.

Therefore, instead of the following:

: <path to emacs>\emacs.exe -batch -l ~/_emacs_org \
:     -eval '(org-batch-agenda "a")'

you need to use the following:

:  <path to emacs>\emacs.exe -batch -l ~/_emacs_org \
:     -eval "(org-batch-agenda \"a\")"

(all on one line, of course).

** Org agenda seems very slow
   :PROPERTIES:
   :CUSTOM_ID: slow-agenda
   :END:

If it takes a long time to generate or refresh the agenda, you might
want first check which version of org-mode you are using. There have
been major optimizations of org-agenda since 6.21b, which was the
version of org-mode released with Emacs 23. If you are using 6.21b or
earlier (you can check with =M-x org-version=), then you might want to
consider upgrading to a more recent version of org-mode.

Here are some other ideas for speeding up the agenda:

1. Use a one day agenda view (rather than a seven day view).

   =(setq org-agenda-ndays 1)=

2. Archive inactive items to separate files.

   =C-c C-x C-s= (org-archive-subtree)

3. Do not include the global todo list in your agenda view.

   (setq org-agenda-include-all-todo nil)

4. Make sure that your org files are byte-compiled.

   I.e., make sure there are files ending in =.elc= in your org
   installation directory.

5. Limit your agenda files (=org-agenda-files=) to files that have
   active todos and or projects.

   If you have a number of older reference files---i.e., files you
   search only occasionally---in your agenda files list, consider
   removing them from your agenda files and adding them to
   =org-agenda-text-search-extra-files= instead. Similarly, you might
   consider searching some of your older reference files with =M-x
   grep= so that Org-mode does not have to load them into memory when
   the agenda is called.

** Visual-line-mode doesn't work well with Org-mode
   :PROPERTIES:
   :CUSTOM_ID: visual-line-mode
   :END:

Visual-line-mode "soft wraps" lines so that the visual edge of the
buffer is considered a line break for purposes of navigation, even
though there is no line break in reality.

In older versions of org-mode, org-beginning-of-line and
org-end-of-line do not work well with visual line mode. (The two
commands disregard soft line breaks and move to the beginning and end
of the hard line break.) A patch was introduces to fix this behavior
in July of 2009.

If you are using an older version of Org-mode, you can:

1. Add a hook to turn off visual line mode.

2. Add the following to your =.emacs=:

#+begin_src emacs-lisp

(add-hook 'org-mode-hook
  (lambda ()
    (define-key org-mode-map "\C-a" 'move-beginning-of-line)
    (define-key org-mode-map "\C-e" 'move-end-of-line)))

#+end_src
** Can I hide blocks at startup?

Yes:

#+begin_src emacs-lisp
(setq org-hide-block-startup t)
#+end_src

Or use

#+begin_src org
,#+STARTUP: hideblocks
#+end_src

on a per-file basis.

** After updating Org I get an error about an =invalid function=
   :PROPERTIES:
   :CUSTOM_ID: invalid-function-error
   :END:

In almost all cases an =invalid function= error is caused by an
unclean Org-mode source directory. Cleaning it up and recompiling
should fix the problem

: cd /path/to/orgmode
: make clean
: make

In some cases, bits and pieces of org are loaded from various places (previous
installs, the built-in install of org that came with whatever emacs version you have)
and things get very confused. In all cases, cleaning up every last bit of org installation
from everywhere and reinstalling org from git should restore sanity. See also the [[id:facac2a6-3526-450d-ac42-8d36b16c6bab][next question]].

** I use starter-kit and I get an error =(void-function org-pop-to-buffer-same-window)=
   :PROPERTIES:
   :ID:       facac2a6-3526-450d-ac42-8d36b16c6bab
   :END:
This is a particular instance of the [[#invalid-function-error][previous question]] but with some twists and turns,
and a solution culled from various postings on the mailing list.

starter-kit loads the site-file version of org (the one that came with
your emacs install).  Then when you load your init file, the local
version is added to the front of load-path, so it looks as if things
are originating there, but the damage is already done: you have a
"frankenstein" org.

One possible solution is to add (package-initialize) to the primary init.el
before starter-kit gets going. This will pick up the local install so
that the built-in version never enters to muddy the picture.

** (Filling a paragraph|Indenting a list|...) behaves strangely
Many filling/indenting problems have been reported on the mailing
list: many of those were bugs (that have been fixed), but quite a lot
are caused by people using the filladapt package, which is fundamentally
incompatible with Org, which has its own facilities for these tasks. If you see
strange behavior in this area, first check if you are using filladapt: visit an org
file and check the modeline for "Filladapt".

If filladapt is on, you want to turn it off before investigating
further. Anthony Lander suggested on the mailing list the following
method to turn off filladapt mode when you visit org files:

#+BEGIN_SRC emacs-lisp
(add-hook 'org-mode-hook 'turn-off-filladapt-mode)
#+END_SRC

This should be placed in your .emacs (or other initialization file) after org
is loaded.

* Faces and highlighting
  :PROPERTIES:
  :CUSTOM_ID: Faces
  :END:
** Org-mode has a lot of colors?  How can I change them?
   :PROPERTIES:
   :CUSTOM_ID: customizing-org-faces
   :END:

#+index: Faces

This is a question that applies to Emacs as a whole, but it comes up
quite frequently on the org-mode mailing list, so it is appropriate to
discuss it here.

If you would like to change the style of a face in org-mode (or any
other Emacs mode), simply type =M-x customize-face [RET]= while the
cursor is on the color/style you are interested in modifying. You will
be given the opportunity to customize all the faces located at that
point.

If you would like an overview of all the faces in org-mode, you can
type =C-u M-x list-faces-display [RET] org= and you will be shown all
the faces defined by org-mode along with an illustration of their
current settings.

If you would like to customize org-faces and other aspects of
org-appearance, type =M-x customize-group org-font-lock [RET]=.

Finally, if you would like verbose information about the properties of
the text under the cursor, you can type =C-u C-x ==.

See the Worg page on [[file:org-tutorials/org-appearance.org][customizing Org appearance]] for further information.
** Why do I get a tiny font in column view when using emacs daemon?
   :PROPERTIES:
   :CUSTOM_ID: column-view-tiny-font
   :END:

#+index: Column view

When using emacs in daemon mode (=emacs --daemon=), client frames
sometimes override the column view face settings, resulting in very
small fonts. Here is a fix:

#+begin_src emacs-lisp
  (defun org-column-view-uses-fixed-width-face ()
  ;; copy from org-faces.el
  (when (fboundp 'set-face-attribute)
      ;; Make sure that a fixed-width face is used when we have a column
      ;; table.
      (set-face-attribute 'org-column nil
                          :height (face-attribute 'default :height)
                          :family (face-attribute 'default :family))))

   (when (and (fboundp 'daemonp) (daemonp))
    (add-hook 'org-mode-hook 'org-column-view-uses-fixed-width-face))
#+end_src

This fix was provided in the following mailing list post:

https://list.orgmode.org/loom.20100715T095418-84@post.gmane.org
** How can I stop the mouse cursor from highlighting lines in the agenda?
   :PROPERTIES:
   :CUSTOM_ID: ratpoison-for-agenda-highlighting
   :END:

#+index: Highlighting

You can add the following to your =.emacs=:

#+begin_src emacs-lisp
(add-hook 'org-finalize-agenda-hook
    (lambda () (remove-text-properties
	       (point-min) (point-max) '(mouse-face t))))
#+end_src

* Outline
  :PROPERTIES:
  :CUSTOM_ID: Outline
  :END:
** Can I close an outline section without starting a new section?
   :PROPERTIES:
   :CUSTOM_ID: closing-outline-sections
   :END:

#+index: Outline

Can I have nested, closed outline sections, similar to xml? This
question comes up quite frequently on the mailing list.

See the following threads:

  - https://list.orgmode.org/20110327170251.58923564@hsdev.com
  - https://list.orgmode.org/AANLkTinaTdYWQTXLzCf2kJVOMv64OM_5tL_0JCYAssPr@mail.gmail.com
  - https://list.orgmode.org/q2sc8f5e1e41004151315v433bc7b7udb98e65771a15340@mail.gmail.com
  - https://list.orgmode.org/49CE32EC.5060508@gmx.de

The desired behavior looks something like this:

#+begin_src org
,* Section one

Some text

,** Subsection one

Some text

,** Subsection two

Some text

,# end Subsection Two

Continue text in section one.
#+end_src

The short answer to the question is no. Org-mode adheres to the
cascading logic of outlines, in which a section is closed only by
another section that occupies an equal or greater level.

Here are some workarounds:

1. You can use inline tasks to create non-folding subsections. See the
   documentation in org-inlinetask.el, which is part of the org-mode
   distribution.
2. You can create a temporary heading, such as "** Continue main
   section" and then remove it when you are ready to export.
3. You can create a separate outline heading (e.g., * ACTIONS),
   creating TODOs there with links to the relevant sections of your
   main text.

** Can I add a TODO to a list item?
   :PROPERTIES:
   :CUSTOM_ID: list-item-as-todo
   :END:

No.  When generating agenda views, org-mode treats only headlines as TODO
items.

You can, however, use a status cookie together with checkboxes to
monitor your progress on a series of subtasks:

#+begin_src org
,** TODO Big task [1/3]

   - [X] Subtask 1
   - [ ] Subtask 2
   - [ ] Subtask 3
#+end_src

If you would like to embed a TODO within text without treating it as
an outline heading, you can use inline tasks. Simply add...

: (require 'org-inlinetask)

...to your =.emacs= and then type =C-c C-x t= to insert an inline task.

** Can I have two windows on the same Org-mode file, with different outline visibilities?
   :PROPERTIES:
   :CUSTOM_ID: indirect-buffers
   :END:

   You may use /indirect buffers/ which do exactly this.  See the
   documentation on the command =make-indirect-buffer=.

   Org-mode has built-in commands that allow you create an indirect
   buffer from a subtree of an outline. To open a subtree in new
   window, type =C-c C-x b=. Any changes you make in the new window
   will be saved to the original file, but the visibility of both
   buffers will remain independent of one another.

   For multiple indirect buffers from the same file, you must use the
   prefix =C-u= when creating the second (or third) buffer. Otherwise
   the new indirect buffer will replace the old.

   You can also create an independent view of an outline subtree by
   typing =b= on an item in the agenda.

** Emacs outlines are unreadable.  Can I get rid of all those stars?
   :PROPERTIES:
   :CUSTOM_ID: Emacs-outlines-are-unreadable
   :END:

   See the section [[https://orgmode.org/manual/Clean-view.html#Clean-view][Clean outline view]] in the manual.

** C-k is killing whole subtrees!  I lost my work!
   :PROPERTIES:
   :CUSTOM_ID: C-k-is-killing-subtrees
   :END:

   =(setq org-ctrl-k-protect-subtree t)= before losing your work.

   =(setq org-catch-invisible-edits 'show)= will also be helpful.  See the
   docstring of this option, as it allows more flexible options.

** Why aren't commands working on regions?
   :PROPERTIES:
   :CUSTOM_ID: transient-mark-mode
   :END:

Some org-mode commands, such as M-right and M-left for demoting or
promoting headlines (see [[#demote-multiple-headlines][this FAQ]]), can be applied to entire
regions.  These commands, however, will only work on active regions set
with [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Transient-Mark.html#Transient-Mark][transient mark mode]]. Transient mark mode is enabled by default in
Emacs 23. To enable it in earlier versions of emacs, put the following in
your =.emacs= file:

: (transient-mark-mode 1)

Alternatively, you may turn off transient mark mode and use [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Momentary-Mark.html][a momentary
mark]] (=C-<SPC> C-<SPC>=).

** Why is a blank line inserted after headlines and list items?
   :PROPERTIES:
   :ID:       2463F4D8-F686-4CF3-AA07-08976F8A4972
   :CUSTOM_ID: blank-line-after-headlines-and-list-items
   :END:

#+index: Blank

In org-mode, typing =M-RET= at the end of a headline will create a new
headline of the same level on a new line. The same is true for plain
lists. By default org-mode uses context to determine if a blank line should
be inserted after each headline or plain list item when =M-RET= is
pressed. For instance, if a there is a blank line before a headline, then
typing =M-RET= at the end of the line will insert a blank line before the
new headline. For instance, hitting =M-RET= at the end of "Headline Two"
below inserts a new headline without a blank line:

: ** Headline One
: ** Headline Two
: **

If there is a blank line between Headline One and Headline Two,
however, the results will be as follows:

: ** Headline One
:
: ** Headline Two
:
: **

If you do not like the default behavior you can change it with the
variable =org-blank-before-new-entry=. You can set headings and/or
plain lists to auto (the default setting), t (always), or nil (never).

** How can I promote or demote multiple headlines at once?
   :PROPERTIES:
   :CUSTOM_ID: demote-multiple-headlines
   :END:

#+index: Promote!Multiple
#+index: Demote!Multiple

If you have a long list of first level headlines that you'd like to
demote to second level headlines, you can select the headlines as a
region and then hit =M-<right>= to demote all the headlines at once.

Note: =M-S-<right>= will not work on a selected region. Its use is to
demote a single subtree (i.e., a headline and all sub-headlines).

If M-<right> doesn't seem to work, make sure transient mark mode is
enabled. See [[#transient-mark-mode][this FAQ]].

** What's the deal with all the ellipses in my org outlines?
   :PROPERTIES:
   :CUSTOM_ID: org-ellipses
   :END:

#+index: Ellipsis

Org-mode uses ellipses to indicate folded (and thus hidden) text. Most
commonly, ellispes occur at the end of headings with folded content:

: * Heading ...

Or, for instance, they may indicate closed drawers:

: :PROPERTIES: ...

Sometimes, as a result of editing and cycling an outline, ellipses may
appear in unexpected places. You should *never* delete these ellipses,
as you may accidentally delete hidden text. Instead, you can type =C-c
C-r= (org-reveal) to display all hidden text in the vicinity. Or you
may type =M-x RET show-all= to reveal all text in the org file.

If you would prefer a symbol or face for indicating hidden text, you
can customize the variable org-ellipses.

** How do I yank a subtree so it's indented according to the point's location?
   :PROPERTIES:
   :CUSTOM_ID: yank-indent-subtree
   :END:

#+index: Indentation

You can either use =C-c C-w= with a working [[https://orgmode.org/manual/Refile-and-copy.html#Refile-and-copy][refile-targets]] setup.

Or set =org-yank-adjusted-subtrees= to =t= which will adjust the
yanked headline's level correctly.

Just use =C-k= and =C-y= as you would everywhere else in Emacs.

** Can I read org-mode outlines in vim?
   :PROPERTIES:
   :CUSTOM_ID: org-outlines-in-vim
   :END:

#+index: Vim

Yes, there is a script that enables one to view and navigate folded
outline/org files in vim (though without most of org-mode's
functionality, of course).

  - [[http://www.vim.org/scripts/script.php?script_id%3D1266][Emacs outline mode - Imitates Emacsen : vim online]]

For instructions on how to set it up, please see [[http://list.orgmode.org/EA275862-B97A-4BAC-B879-177FD07A2D56@gaillourdet.net][this mailing list post]].

Work is also underway on an org-mode clone for Vim. You can check it
out on git hub:

https://github.com/hsitz/VimOrganizer

** Can I use another character than "*" to start a headline?

No.  The "*" character is used in =outline-mode=, and Org is derived from
=outline-mode=.

If you are curious as to what other rationales there are for "*", check out
[[https://list.orgmode.org/8739i7ke8i.fsf@gmail.com][this]] mail and the thread it is in.

Even if you cannot use another character, you can add an overlay on top of
the "*" characters and your buffer will look like the way you want.

See the library =org-bullets.el= (by Evgeni Sabof) from the =contrib/=
directory, or test this snippet shared by Jambunathan:

#+BEGIN_SRC emacs-lisp
  (font-lock-add-keywords
   'org-mode `(("\\(?:^\\(?1:\\*+\\)[[:blank:]]\\)"
                (0 (progn (compose-region
                           (match-beginning 1) (match-end 1)
                           (pcase (length (match-string 1))
                             (1 ?\u2219)
                             (2 ?\u2022)
                             (3 ?\u25c9)
                             (_ ?\u25CB)))
                          nil)))))
#+END_SRC

* Todos and Tags
  :PROPERTIES:
  :CUSTOM_ID: Todos-and-Tags
  :END:
** How can I automatically archive canceled tasks?

#+BEGIN_SRC emacs-lisp
(setq org-todo-state-tags-triggers '(("CANCELLED" ("ARCHIVE" . t))))
#+END_SRC

See https://list.orgmode.org/2013-01-18T11-28-57@devnull.Karl-Voit.at -- thanks to Victor
Rosenfeld for sharing [[http://doc.norang.ca/org-mode.html][Bernt Hansen]]'s solution.

** How can I cycle through the TODO keyword of an entry?
   :PROPERTIES:
   :CUSTOM_ID: cycle-TODO-keywords
   :END:

#+index: Cycling!Todo

  =C-c C-t= or =S-<left/right>= is what you need.

** How do I track state changes for tasks in Org?
   :PROPERTIES:
   :CUSTOM_ID: track-state-changes-for-tasks
   :END:

#+index: Logging

  Take a look at the [[https://list.orgmode.org/8763vfa9hl.fsf@legolas.norang.ca][post by Bernt Hansen]] for setting up TODO keyword
  states and logging timestamps for task state changes.

** Can I select the TODO keywords with a tag-like interface?
   :PROPERTIES:
   :CUSTOM_ID: select-TODO-keywords-with-tag-like-interface
   :END:

#+index: Tag!Fast selection

  Yes.  Use =(setq org-use-fast-todo-selection t)=

  If you want to set both your todos and your tags using a single
  interface, then check out the variable
  =org-fast-tag-selection-include-todo=.

  See [[https://orgmode.org/manual/Fast-access-to-TODO-states.html][this section of the manual]] for more details.

** How can I quickly set the tag of an entry?
   :PROPERTIES:
   :CUSTOM_ID: quickly-set-tag-of-entry
   :END:

#+index: Tag!Set

   Use =C-c C-c= or =C-c C-q= on the headline. =C-c C-q= is useful for
   setting tabs in a =Remember= buffer, since =C-c C-c= is the default
   keybinding for filing a note from the remember buffer.

   You can set tags even more quickly by setting one of the character
   shortcuts for [[https://orgmode.org/manual/Setting-tags.html#Setting-tags][fast tag selection]].

   To set tag shortcuts for all org buffers, put something like the
   following in your =.emacs= file (or create the same settings by
   typing =M-x customize-variable RET org-tag-alist=):

: (setq org-tag-alist '(("computer" . ?c) ("office" . ?o) ("home" . ?h)))

   To set tag shortcuts for a single buffer, put something like the
   following at the top of your org file:

: #+TAGS: computer(c) office(o) home(h)

** How can I change the colors of TODO keywords?

#+index: Faces!Todo

You can use the variable =org-todo-keyword-faces=.  Here are some sample
settings:

#+begin_src emacs-lisp
(setq org-todo-keyword-faces
      '(
	("TODO"  . (:foreground "firebrick2" :weight bold))
	("WAITING"  . (:foreground "olivedrab" :weight bold))
	("LATER"  . (:foreground "sienna" :weight bold))
	("PROJECT"  . (:foreground "steelblue" :weight bold))
	("DONE"  . (:foreground "forestgreen" :weight bold))
	("MAYBE"  . (:foreground "dimgrey" :weight bold))
	("CANCELED"  . shadow)
	))
#+end_src

If you want to change the color of all active todos or all inactive todos,
type:

: M-x customize-face RET org-todo
: M-x customize-face RET org-done

You can also set values for each of these in your =.emacs= file:

: (set-face-foreground 'org-todo "firebrick2")
: (set-face-foreground 'org-done "forestgreen")

** Can I use a arbitrary character in a TODO keyword?

Yes, provided you add it to the "word" syntax in Emacs.

For example, to add the =\u25b6= and the =\u25b8= chars, just add this to
your Emacs configuration:

#+begin_src emacs-lisp
  (add-hook 'org-mode-hook
     (lambda ()
       (modify-syntax-entry (string-to-char "\u25b6") "w")
       (modify-syntax-entry (string-to-char "\u25b8") "w")))
#+end_src

** How do I arrange for an item to be automatically marked DONE when all checkboxes are checked?

#+index: Checkbox

This has arisen a couple of time
(e.g. https://list.orgmode.org/87r5718ytv.fsf@sputnik.localhost and
https://list.orgmode.org/m2d3efqkl0.fsf@pluto.luannocracy.com in the mailing list.

There is an [[https://orgmode.org/worg/org-hacks.html#mark-done-when-all-checkboxes-checked][org-hack]] that describes a possible solution.

* Hyperlinks
  :PROPERTIES:
  :CUSTOM_ID: Hyperlinks
  :END:

** Why do I have to confirm the execution of each shell/elisp link?
   :PROPERTIES:
   :CUSTOM_ID: confirm-shell/elisp-link
   :END:

#+index: Link!Shell
#+index: Link!Elisp

   The confirmation is there to protect you from unwantingly execute
   potentially dangerous commands.  For example, imagine a link

   : [[shell:rm -rf ~/*][Google Search]]

   In an Org-mode buffer, this command would look like /Google Search/,
   but really it would remove your home directory.  If you wish, you can
   make it easier to respond to the query by setting

   : (setq org-confirm-shell-link-function 'y-or-n-p
   :       org-confirm-elisp-link-function 'y-or-n-p).

   Then a single keypress will be enough to confirm those links.  It is
   also possible to turn off this check entirely, but I strongly
   recommend against this.  Be warned.

** Can I use RET or TAB to follow a link?
   :PROPERTIES:
   :CUSTOM_ID: RET-or-TAB-to-follow-link
   :END:

#+index: Link!Follow

   Yes, this is how:

   : (setq org-return-follows-link t)
   : (setq org-tab-follows-link t)

** Can I keep mouse-1 clicks from following a link?
   :PROPERTIES:
   :CUSTOM_ID: mouse-1-following-link
   :END:

   Activating links with =mouse-1= is a new feature in Emacs 22, to make
   link behavior similar to other applications like web browsers.  If
   you hold the mouse button down a bit longer, the cursor will be set
   without following the link.  If you cannot get used to this behavior,
   you can (as in Emacs 21) use =mouse-2= to follow links and turn off
   link activation for =mouse-1= with

   : (setq org-mouse-1-follows-link nil)

** How can I get completion of file names when creating a link?
   :PROPERTIES:
   :CUSTOM_ID: completion-of-file-links
   :END:

#+index: Link!Completion

You can use org-insert-link with a prefix argument:

: C-u C-c C-l

You will be greeted with prompt in the minibuffer that allows for file
completion using your preferred Emacs method for finding files.

** How can I use invisible targets within lists?
   :PROPERTIES:
   :CUSTOM_ID: invisible-targets-in-lists
   :END:

#+index: Target!Invisible

The usual way of turning radio links invisible is to comment them, but
Org comments need to be at the beginning of the line, which breaks list
indentation.

The workaround here is to add (INVISIBLE) after your <<target>>

For example:

: 11. <<target>>(INVISIBLE)
:     Some text
: 12. More text [[target][go to]]

** Org-mode is not opening mailto links in my default mail client
   :PROPERTIES:
   :CUSTOM_ID: mailto-links
   :END:

#+index: Link!Mailto

You can customize the function org-mode uses to open mailto links by
setting the variable =org-link-mailto-program=:

=M-x customize-variable org-link-mailto-program=

The default function called is =browse-url=, which opens a mail
composition buffer within Emacs. The type of buffer opened by
browse-url depends on the setting of the variable =mail-user-agent=.
Thus, if you want to ensure that mailto links use Gnus to open a
message buffer, you could add the following to your =.emacs=:

#+begin_src elisp
(setq mail-user-agent 'gnus-user-agent)
#+end_src

** Can I use CamelCase links?
   :PROPERTIES:
   :CUSTOM_ID: CamelCase-links
   :END:

#+index: Link!CamelCase

Yes, you can with the contributed package =org-wikinodes.el=.  Please
consult the [[https://orgmode.org/worg/org-contrib/org-wikinodes.html][documentation]].

** Can I create links to Thunderbirds emails?

Yes, see this: [[http://list.orgmode.org/ka42mn$mn9$1@ger.gmane.org][from Christoph Herzog: Re: Linking to Thunderbird (correction)]]

#+BEGIN_SRC emacs-lisp
(require 'org)

(org-add-link-type "thunderlink" 'org-thunderlink-open)

(defun org-thunderlink-open (path)
  "Opens an email in Thunderbird with ThunderLink."
  (start-process "myname" nil "thunderbird" "-thunderlink" (concat "thunderlink:" path)))

(provide 'org-thunderlink)
#+END_SRC

* Plain Lists
  :PROPERTIES:
  :CUSTOM_ID: Plain-Lists
  :END:

** How can I insert an empty line before each newly inserted headline, but not before each newly inserted plain-list item?
   :PROPERTIES:
   :CUSTOM_ID: empty-line-before-each-new-headline-but-not-item
   :END:

: (setq org-blank-before-new-entry
:       '((heading . t) (plain-list-item . nil))

See also [[id:2463F4D8-F686-4CF3-AA07-08976F8A4972][Why is a blank line inserted after headlines and list items?]].

** How can I convert itemized lists to enumerated lists?
   :PROPERTIES:
   :CUSTOM_ID: convert-itemized-to-enumerated-lists
   :END:

#+index: List!Itemized
#+index: List!Enumerated

   You can use =C-c -= or =S-<left>/<right>= to cycle through the various
   bullet headlines available for lists: =-, +, *, 1., 1)=.

   See [[https://orgmode.org/manual/Plain-lists.html#Plain-lists][this section of the manual]] for more information.

** How can I convert plain lists to headlines and vice versa?
   :PROPERTIES:
   :CUSTOM_ID: convert-plain-lists-to-headlines
   :END:

#+index: List!Plain
#+index: Headline

   To convert a plain list item or line to a headline, type =C-c *= on
   the headline. This will make the line a subheading of the current
   headline.

   To convert a headline to a plain list item, type =C-c -= while the
   cursor is on the headline.

   To convert a headline to an unadorned line of text, type =C-c *= on
   the headline.

   You can use query replace to accomplish the same things, as Bernt
   Hansen explains in [[https://list.orgmode.org/871vvrym45.fsf@gollum.intra.norang.ca][this mailing list post]].

** Is there a good way to create a description list?
   :PROPERTIES:
   :CUSTOM_ID: description-lists
   :END:

#+index: List!Description

  Yes, these are now built-in:

#+BEGIN_EXAMPLE
- item1 :: Description of this item 1
- item2 :: Description of this item 2
- item1 :: Description of this item 3
      also in multiple lines
#+END_EXAMPLE

** How can I export alphabetical lists to... alphabetical lists?

=org-list-allow-alphabetical= allows you to use alphabetical lists in
Org, but this is purely visual, there is no effect on how the list is
exported.  It is simply exported as an /ordered/ list, just like when
you use numberes.  How the list will be represented in the export
depends on the backend.  For example, the style file of a LaTeX
document, or the CSS file for HTML documents set how ordered lists
should be represented.  It is good style to adhere to these general
settings because it keeps the overall document structure consistent.

See [[http://list.orgmode.org/87mwq6qtjk.fsf@gmail.com][this thread]] (and earlier ones) for a discussion about this.

* Tables
  :PROPERTIES:
  :CUSTOM_ID: Tables
  :END:

** Will there ever be support for multiple lines in a table field?
   :PROPERTIES:
   :CUSTOM_ID: table-multiline-fields
   :END:

   No.

   You can embed tables created with the =table.el= package in org-mode
   buffers, with mixed success when it comes to export and publishing.

** How can I make table alignment work with Asian character sets
   :PROPERTIES:
   :CUSTOM_ID: table-alignment-asian-characters
   :END:

#+index: Table!Alignment

When table alignment fails, it usually has to do with character sets
where some characters have non-integer width.  Org will deal correctly
with characters that are one or two or three ASCII characters wide,
but not with characters that are, for example, 1.5 ASCII characters
wide.  To make table alignment work you need to switch to a different
character set.

** Can I plot data from a table?
   :PROPERTIES:
   :CUSTOM_ID: plotting-table-data
   :END:

#+index: Table!Plot
#+index: Table!Data
#+index: Plot

   Yes, you can, using org-plot.el written by Eric Schulte and now
   bundled with Org.  See [[https://orgmode.org/manual/Org_002dPlot.html#Org-Plot][the manual section about this]].

   See also [[file:org-tutorials/org-plot.org][this excellent tutorial]] by Eric Schulte.

** How can I fill a table column with incremental numbers?
   :PROPERTIES:
   :CUSTOM_ID: fill-table-column-with-incremental-numbers
   :END:

#+index: Table!Fill

Here is how: Use a field formula to set the first value in the column:

#+begin_src org
| N   |   |
|-----+---|
| :=1 |   |
|     |   |
|     |   |
|     |   |
,#+TBLFM: @2$1=1
#+end_src

Then define a column formula in the second field:

#+begin_src org
| N        |   |
|----------+---|
| 1        |   |
| =@-1 + 1 |   |
|          |   |
|          |   |
,#+TBLFM: @2$1=1
#+end_src

After recomputing the table, the column will be filled with
incremental numbers:

#+begin_src org
| N |   |
|---+---|
| 1 |   |
| 2 |   |
| 3 |   |
| 4 |   |
,#+TBLFM: $1=@-1 + 1::@2$1=1
#+end_src

Note that you could use arbitrary starting values and column formulas.

Alternatively, you can just start the table

#+begin_src org
| N |   |
|---+---|
| 1 |   |
#+end_src

and with the cursor on the 1, use S-RET (bound to org-table-copy-down). That
will add a row, incrementing the number as it goes. See the docstring for org-table-copy-down
for more information and also see the next FAQ entry [[=S-RET= in a table keeps increasing the copied numbers.  How can I stop this?]]
if you don't want this behavior.

** =S-RET= in a table keeps increasing the copied numbers.  How can I stop this?
   :PROPERTIES:
   :CUSTOM_ID: S-RET-in-a-table-increases-copied-numbers
   :END:

   Well, it is /supposed/ to be a feature, to make it easy to create a
   column with increasing numbers.  If this gets into your way, turn it
   off with

   : (setq org-table-copy-increment nil)

** Why does my table column get filled with #ERROR?
   :PROPERTIES:
   :CUSTOM_ID: table-column-filled-with-ERROR
   :END:

#+index: Table!#ERROR

   Org-mode tried to compute the column from other fields using a
   formula stored in the =#+TBLFM:= line just below the table, and
   the evaluation of the formula fails.  Fix the fields used in the
   formula, or fix the formula, or remove it!

** How can I stop the table editor from creating new lines?
   :PROPERTIES:
   :CUSTOM_ID: table-editor-creates-new-lines
   :END:

   When I am in the last column of a table and just above a horizontal
   line in the table, pressing TAB creates a new table line before the
   horizontal line.  To move to the line below the
   horizontal line instead, do this:

   Press =down= (to get on the separator line) and then =TAB=.
   Or configure the variable

   : (setq org-table-tab-jumps-over-hlines t)

** How can I get table fields starting with "="?
   :PROPERTIES:
   :CUSTOM_ID: table-fields-starting-with-=
   :END:

   With the setting

   : (setq org-table-formula-evaluate-inline nil)

   this will no longer happen.  You can still use formulas using the
   commands ~C-c =~ and ~C-u C-c =~

** How can I get a vertical bar "|" inside a table field?
   :PROPERTIES:
   :CUSTOM_ID: table-fields-with-vertical-bar
   :END:

   You can use =\vert= to put a vertical bar inside a table field.  This
   will be converted for export.  To use it inside a word use
   =abc\vert{}def=.  If you need something that looks like a bar in the Org
   mode buffer, you can use the unicode character brvbar which looks like
   this: \brvbar{}.

** How can I change the indentation of an entire table without fixing every line by hand?
   :PROPERTIES:
   :CUSTOM_ID: change-indentation-entire-table
   :END:

#+index: Table!Indentation

   The indentation of a table is set by the first line.  So just fix the
   indentation of the first line and realign with =TAB=.

** In my huge table the realigning after each TAB takes too long.  What can I do?
   :PROPERTIES:
   :CUSTOM_ID: table-realigning-after-TAB-takes-long
   :END:

#+index: Table!Realign

   Either split the table into several by inserting an empty line every
   100 lines or so.  Or turn off the automatic re-align with

   : (setq org-table-automatic-realign nil)

   After this the only way to realign a table is to press =C-c C-c=.  It
   will no longer happen automatically, removing the corresponding delays
   during editing.

** Recalculation of my table takes too long.  What can I do?
   :PROPERTIES:
   :CUSTOM_ID: Recalculation-of-my-table-takes-too-long
   :END:

#+index: Table!Calculation

   Nothing, really.  The spreadsheet in org is mostly done to make
   calculations possible, not so much to make them fast.  Since Org-mode is
   firmly committed to the ASCII format, nothing is stopping you from
   editing the table by hand.  Therefore, there is no internal
   representation of the data.  Each time Org-mode starts a computation, it
   must scan the table for special lines, find the fields etc.  This is
   slow.  Furthermore, Calc is slow compared to hardware computations.  To
   make this work with normal editing, recalculation is not happening
   automatically, or only for the current line, so that the long wait for a
   full table iteration only happens when you ask for it.

   So for really complex tables, moving to a "real" spreadsheet may
   still be the best option.

   That said, there are some ways to optimize things in Org-mode, and I
   have been thinking about moving a bit further down this line.
   However, for my applications this has so far not been an issue at
   all.  If you have a good case, you could try to convince me.

** When I export tables to HTML, they don't have borders.
   :PROPERTIES:
   :CUSTOM_ID: table-borders-in-html-export
   :END:

#+index: Table!HTML

By default, Org-mode exports tables without borders.

You can changed this by placing an =#+ATTR_HTML= line before the table:

:  #+ATTR_HTML: :border 2 :rules all :frame all

See [[https://orgmode.org/manual/Tables-in-HTML-export.html#Tables-in-HTML-export][the manual]] for more details.

** Why does the Calc high precision (e. g. =p20=) not work like expected?
   :PROPERTIES:
   :CUSTOM_ID: table-high-precision
   :END:

- *Short answer*

  Avoid
  : | 1 / 2 * 3 | 0.16666667000000 |
  : #+TBLFM: $2 = $1; p20 %.14f

  and use
  : | 1 / 2 * 3 | 0.16666666666667 |
  : #+TBLFM: $2 = $1 +.0; p20 f-14

- *Longer answer*

  It is important to distinguish between the precision of
  1) =p20=: Calc internal calculation (=calc-internal-prec=)
  2) =f-14=: Calc float formatting, unlimited in precision (=calc-float-format=)
  3) =%.14f=: the =printf= reformatting, limited in precision

  See [[https://orgmode.org/manual/Formula-syntax-for-Calc.html#Formula-syntax-for-Calc][the Org manual]] (org-version 6.35 or newer) for more details.

  Use =C-h v org-calc-default-modes RET= to check the Org default settings
  which are used if no format specifiers are added to a table formula.
  The examples below have been made with the out_of_the_box Org defaults
  =calc-internal-prec = 12= and =calc-float-format = 8=.

  Remember the formula debugger, toggled with =C-c {=,
  to view the processing stages like:
  |   | formula debugger label | processing stage           |
  | / | <                      | <>                         |
  |---+------------------------+----------------------------|
  |   | Result:                | output of Calc             |
  |   | Format:                | reformatting with =printf= |

  Following are some examples to demonstrate
  the interaction of the three precisions.

  - *display precision limitations for Calc formulas*
    - limited by Calc internal calculation precision from Org default
      (here =p12=)
      : | 0.16666666666700 |
      : #+TBLFM: $1 = 1 / 2 * 3;     f-14

      : | 0.1666666666670000000 |
      : #+TBLFM: $1 = 1 / 2 * 3;     f-19

    - limited by Calc float format from Org default (here =f8=)
      : | 0.16666667 |
      : #+TBLFM: $1 = 1 / 2 * 3

      : | 0.16666667 |
      : #+TBLFM: $1 = 1 / 2 * 3; p20

      : | 0.16666667000000 |
      : #+TBLFM: $1 = 1 / 2 * 3;          %.14f

      : | 0.16666667000000 |
      : #+TBLFM: $1 = 1 / 2 * 3; p20      %.14f

    - limited by Calc float format specified
      : | 0.166667 |
      : #+TBLFM: $1 = 1 / 2 * 3;     f-6

      : | 0.16666666666667 |
      : #+TBLFM: $1 = 1 / 2 * 3; p20 f-14

      : | 0.1666666666666666667 |
      : #+TBLFM: $1 = 1 / 2 * 3; p20 f-19

    - limited by =printf= conversion to Emacs Lisp float
      : | 0.1666666699999999900 | the inaccuracy is platform dependent |
      : #+TBLFM: $1 = 1 / 2 * 3;          %.19f

      : | 0.1666666699999999900 | the inaccuracy is platform dependent |
      : #+TBLFM: $1 = 1 / 2 * 3; p20      %.19f

      : | 0.1666666666666666600 | the inaccuracy is platform dependent |
      : #+TBLFM: $1 = 1 / 2 * 3; p20 f-20 %.19f

    - limited by =printf= format specified
      : | 0.166667 |
      : #+TBLFM: $1 = 1 / 2 * 3;         %.6f

  - *display precision limitations for Emacs Lisp formulas*
    - limited by Emacs Lisp float
      : | 0.16666666666666666 |
      : #+TBLFM: $1 = '(/ 1.0 (* 2 3))

      : | 0.1666666666666666574 | the inaccuracy is platform dependent |
      : #+TBLFM: $1 = '(/ 1.0 (* 2 3)); %.19f

    - limited by =printf= format specified
      : | 0.16666666666667 |
      : #+TBLFM: $1 = '(/ 1.0 (* 2 3)); %.14f

This FAQ entry is based on this [[https://list.orgmode.org/4B882C11.90406@alumni.ethz.ch][mailing list thread]]
and is continued in the [[#table-float-fraction][next FAQ entry]].

** Which float format shows the fraction part also when the latter is zero?
   :PROPERTIES:
   :CUSTOM_ID: table-float-fraction
   :END:

- *Short answer*

  Avoid
   : | 1 | 1 |
   : #+TBLFM: $2 = $1; f-3
  and use
   : | 1 | 1.000 |
   : #+TBLFM: $2 = $1 +.0; f-3

- *Longer answer*

  For =f3= and =f-3= see =`d f' (`calc-fix-notation')= in [[http://www.delorie.com/gnu/docs/calc/calc.html#SEC_Top][the Calc manual]]
  in the section Mode Settings -> Display Modes -> Float Formats
  [[http://www.delorie.com/gnu/docs/calc/calc_163.html][found here as long as the section numbering is unchanged]].

  Remember the formula debugger, toggled with =C-c {=,
  to view the processing stages like:
  |   | formula debugger label | processing stage           |
  | / | <                      | <>                         |
  |---+------------------------+----------------------------|
  |   | Result:                | output of Calc             |
  |   | Format:                | reformatting with =printf= |

  Following are some examples to demonstrate different float formats.

  - normal precision
    : |-----------+---------+-------+---------+----------+-------|
    : |    number |      f3 |   f-3 | +.0; f3 | +.0; f-3 |  %.3f |
    : |-----------+---------+-------+---------+----------+-------|
    : |         1 |       1 |     1 |   1.000 |    1.000 | 1.000 |
    : |         0 |       0 |     0 |   0.000 |    0.000 | 0.000 |
    : |-----------+---------+-------+---------+----------+-------|
    : |       1.0 |   1.000 | 1.000 |   1.000 |    1.000 | 1.000 |
    : |       0.0 |   0.000 | 0.000 |   0.000 |    0.000 | 0.000 |
    : |-----------+---------+-------+---------+----------+-------|
    : | 1.0001666 |   1.000 | 1.000 |   1.000 |    1.000 | 1.000 |
    : | 0.0001666 | 1.67e-4 | 0.000 | 1.67e-4 |    0.000 | 0.000 |
    : |-----------+---------+-------+---------+----------+-------|
    : | 1.0016666 |   1.002 | 1.002 |   1.002 |    1.002 | 1.002 |
    : | 0.0016666 |   0.002 | 0.002 |   0.002 |    0.002 | 0.002 |
    : |-----------+---------+-------+---------+----------+-------|
    : #+TBLFM: $2 = $1; f3 :: $3 = $1; f-3 :: $4 = $1 +.0; f3 :: $5 = $1 +.0; f-3 :: $6 = $1; %.3f

  - high precision
    : |----------------------+--------------------------+-----------------------|
    : | number               |                      f19 |                  f-19 |
    : |----------------------+--------------------------+-----------------------|
    : | 1                    |                        1 |                     1 |
    : | 0                    |                        0 |                     0 |
    : |----------------------+--------------------------+-----------------------|
    : | 1.0                  |    1.0000000000000000000 | 1.0000000000000000000 |
    : | 0.0                  |    0.0000000000000000000 | 0.0000000000000000000 |
    : |----------------------+--------------------------+-----------------------|
    : | 1 + 1 / 2 * 3 * 1e19 |    1.0000000000000000000 | 1.0000000000000000000 |
    : | 0 + 1 / 2 * 3 * 1e19 | 1.666666666666666667e-20 | 0.0000000000000000000 |
    : |----------------------+--------------------------+-----------------------|
    : | 1 + 1 / 2 * 3 * 1e18 |    1.0000000000000000002 | 1.0000000000000000002 |
    : | 0 + 1 / 2 * 3 * 1e18 |    0.0000000000000000002 | 0.0000000000000000002 |
    : |----------------------+--------------------------+-----------------------|
    : #+TBLFM: $2 = $1; p20 f19 :: $3 = $1; p20 f-19

    : |----------------------+--------------------------+-----------------------|
    : | number               |                 +.0; f19 |             +.0; f-19 |
    : |----------------------+--------------------------+-----------------------|
    : | 1                    |    1.0000000000000000000 | 1.0000000000000000000 |
    : | 0                    |    0.0000000000000000000 | 0.0000000000000000000 |
    : |----------------------+--------------------------+-----------------------|
    : | 1.0                  |    1.0000000000000000000 | 1.0000000000000000000 |
    : | 0.0                  |    0.0000000000000000000 | 0.0000000000000000000 |
    : |----------------------+--------------------------+-----------------------|
    : | 1 + 1 / 2 * 3 * 1e19 |    1.0000000000000000000 | 1.0000000000000000000 |
    : | 0 + 1 / 2 * 3 * 1e19 | 1.666666666666666667e-20 | 0.0000000000000000000 |
    : |----------------------+--------------------------+-----------------------|
    : | 1 + 1 / 2 * 3 * 1e18 |    1.0000000000000000002 | 1.0000000000000000002 |
    : | 0 + 1 / 2 * 3 * 1e18 |    0.0000000000000000002 | 0.0000000000000000002 |
    : |----------------------+--------------------------+-----------------------|
    : #+TBLFM: $2 = $1 +.0; p20 f19 :: $3 = $1 +.0; p20 f-19

    The =printf= reformatting (=%.19f=) cannot be used with high precision,
    see the [[#table-high-precision][previous FAQ entry]].

** How can I center tables in LaTeX output?
   :PROPERTIES:
   :CATEGORY: centered-tables-in-latex
   :END:

#+index: Table!Center

Set the `org-latex-tables-centered' to `t':

: (defcustom org-latex-tables-centered t
:   "When non-nil, tables are exported in a center environment."
:   :group 'org-export-latex
:   :type 'boolean)

** Can I exclude columns from a table when exporting it?

No.

* Markup
  :PROPERTIES:
  :CUSTOM_ID: Footnotes
  :END:
** How can I get automatic renumbering of footnotes in org-mode?
   :PROPERTIES:
   :CUSTOM_ID:       footnote-auto-adjust
   :END:

#+index: Footnotes!Renumbering

You can add the following line to your .emacs file:

: (setq org-footnote-auto-adjust t)

Or, if you prefer, you can turn this option on locally by placing the
following line at the top of your org file:

: #+STARTUP: fnadjust

When auto-adjust is turned on, footnotes in the file with numerical
labels will be renumbered whenever a new footnote is added. Meanwhile,
all footnotes, including those with custom labels such
=[fn:custom-label ]=, will be sorted in the order of their appearance
in the text.

This emulates the footnote behavior that many users may be familiar
with from word-processing programs or from the footnote-mode included
with emacs.

If you do not turn on org-footnote-auto-adjust, you sort and/or
renumber footnotes at any time by calling org-footnote-action with a
prefix argument.

** Why isn't auto renumbering of footnotes turned on by default?
   :PROPERTIES:
   :CUSTOM_ID:       why-no-default-auto-adjust
   :END:

Org-mode has a very robust footnote mechanism allowing for a variety of
types of footnotes. With some of the following footnote notations,
auto-adjust may be either irrelevant or undesired:

 - Automatically numbered
 - Footnotes with custom labels
 - Inline footnotes

In addition, Org-mode can be customized to place footnotes either at
the end of a document or at the end of the outline heading in which
they appear. Users who change this setting while editing a document
may be disconcerted to find all of their footnotes rearranged
automatically.

** I have auto-fill-mode set and org-mode is inserting unwanted comment markers!
   :PROPERTIES:
   :CUSTOM_ID: auto-fill-and-unwanted-comments
   :END:

If the following occurs:

#+begin_src org
,#+OPTIONS: toc:nil
Some entered text.
,# More entered tex.
#+end_src

Make sure that the variable comment-start is nil.

** Are there any shortcuts for entering source blocks and comment lines?
   :PROPERTIES:
   :CUSTOM_ID: shortcuts-for-entering-source-blocks
   :END:

Org-mode has some [[https://orgmode.org/manual/Literal-examples.html#Literal-examples][very convenient markup]] for including literal blocks and
lines of code in a file.  (This is especially useful when exporting
documents or using the contributed package [[file:org-contrib/babel/index.org][org-babel]] for executing blocks
of code.)

#+begin_src org
,#+begin_src perl
print "Hello, world!\n";
,#+end_src
#+end_src

It can be tiresome to enter the block comment lines manually. There are
several possible shortcuts you can use to enter them:

1) Built-in expansion

   - Org-mode has a "secret" method of expanding source code blocks
     and comment lines.

   - If you type "<s" followed by =TAB= or =M-TAB=, a source block will
     magically appear.

   - For a full list of expansions, type =M-x describe-variable
     [RET] org-structure-template-alist=.

2) [[https://orgmode.org/manual/Literal-examples.html#Literal-examples][Registers]]

   - Add the following line to your emacs file:

     =(set-register ?p "#+begin_src\n\n#+end_src perl")=

   - Then type =C-x r i p= to insert the source block. Please note: if
     you save another value to the register "p" with =C-x r s p=, it
     will overwrite the setting above for the current emacs session.

3) [[https://orgmode.org/manual/Literal-examples.html#Literal-examples][Abbrevs]]

   - Activate the abbrev minor-mode in org-mode:

     + M-x abbrev-mode

     + /Permanently/:

       + =(add-hook 'org-mode-hook (lambda () (abbrev-mode 1)))=

   - In org-mode, type "sbp" (a sample abbreviation for a perl source
     block).

   - Immediately after "sbp" type =C-x a i l=.

   - Enter the expansion:

     - =#+begin_src perl[C-q C-j][C-q C-j]#+end_src=

     - Note: =C-q C-j= creates a new line in the minibuffer

   - Now, whenever, you type sbp followed by =SPACE= or =RET= in an
     org-mode buffer, the src block will magically appear.

   - To review your list of abbrevs, type =M-x edit-abbrevs=.

4) [[http://www.emacswiki.org/emacs/SkeletonMode][Skeletons]]

   - Skeletons offer a simple way of automatically entering text.
     Here's a skeleton that queries for the type of block and wraps
     the active region inside it:

     #+begin_src elisp
       (define-skeleton skel-org-block
	 "Insert an org block, querying for type."
	 "Type: "
	 "#+begin_" str "\n"
	 _ - \n
	 "#+end_" str "\n")
     #+end_src

   - Simply type skel-org-block to insert the block.

     - You can bind this to a key.

     - You can also create an abbrev that invokes this function:

       : (define-abbrev org-mode-abbrev-table "blk" "" 'skel-org-block)

5) [[http://code.google.com/p/yasnippet/][Yasnippet]]

   - Several org-mode users install yasnippet for convenient, complex
     expansion.

   - See Bernt Hansen's [[http://doc.norang.ca/org-mode.html#Yasnippets][org-mode setup]] for a good introduction to
     yasnippet.

* Capture and remember
  :PROPERTIES:
  :CUSTOM_ID: Remember
  :END:

** Can I use a variable or a function inside the `org-capture-templates' variable?
   :PROPERTIES:
   :CUSTOM_ID: variable-inside-capture-templates
   :END:

#+index: Capture

Yes.  Use [[http://www.gnu.org/s/emacs/manual/html_node/elisp/Backquote.html][backquotes]].

E.g. if you have a variable called =org-test-file= and you want the
variable =org-capture-templates= to "understand" (i.e. evaluate)
=org-test-file= when Emacs evaluates the =(setq org-capture-templates
[...])= expression, use backquotes like this:

#+begin_src emacs-lisp
(setq org-capture-templates
      `(("t" "Todo" entry (file+headline ,org-test-file "Tasks")
       "* TODO %?\n  %i\n  %a")
      ("b" "Buy" item (file+olp ,org-test-file "Stuff to Buy" "House")
       "")))
#+end_src

** Can I use the remember buffer to clock a customer phone call?
   :PROPERTIES:
   :CUSTOM_ID: use-remember-buffer-to-clock-phone-call
   :END:

  Yes, you can.  Take a look at the [[https://list.orgmode.org/87tzkhoi45.fsf@gollum.intra.norang.ca][setup described by Bernt Hansen]] and
  check out (in the same thread) what Nick Docos had to fix to make Bernt's
  set-up work for him.

** Can I automatically start the clock when opening a remember template?
   :PROPERTIES:
   :CUSTOM_ID: start-clock-when-opening-remember-template
   :END:

#+index: Clock!Start

   Yes, this is possible.  Use the following code and make sure that
   after executing it, `my-start-clock-if-needed' is in
   `remember-mode-hook' /after/ `org-remember-apply-template'.

   : (add-hook 'remember-mode-hook 'my-start-clock-if-needed 'append)
   : (defun my-start-clock-if-needed ()
   :   (save-excursion
   :     (goto-char (point-min))
   :     (when (re-search-forward " *CLOCK-IN *" nil t)
   :       (replace-match "")
   :       (org-clock-in))))

   Then, when a template contains the key string CLOCK-IN, the clock
   will be started.  Starting with Org-mode version 5.20, the clock will
   automatically be stopped when storing the remember buffer.

* Searches
  :PROPERTIES:
  :CUSTOM_ID: Searches
  :END:

** Isearch does not find string hidden in links.  What can I do?
   :PROPERTIES:
   :CUSTOM_ID: isearch-in-links
   :END:

#+index: Isearch

  M-x =visible-mode= will display the full link, making them searchable.

** How can I reduce the amount of context shown in sparse trees?
   :PROPERTIES:
   :CUSTOM_ID: context-in-sparse-trees
   :END:

#+index: Context

   Take a look at the following variables:

   - =org-show-hierarchy-above=
   - =org-show-following-headline=
   - =org-show-siblings=
   - =org-show-entry-blow=

   which give command-dependent control over how much context is shown by a
   particular operation.

** How can I combine the results of two calls to =org-occur=?
   :PROPERTIES:
   :CUSTOM_ID: two-calls-to-org-occur
   :END:

#+index: Occur

   You can construct a regular expression that matches all targets you
   want.  Alternatively, use a =C-u= prefix with the second and any
   further calls to =org-occur= to keep the current visibility and
   highlighting in addition to the new ones.

* Agenda
  :PROPERTIES:
  :CUSTOM_ID: Agenda
  :END:

** My agenda commands are slow.  What to do?

See the dedicated page about [[file:agenda-optimization.org][agenda speed up and optimization]].

** How can I change the advanced warning time for deadlines?
   :PROPERTIES:
   :CUSTOM_ID: warning-period-for-deadlines
   :END:

#+index: DEADLINE!Warning

Deadline warnings appear in the daily agenda view a specified number
of days before the deadline is due. The default setting is 14 days.
You can change this with the variable =org-deadline-warning-days=.
(See [[https://orgmode.org/manual/Deadlines-and-scheduling.html#Deadlines-and-scheduling][this section]] of the manual.)

For instance,

: (setq org-deadline-warning-days 30)

would cause warnings for each deadline to appear 30 days in advance.

Naturally, you might not want warnings for all of your deadlines to
appear so far in advance. Thus, you can change the lead time for
individual items as follows:

: * TODO Get a gift for the party
:   DEADLINE: <2009-01-16 Fri -2d>

The "-2d" above changes the lead time for this deadline warning to two
days in advance. You can also use "w" for weeks and "m" for months.

** How can I postpone a task until a certain date?
   :PROPERTIES:
   :CUSTOM_ID: deferring-tasks
   :END:

#+index: Postpone

The easiest way to postpone a task is to schedule it in the future.  For
instance, typing =C-c C-s +2w= on a headline will push a task two weeks
into the future, so that it won't show up on the daily agenda until two
weeks from now.

If you'd like to prevent the task from showing up on your global todo list,
you have a couple of options.

1. You can set the variable =org-agenda-todo-ignore-scheduled= to
   =t=.  This will exclude any scheduled items from your global list of
   active todos (=C-c a t=). (The variable
   =org-agenda-todo-ignore-with-date= will exclude both scheduled and
   deadline items from your todo list).

2. You can remove the todo keyword from the item (C-c C-t <SPC>). The item
   will still appear on your agenda two weeks from today, but it won't show
   up on your todo lists.

** Can I send myself an email containing tasks or other agenda info?
   :PROPERTIES:
   :CUSTOM_ID: email-containing-tasks-or-other-agenda-info
   :END:

   Yes.  See [[https://list.orgmode.org/m3ve3d1596.fsf@richardriley.net][this thread]] on the list.

** How can I limit the agenda view to my "work" tasks?
   :PROPERTIES:
   :CUSTOM_ID: limit-agenda-with-tag-filtering
   :END:

#+index: FILETAGS

   It is often convenient to group org files into separate categories, such
   as "home" and "work" (or "personal" and "professional"). One of the main
   reasons for such classification is to create agenda views that are
   limited by type of work or area of responsibility.  For instance, while
   at work, one may want to see only professional tasks; while away from
   work, one may want to see only personal tasks.

   One way to categorize files and tasks is to use a "#+FILETAGS"
   declaration at the top of each file, such as:

   : #+FILETAGS: work

   As long as org-use-tag-inheritance is turned on, the filetags will
   be inherited by all tasks in the file. A file can have multiple
   filetags. And, of course, tags can be added to individual headings.

   Tasks can be quickly filtered by tag from within the agenda by
   typing "/" and the name of the tag. The full key sequence to filter
   for work items in an agenda view would be:

   : C-c a a / work [or a tag shortcut]

** How can I limit the agenda view to a particular category?
   :PROPERTIES:
   :CUSTOM_ID: limit-agenda-with-category-match
   :END:

#+index: Agenda view!Category

   Another way to filter agenda views by type of work is to use a
   "#+CATEGORY" declaration at the top of each file, such as:

   : #+CATEGORY: work

   Categories can also be added to individual headings within a file:

   : * Big project
   :   :PROPERTIES:
   :   :CATEGORY: work
   :   :END:

   All todos belonging to the category "work" can be found a with a
   simple tags-todo search:

   : C-c a M

   At the prompt, type:

   : CATEGORY="work"

   The same results can be achieved with custom agenda commands, such as:

#+BEGIN_SRC emacs-lisp
(setq org-agenda-custom-commands
      '(("h" tags-todo "CATEGORY=\"home\"")
	("w" tags-todo "CATEGORY=\"work\"")
	;; other custom agenda commands here
	))
#+END_SRC

** How can include all org files in a directory in my agenda?
   :PROPERTIES:
   :CUSTOM_ID: set-agenda-files-using-wildcards
   :END:

#+index: Agenda!Directory

You can simply include the directory (as one of the items) in the value of
the variable org-agenda-files:

: (setq org-agenda-files '("/my/special/path/org/"))

There is another way of accomplishing the same end:

: (setq org-agenda-files (file-expand-wildcards "/my/special/path/org/*.org"))

** Why aren't items disappearing from my agenda once they are marked done?
   :PROPERTIES:
   :CUSTOM_ID: removing-done-items-from-agenda
   :END:

If items remain on your daily/weekly agenda after they are marked done,
check the configuration of the following variables:

: org-agenda-skip-scheduled-if-done
: org-agenda-skip-deadline-if-done
: org-agenda-skip-timestamp-if-done

For instance, type:

: M-x customize-variable RET org-agenda-skip-scheduled-if-done

If this variable is turned off (=nil=), then scheduled items will
remain on the agenda even after they are marked done.

If the variable is turned on (=t=), then scheduled items will
disappear from the agenda after they are marked done.

If these settings seem not to behave the way you expect, then make
sure you understand [[#scheduled-vs-deadline-vs-timestamp][the difference between SCHEDULED, DEADLINE, and
timestamps]].

** How do I keep repeating timestamps from being displayed multiple times?
   :PROPERTIES:
   :CUSTOM_ID: repeating-timestamps-show-once
   :END:

#+index: Timestamp!Repeating

To show only the /current/ instance of a repeating timestamp, put the
following in your .emacs:

#+begin_src emacs-lisp
(setq org-agenda-repeating-timestamp-show-all nil)
#+end_src

** What is the difference between SCHEDULED, DEADLINE, and plain timestamps?
   :PROPERTIES:
   :CUSTOM_ID: scheduled-vs-deadline-vs-timestamp
   :END:

#+index: SCHEDULED
#+index: DEADLINE
#+index: Timestamp

1. SCHEDULED items (set with =C-c C-s=) will appear on your agenda on
   the day they are scheduled and on every day thereafter until they
   are done. Schedule a task if you want to be reminded to do
   something beginning on a certain day and until it is done.

   : ** TODO Scheduled item
   :    SCHEDULED: <2009-03-01 Sun>

2. Items with a DEADLINE timestamp (set with =C-c C-d=) appear on your
   agenda in advance of the when they are due and remain on your
   agenda until they are done. Add a DEADLINE to an item if you want
   to make sure to complete it by a certain date. (The variable
   org-deadline-warning-days determines how far in advance items with
   deadlines will show up in the agenda. See [[#warning-period-for-deadlines][this FAQ]] for more
   information.)

   : ** TODO Item with a deadline
   :    DEADLINE: <2009-01-20 Tue>

3. An active timestamp (set with =C-c .=) will appear on your agenda
   only on the day it is scheduled. Use a timestamp for appointments
   or any reminders you want to show up only on a particular day.

   : ** TODO Item with an active timestamp
   : <2009-04-18 Sat>

Note: items with inactive timestamps (set with C-c ! and marked by
square brackets) will not show up in the agenda at all.

** Can I add files recursively to my list of agenda files?
   :PROPERTIES:
   :CUSTOM_ID: set-agenda-files-recursively
   :END:

Yes, you can use the library =find-lisp=.

: (load-library "find-lisp")
: (setq org-agenda-files (find-lisp-find-files "~/org" "\.org$"))

This will add all files ending in =org= in the directory "~/org"
and all of its subdirectories to your list of agenda files.

If on a *nix machine, you can also use the find utility, which can be
faster than the find-lisp library:

: (setq org-agenda-files
:       (mapcar 'abbreviate-file-name
:               (split-string
:                (shell-command-to-string "find ~/org -name \"*.org\"") "\n")))


See [[https://list.orgmode.org/7b4bbp$11a9u8@dmzms99802.na.baesystems.com][this thread]] on the mailing list for more information.

** Why does an item appearing at the wrong time of day in my agenda?
   :PROPERTIES:
   :CUSTOM_ID: agenda-wrong-time-of-day
   :END:

When preparing the agenda view, org-mode scans each relevant headline for a
time designation.  This approach is very nice for adding free-form
timestamps to an item for scheduling.  Thus, either of the following work
would work to schedule an item at 10:00am:

#+begin_src org
,** 10:00am Get dried ice at the magic store
   SCHEDULED: <2009-05-27 Wed>
#+end_src

#+begin_src org
,** Get dried ice at the magic store
   SCHEDULED: <2009-05-27 Wed 10:00>
#+end_src

To enable this flexibility, org-mode scans the entire headline for time of
day notation. A potential problem can arise if you use inactive timestamps
in the headline to note when an item was created.  For example :

#+begin_src org
,** Get dried ice at the magic store [2009-05-26 Tue 12:58]
   SCHEDULED: <2009-05-27 Wed>
#+end_src

Org-mode would interpret the time in the inactive timestamp as a
time-of-day indicator and the entry would appear in your agenda at
12:58.

If you would like to turn off the time-of-day search, you can configure the
variable =org-agenda-search-headline-for-time= (requires org-mode >= 6.24).

** How can I change the visibility of an item from the agenda?
   :PROPERTIES:
   :CUSTOM_ID: cycling-visibility-from-agenda
   :END:

#+index: Agenda!Visibility

You can add a keybinding as follows:

#+begin_src emacs-lisp
(add-hook 'org-agenda-mode-hook
   (lambda ()
     (define-key org-agenda-mode-map " " 'org-agenda-cycle-show)))
#+end_src

Then, as you press SPACE on an item on the agenda, it will cycle the
visibility of its original location.

** Is there any way to set org-mode so that tags don't appear in the agenda view?

See the =org-agenda-remove-tags= variable.

** I work late at night! How can I extend my current day past midnight?
   :PROPERTIES:
   :CUSTOM_ID: org-extend-today-until
   :END:

If you work past midnight, you may not want your daily agenda view to
switch to the next day at 12 a.m. (the default). To extend your day, simply
set the value of org-extend-today-until to a positive number corresponding
to the number of hours you work past midnight. For example, the following
setting will cause the current day to extend until 6 a.m.

: (setq org-extend-today-until 6)

** How can I let a task repeat until a certain date?

Use =org-clone-subtree-with-time-shift= and read [[http://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/][this blog post]] for
details.

* Appointments/Diary
  :PROPERTIES:
  :CUSTOM_ID: Appointments/Diary
  :END:
** Is it possible to include entries from org-mode files into my emacs diary?
   :PROPERTIES:
   :CUSTOM_ID: include-entries-from-org-mode-files-into-emacs-diary
   :END:

#+index: Diary

   Since the org-mode agenda is much more powerful and can contain the
   diary, you should think twice before deciding to do this.  If you
   insist, however, integrating Org-mode information into the diary is
   possible.  You need to turn on /fancy diary display/ by setting in
   .emacs:

   : (add-hook 'diary-display-hook 'diary-fancy-display)

   Then include the following line into your ~/diary file, in
   order to get the entries from all files listed in the variable
   =org-agenda-files=

   : &%%(org-diary)

   You may also select specific files with

   : &%%(org-diary) ~/path/to/some/org-file.org
   : &%%(org-diary) ~/path/to/another/org-file.org

   If you now launch the calendar and press ~d~ to display a
   diary, the headlines of entries containing a timestamp, date range,
   schedule, or deadline referring to the selected date will be listed.
   Just like Org-mode's agenda view, the diary for /today/ contains
   additional entries for overdue deadlines and scheduled items.  See
   also the documentation of the =org-diary= function.  Under XEmacs, it
   is not possible to jump back from the diary to the org, this works
   only in the agenda buffer.
** I want to add my Org scheduled/deadlined entries in my diary!
   :PROPERTIES:
   :CUSTOM_ID: add-Org-scheduled/deadlined-entries-to-diary!
   :END:

   Put this in your ~/.diary:

   : &%%(org-diary :scheduled :timestamp :deadline)

** How can I set up automatic reminders based on Org information?
   :PROPERTIES:
   :CUSTOM_ID: automatic-reminders
   :END:

#+index: Reminders

  See [[https://list.orgmode.org/13222.1201471868@gamaville.dokosmarshall.org][this post]] by N. Dokos on the list. See also Russell Adams's hack in
  [[https://orgmode.org/worg/org-hacks.html#org-agenda-appt-zenity][org-hacks]].

** How can I make =appt= notice my Org appointments?
   :PROPERTIES:
   :CUSTOM_ID: appt-notice-my-Org-appointments
   :END:

#+index: Appointment
#+index: Appt

  : M-x org-agenda-to-appt RET

** How can I create more complex appointments in my org-files?
   :PROPERTIES:
   :CUSTOM_ID: diary-sexp-in-org-files
   :END:

#+index: Appointment

Org-mode's active timestamps work very well for scheduling individual
or recurring appointments, such as:

#+begin_src org
,* 8:00am Dentist appointment <2009-01-16 Fri>
#+end_src

or

#+begin_src org
,* Vacation
  <2009-03-20 Fri>--<2009-04-01 Wed>
#+end_src

or

#+begin_src org
,* Weekly meeting with boss
  <2009-01-20 Tue 14:00 +1w>
#+end_src

Sometimes, however, you need to set up more complicated recurring
appointments.  Org-mode has built-in support for many of [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Sexp-Diary-Entries.html][the powerful sexp
entries]] that work in [[http://www.gnu.org/software/emacs/manual/html_node/emacs/Diary.html#Diary][Emacs diary]].

Let's say, for instance, that you teach a class that meets every Monday
evening between February 16 and April 20, 2009. The way to enter this an
org-mode file is:

#+begin_src org
,** Class 7:00pm-9:00pm
   <%%(and (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009))>
#+end_src

The expression above designates all Mondays that fall between February
16 and April 20. How exactly does it work?

 - (and... :: Indicates that *both* of the conditions that follow have
          to be true.

   - (= 1 (calendar-day-of-week date)) :: Is the day of the week a
        Monday?

       - Note: the function calendar-day-of-week converts the date to the day of week
	 expressed in numeric form, where 0 = Sunday, 1 = Monday, and so on.

   - (diary-block 2 16 2009 4 20 2009) :: Does the date fall between
        these two dates?

You can make a sexp as complex as you like. If you wanted to omit a week
because of holidays, for instance, you could add another condition to the
sexp:

#+begin_src org
,** Class 7:00pm-9:00pm
   <%%(unless (diary-block 3 9 2009 3 13 2009) (and (= 1 (calendar-day-of-week date)) (diary-block 2 16 2009 4 20 2009)))>
#+end_src

The sexp above would omit Monday during the week of March 9, 2009. For
another way to accomplish the same thing, see [[#org-class][this FAQ]].

Another diary function commonly used for more complex scheduling is
diary-float. For instance,

#+begin_src org
,* Monthly meeting
  <%%(diary-float t 3 3)>
#+end_src

... would appear on the third Wednesday of every month.

For more ideas on how to create diary special expressions, see [[http://www.emacswiki.org/cgi-bin/wiki/DiaryMode][this
page on the Emacs wiki]].

** How can I schedule a weekly class that lasts for a limited period of time?
   :PROPERTIES:
   :CUSTOM_ID: org-class
   :END:

Org-mode offers a convenient diary sexp function for setting up a recurring
appointment that lasts for a certain period of time, such as a class. It is
called org-class and it can be entered as follows:

#+begin_src org
,** Class 7:00pm-9:00pm
   <%%(org-class 2009 2 16 2009 4 20 1 10)>
#+end_src

The function above schedules an appointment for every Monday (1)
between February 16 and April 20, 2009, except for ISO week 10 (March
1 to March 7).

If you would prefer not to place the timestamp in the headline, you can use
the following format:

#+begin_src org
,** Class
   <%%(org-class 2009 2 16 2009 4 20 1 10)> 7:00pm-9:00pm Class
#+end_src

In this case, the string following the sexp will be displayed in the
agenda.

The function org-class has the following format:

: (org-class Y1 M1 D1 Y2 M2 D2 DAYNAME &rest SKIP-WEEKS)

Y1/2, M1/2, and D1/2 indicate the beginning and ending dates. DAYNAME takes
the form of a number indicating the day of the week (0 = Sunday, 1 =
Monday, and so on...). In addition, one can add an optional argument
SKIP-WEEKS to indicate weeks on the calendar that should be skipped. This
argument should be expressed as an ISO week number. You can find the number
by invoking emacs' built-in calendar (=M-x calendar=), navigating to the
appropriate week, and typing =p c (calendar-iso-print-date)=.  If one of
the SKIP-WEEKS is the symbol =holidays=, then any holidays known to the
calendar are also skipped.

Here is an alternative method, shared by Paul Sexton on the org mailing
list:

Let's say you are taking night classes in Spanish. The class is every
Wednesday evening at 7pm, starting on 18 August, and runs for 8
weeks.  Org-mode's timestamps do not support limited occurrences of
recurrent items -- you have to schedule the item with infinite recurrences,
then delete it when it finishes.

To schedule the Spanish classes, put the following in your =.emacs=:

#+begin_src emacs-lisp
  (defun diary-limited-cyclic (recurrences interval m d y)
    "For use in emacs diary. Cyclic item with limited number of recurrences.
  Occurs every INTERVAL days, starting on YYYY-MM-DD, for a total of
  RECURRENCES occasions."
    (let ((startdate (calendar-absolute-from-gregorian (list m d y)))
          (today (calendar-absolute-from-gregorian date)))
      (and (not (minusp (- today startdate)))
           (zerop (% (- today startdate) interval))
           (< (floor (- today startdate) interval) recurrences))))
#+end_src

The item in the org file looks like this:

#+begin_src org
,** 19:00-21:00 Spanish lessons
   <%%(diary-limited-cyclic 8 7 8 18 2010)>
#+end_src

** How can I set an event to occur every day except Saturday and Sunday?

#+begin_src org
,** Daily meeting
   <%%(memq (calendar-day-of-week date) '(1 2 3 4 5))>
#+end_src

** How do I schedule events relative to Easter Sunday?

   Easter's date moves around from year to year according to a complicated
   set of criteria which I do not claim to understand.  However the
   following code will allow you to schedule recurring events relative to
   Easter Sunday.

   Note: the function da-easter is from [[http://github.com/soren/elisp/blob/master/da-kalender.el][da-kalender.el]].

   Put the following in your .emacs:

   #+begin_src emacs-lisp
     (defun da-easter (year)
       "Calculate the date for Easter Sunday in YEAR. Returns the date in the
     Gregorian calendar, ie (MM DD YY) format."
       (let* ((century (1+ (/ year 100)))
              (shifted-epact (% (+ 14 (* 11 (% year 19))
                                   (- (/ (* 3 century) 4))
                                   (/ (+ 5 (* 8 century)) 25)
                                   (* 30 century))
                                30))
              (adjusted-epact (if (or (= shifted-epact 0)
                                      (and (= shifted-epact 1)
                                           (< 10 (% year 19))))
                                  (1+ shifted-epact)
                                shifted-epact))
              (paschal-moon (- (calendar-absolute-from-gregorian
                                (list 4 19 year))
                               adjusted-epact)))
         (calendar-dayname-on-or-before 0 (+ paschal-moon 7))))


     (defun da-easter-gregorian (year)
       (calendar-gregorian-from-absolute (da-easter year)))

     (defun calendar-days-from-easter ()
       "When used in a diary sexp, this function will calculate how many days
     are between the current date (DATE) and Easter Sunday."
       (- (calendar-absolute-from-gregorian date)
          (da-easter (calendar-extract-year date))))
    #+end_src

    Now we can schedule the public holidays associated with Easter as
    recurring events.  Good Friday is 2 days before "Easter", Easter Monday
    is one day after.

    #+begin_src org
    ,* Good Friday
      <%%(= -2 (calendar-days-from-easter))>

    ,* Easter Sunday
      <%%(= 0 (calendar-days-from-easter))>

    ,* Easter Monday
      <%%(= 1 (calendar-days-from-easter))>
    #+end_src

   [Source: Posted by Paul Sexton on Org-mode mailing list.]

** How to schedule public holiday that is "the nearest Monday to DATE"?

   In New Zealand each regional capital has an "Anniversary Day". The date
   of Auckland's anniversary day is "the nearest Monday to 29 January".

   Put this in your =.emacs=:

   #+begin_src emacs-lisp
     (defun calendar-nearest-to (target-dayname target-day target-month)
       "Recurring event that occurs in the nearest TARGET-DAYNAME to
     the date TARGET-DAY, TARGET-MONTH each year."
       (interactive)
       (let* ((dayname (calendar-day-of-week date))
              (target-date (list target-month target-day (calendar-extract-year date)))
              (days-diff (abs (- (calendar-day-number date)
                                 (calendar-day-number target-date)))))
         (and (= dayname target-dayname)
              (< days-diff 4))))
    #+end_src

   Now we can schedule Auckland Anniversary Day. The first argument, 1,
   means Monday (days of the week are numbered starting with Sunday=0).

   [Source: Originally posted by Paul Sexton on Org-mode mailing list.]

** How to schedule public holiday on "the 4th Monday in October"?

#+index: Holiday

   This does not require any additions to =.emacs=:

#+begin_src org
,* Labour Day (NZ)
  <%%(diary-float 10 1 4)>
#+end_src

** Why isn't the agenda showing all the times I put under a single entry?
   :PROPERTIES:
   :CATEGORY: multiple-timestamps-same-entry
   :END:

Probably because you have not set the following variable:

: org-agenda-skip-additional-timestamps-same-entry

The default value of this variable is t, which means that entries with
multiple timestamps, such as the following...

#+begin_src org
,* Work really, really hard
  <2010-11-20 Sat 10:00>
  <2010-11-20 Sat 14:00>
#+end_src

... will only appear in the agenda at the time specified by the first
timestamp. If you set =org-agenda-skip-additional-timestamps-same-entry= to
nil, the item will appear will appear at all the times you specify.

** Can I import iCal events/appts from Gnus?

#+index: iCal
#+index: Gnus

Yes.  Vagn Johansen wrote [[http://ozymandias.dk/emacs/org-import-calendar.el][org-import-calendar.el]] which lets you do this.

* Export
  :PROPERTIES:
  :CUSTOM_ID: Export
  :END:
** How do I ignore a headline?

   This is one of the most common FAQs on the Org mailing list.  The
   following export filter will allow headlines tagged =ignore= to be
   ignored during export, while their contents and children headlines
   are retained and children headlines are promoted to the level of
   the original headline.  Alternately, a more in depth discussion
   with a variety of alternate solutions is available in org-hacks
   [[file:org-hacks.org::#ignoreheadline][here]].

   #+begin_src emacs-lisp
     ;; During export headlines which have the "ignore" tag are removed
     ;; from the parse tree.  Their contents are retained (leading to a
     ;; possibly invalid parse tree, which nevertheless appears to function
     ;; correctly with most export backends) all children headlines are
     ;; retained and are promoted to the level of the ignored parent
     ;; headline.
     ;;
     ;; This makes it possible to add structure to the original Org-mode
     ;; document which does not effect the exported version, such as in the
     ;; following examples.
     ;;
     ;; Wrapping an abstract in a headline
     ;;
     ;;     * Abstract                        :ignore:
     ;;     #+LaTeX: \begin{abstract}
     ;;     #+HTML: <div id="abstract">
     ;;
     ;;     ...
     ;;
     ;;     #+HTML: </div>
     ;;     #+LaTeX: \end{abstract}
     ;;
     ;; Placing References under a headline (using ox-bibtex in contrib)
     ;;
     ;;     * References                     :ignore:
     ;;     #+BIBLIOGRAPHY: dissertation plain
     ;;
     ;; Inserting an appendix for LaTeX using the appendix package.
     ;;
     ;;     * Appendix                       :ignore:
     ;;     #+LaTeX: \begin{appendices}
     ;;     ** Reproduction
     ;;     ...
     ;;     ** Definitions
     ;;     #+LaTeX: \end{appendices}
     ;;
     (defun org-export-ignore-headlines (data backend info)
       "Remove headlines tagged \"ignore\" retaining contents and promoting children.
     Each headline tagged \"ignore\" will be removed retaining its
     contents and promoting any children headlines to the level of the
     parent."
       (org-element-map data 'headline
         (lambda (object)
           (when (member "ignore" (org-element-property :tags object))
             (let ((level-top (org-element-property :level object))
                   level-diff)
               (mapc (lambda (el)
                       ;; recursively promote all nested headlines
                       (org-element-map el 'headline
                         (lambda (el)
                           (when (equal 'headline (org-element-type el))
                             (unless level-diff
                               (setq level-diff (- (org-element-property :level el)
                                                   level-top)))
                             (org-element-put-property el
                               :level (- (org-element-property :level el)
                                         level-diff)))))
                       ;; insert back into parse tree
                       (org-element-insert-before el object))
                     (org-element-contents object)))
             (org-element-extract-element object)))
         info nil)
       data)

     (add-hook 'org-export-filter-parse-tree-functions 'org-export-ignore-headlines)
   #+end_src

** My old beamer presentations does not look the same with =ox-beamer.el=
   :PROPERTIES:
   :CUSTOM_ID: beamer-backwards-incompatibility
   :END:

#+index: Export!Beamer

   The new beamer introduced a few backwards incompatible changes.
   Some of these are discussed [[file:exporters/beamer/ox-beamer.org::#backwards-compatibility][here]].  If you think the discussion can
   be improved, please share your thoughts on the mailing list; better
   yet, improve the entry on Worg!

** How can I export <my favourite element> as <my favourite environment> or how can I transform the export output using filters
   :PROPERTIES:
   :CUSTOM_ID: filter
   :END:

#+index: Export!Filters

   It is often useful to be able to make small tweaks to the export
   output by using filters.

   There have been a lot of requests like this on the mailing list
   lately.  Often a user wants to export an image in different ways
   during LaTeX export; or export different image files for different
   backends.  All these can be easily achieved by using export
   filters.  You can look at [[https://list.orgmode.org/20130719102315.GB9369@kuru.dyndns-at-home.com][this example]] on the mailing list.  For a
   more general discussion on the "new" export engine, including a
   description of filters and how they work, see Nicolas Goaziou's
   [[https://list.orgmode.org/876229nrxf.fsf@gmail.com][announcement]]: it is very much worth reading in its entirety (except
   for the section on users of the experimental version who are by now
   extinct - as is the experimental version.)

** Can I get TODO items exported to HTML as lists, rather than as headlines?
   :PROPERTIES:
   :CUSTOM_ID: export-TODO-items-as-lists
   :END:

#+index: Export!HTML

   If you plan to use ASCII or HTML export, make sure things you want to
   be exported as item lists are level 4 at least, even if that does
   mean there is a level jump.  For example:

   : * Todays top priorities
   : **** TODO write a letter to xyz
   : **** TODO Finish the paper
   : **** Pick up kids at the school

   Alternatively, if you need a specific value for the heading/item
   transition in a particular file, use the =#+OPTIONS= line to
   configure the H switch.

   : #+OPTIONS:   H:2; ...

** Can I export only a single subtree?
   :PROPERTIES:
   :CUSTOM_ID: export-single-subtree
   :END:

#+index: Export!Subtree

If you want to export a subtree, mark the subtree as region and then
export. Marking can be done with =C-c @ C-x C-x=, for example.

Alternatively, you can select option =C-s= in the org export dispatcher
(e.g.., =C-c C-e C-s= to export the current subtree to html).

By default, the title of the exported file will be set to the heading
of the subtree. You can, however, [[#export-options-for-subtree][customize the title and other export
options]].

** How can I customize export options for a single subtree?
   :PROPERTIES:
   :CUSTOM_ID: export-options-for-subtree
   :END:

#+index: Export!Options

You can set unique export options for a [[#export-single-subtree][single subtree]] by using
properties. Relevant properties include:

 - =EXPORT_TITLE=
 - =EXPORT_AUTHOR=
 - =EXPORT_DATE=
 - =EXPORT_FILE_NAME=
 - =EXPORT_OPTIONS= (corresponds to the =#+OPTIONS:= [[https://orgmode.org/manual/Export-settings.html#Export-settings][configuration line]])

** How can I tell my calendar web application about appointments in my agenda files?

Here is what you need to do:

1. a script that calls Emacs in batch mode and produce a .ics file
2. a script that uploads this .ics file somewhere on the web
3. tell your webapp to fetch this .ics file on the web

Here is the script I use for the first step:

#+begin_src shell-script-mode
#!/bin/bash

/usr/local/bin/emacs --batch --eval \
"(progn (load-file \"~/install/git/org-mode/org.el\") \
        (load-file \"~/elisp/config/org-batch-config.el\") \
        (setq org-combined-agenda-icalendar-file \"~/org/cal/org.ics\")
        (setq org-agenda-files (quote (\"~/org/bzg.org\"))))" \
    -f org-export-icalendar-combine-agenda-files
#+end_src

Depending on your configuration, you might change the load sequence.

Here is the script I use for the second step:

#+begin_src shell-script-mode
#!/bin/bash
/usr/bin/rsync -rtv ~/org/org.ics -e ssh me@my_server:/home/me/public_html/
#+end_src

Note: if you want to cron this rsync script, you will need to let
=my_server= to know about your SSH public key.  Check [[http://troy.jdmz.net/rsync/index.html][this page]] as a
starter.

Now you can cron the two scripts above and your webapp will always be
up to date with your Org agendas.

Also see [[https://orgmode.org/org.html#Exporting-Agenda-Views][Exporting agenda views]] from Org manual.

** How can I get Mac OSX 10.3 iCal to import my org-exported .ics files?
   :PROPERTIES:
   :CUSTOM_ID: iCal-import-ics-files-old
   :END:

#+index: .ics
#+index:  iCal!Mac OSX 10.3

   When using iCal under Apple MacOS X Tiger, you can create a new C-e c=,
   see the variables =org-icalendar-combined-name= and
   =org-combined-agenda-icalendar-file=).  Then set Org-mode to overwrite
   the corresponding file /~/Library/Calendars/OrgMode.ics/.  You may even
   use AppleScript to make iCal re-read the calendar files each time a new
   version of /OrgMode.ics/ is produced.  Here is the setup needed for
   this:

   : (setq org-combined-agenda-icalendar-file
   :     "~/Library/Calendars/OrgMode.ics")
   : (add-hook 'org-after-save-iCalendar-file-hook
   :  (lambda ()
   :   (shell-command
   :    "osascript -e 'tell application \"iCal\" to reload calendars'")))

** How can I get Mac OSX 10.4 or later iCal to import my Org-exported .ics files?
   :PROPERTIES:
   :CUSTOM_ID: iCal-import-ics-files-new
   :END:

#+index:  iCal!Mac OSX 10.4

   For Mac OS X 10.4, you need to write the ics file to
   =/Library/WebServer/Documents/= and then subscribe iCalendar to =http:
   //localhost/orgmode.ics=

** How can I remove timestamps and todo keywords from my exported file?
   :PROPERTIES:
   :CUSTOM_ID: export-options-remove-timestamps
   :END:

#+index: Export!Timestamps
#+index: Export!Todo keywords

You can place an options line at the top of your org file:

: #+OPTIONS: <:nil todo:nil

There is a whole host of export options you can set with an in-buffer
options or via global variables. See [[https://orgmode.org/manual/Export-settings.html#Export-settings][this section]] of the manual for a
full list.

** How can I preserve faces when I export an agenda from the command line?
   :PROPERTIES:
   :CUSTOM_ID: preserving-faces-during-batch-export
   :END:

#+index: Export!Agenda
#+index: Export!Faces

Normally, when you export an org file or an agenda view from within
emacs, htmlize will convert your face definitions to direct color css
styles inlined into each =<span>= object, resulting in an HTML output
that preserves the general look of your Org buffers and agenda views.

Let's say you generate an export from the command line, such as the
following:

: emacs -batch -l ~/.emacs -eval '(org-batch-agenda "e")'

or

: emacs -batch -l ~/.emacs -eval '(org-publish-all)'

In such an instance, the exported HTML will contain only very basic
color styles. The reason is that when Emacs is run in batch mode, it
does not have a display and therefore only rudimentary face
definitions.  If you'd like to use more complex styles, you'll have to
make sure that the export process only assigns classes instead of
direct color values.  This can be done by binding the variable
=org-export-htmlize-output-style= to =css= for the duration of the
export, for example with

: emacs -batch -l ~/.emacs
:   -eval '(let ((org-export-htmlize-generate-css (quote css)))
:            (org-batch-agenda "e"))'

Then you can use a style file to make these classes look any way you
like.  To generate face definitions for a CSS file based on any faces
you are currently using in Emacs, you can use the following command:

: M-x org-export-htmlize-generate-css RET

This will generate a =<style>...</style>= section, the content of
which you can add to your style file.

** How can I avoid dark color background when exporting agenda to ps format?
   :PROPERTIES:
   :CUSTOM_ID: avoiding-dark-background-when-exporting-agenda
   :END:

#+index: Export!.ps

Add this to your .emacs and evaluate it.

#+BEGIN_SRC emacs-lisp
  (setq org-agenda-exporter-settings
        '((ps-print-color-p 'black-white)))
#+END_SRC

** How can I include e.g. an abstract in export to Latex and HTML?
   :PROPERTIES:
   :CUSTOM_ID: include-abstract-in-export-to-latex-and-html
   :END:

#+index: Export!Abstract

Org does not currently have special markup for abstracts, but for
export purposes, you can extend the block-level structural and
semantic markup in Org with the contributed package [[file:org-contrib/org-special-blocks.org][org-special-blocks]]
(by Chris Gray). To turn it on, put this in your =.emacs=:

: (require 'org-special-blocks)

Now, you can mark up the abstract of your article like this:

: #+BEGIN_ABSTRACT
: Falling apples were observed and compared with pears. Newton's laws
: were confirmed at the 95% confidence level.
: #+END_ABSTRACT

Exporting to Latex wraps this in a
=\begin{abstract}....\end{abstract}= environment, which just works.

HTML export wraps it in a ~<div class="abstract">...</div>~
element. The HTML result won't look like anything special until you
style it. Here is some sample CSS to get you started; put these in
your document header:

: #+STYLE: <style>.abstract {margin: 1em; padding: 1em; border: 1px solid black}
: #+STYLE: .abstract:before {content: "Abstract: "; font-weight: bold}</style>

Generally, =#+begin_foo= will work for any simple Latex =foo=
environment not supported by existing Org markup.

If you need to pass parameters, process the block content in some way,
or support other exporters, you may want to consider whether you can
customize it using Eric Schulte's [[file:org-contrib/org-exp-blocks.org][org-exp-blocks]] instead.

** How can I get colored source code when exporting to LaTeX?
   :PROPERTIES:
   :CUSTOM_ID: fontified_source_code_w_latex
   :END:

#+index: Export!LaTeX

As of Sun Aug 9 2009 the "current" version of Org-mode (see
[[#keeping-current-with-Org-mode-development]]) supports exporting source
code to LaTeX using the listings package.

To turn on listing export add the following to your Org-mode
customization.
#+begin_src emacs-lisp
  ;; requite org-latex so that the following variables are defined
  (require 'ox-latex)

  ;; tell org to use listings
  (setq org-latex-listings t)

  ;; you must include the listings package
  (add-to-list 'org-latex-packages-alist '("" "listings"))

  ;; if you want colored source code then you need to include the color package
  (add-to-list 'org-latex-packages-alist '("" "color"))
#+end_src

The listings package will now be used to fontify source code in your
LaTeX documents.  By default listings will not color any of your
source code.  If you would like to set colors for keywords and
comments in your latex documents you can do so using LaTeX directives
like the following.
#+begin_src latex
  \lstset{keywordstyle=\color{blue},
    commentstyle=\color{red},
    stringstyle=\color{green}
  }
#+end_src

of if you want to get even fancier with your colors you can try
something like the following
#+begin_src latex
\definecolor{keywords}{RGB}{255,0,90}
\definecolor{comments}{RGB}{60,179,113}
\definecolor{fore}{RGB}{249,242,215}
\definecolor{back}{RGB}{51,51,51}
\lstset{
  basicstyle=\color{fore},
  keywordstyle=\color{keywords},
  commentstyle=\color{comments},
  backgroundcolor=\color{back}
}
#+end_src

For more complex listings use cases consult the [[ftp://ftp.tex.ac.uk/tex-archive/macros/latex/contrib/listings/listings.pdf][listings manual]].

** How can I export to Latex Beamer?
   :PROPERTIES:
   :CUSTOM_ID: beamer
   :END:

#+index: Export!Beamer

The latex [[http://latex-beamer.sourceforge.net/][Beamer Class]] is a useful class for generating slide shows.
The following can be used to export Org-mode documents to LaTeX
beamer.

Add the following to your Emacs initialization file.
#+begin_src emacs-lisp
  (unless (boundp 'org-latex-classes)
    (setq org-latex-classes nil))
  (add-to-list 'org-latex-classes
               '("beamer"
                 "\\documentclass[11pt]{beamer}\n\\usepackage[utf8]{inputenc}\n\\usepackage[T1]{fontenc}\n\\usepackage{hyperref}\n\\usepackage{verbatim}\n"
                 ("\\section{%s}" . "\\section*{%s}")
                 ("\\begin{frame}\\frametitle{%s}" "\\end{frame}"
                  "\\begin{frame}\\frametitle{%s}" "\\end{frame}")))
#+end_src

Then by placing
: #+LaTeX_CLASS: beamer
in the header of your Org-mode document it will automatically export
to the Beamer document class on LaTeX export.  With the above
configuration top-level headers will be mapped to sections in the
Beamer document, second-level headers will be mapped to frames, and
lower level headlines will be mapped to itemize objects.

This above is adapted from an [[https://list.orgmode.org/9854.1246500519@gamaville.dokosmarshall.org][email by Nick Dokos]], and an [[https://list.orgmode.org/935736B7-18C4-4730-B765-D9E8463E9C84@tsdye.com][email by
Thomas Dye]].  For a much more complex Beamer setup see the [[https://list.orgmode.org/935736B7-18C4-4730-B765-D9E8463E9C84@tsdye.com][email by
Thomas Dye]].

** How can I use RefTeX in Org-mode files for LaTeX export and in Org-babel LaTeX code blocks?
   :PROPERTIES:
   :CUSTOM_ID: using-reftex-in-org-mode
   :END:

#+index: RefTeX
#+index: Babel
#+index: Code blocks

[[http://www.gnu.org/software/auctex/reftex.html][RefTeX]] is an indispensable tool for the author of LaTeX documents.  It
aids in creation of bibliographies, cross-references, indexes, and
glossaries.  RefTeX understands the structure of multi-file LaTeX
documents and is able to collect from them information about the
location(s) of external data stores used in creation of the final
document.  RefTeX was written by Carsten Dominik and is currently
being maintained by the [[http://www.gnu.org/software/auctex/index.html][AucTeX]] project.

*** Using RefTeX In Org-mode Files for LaTeX Export
In Org-mode files for LaTeX export, the trick is to find a way to tell
RefTeX the locations of external data stores.  One way is to set the
variable, =reftex-default-bibliography=.  Add lines like these to
.emacs:

#+begin_src emacs-lisp
  (setq reftex-default-bibliography
        (quote
         ("default.bib" "other-default.bib")))
#+end_src

In practice, this is a limited solution and the
typical user will want to pass this information on a per-file basis.
Two solutions to this problem were posted on a blog, [[http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/][Mario's
Braindump]].

The first solution, proposed by Mario, enables the RefTeX citation
function in Org-mode.  Add these lines to .emacs:

#+begin_src emacs-lisp
  (defun org-mode-reftex-setup ()
    (load-library "reftex")
    (and (buffer-file-name)
         (file-exists-p (buffer-file-name))
         (reftex-parse-all))
    (define-key org-mode-map (kbd "C-c )") 'reftex-citation))
  (add-hook 'org-mode-hook 'org-mode-reftex-setup)
#+end_src

Then add the following lines anywhere in the Org-mode file (Org-mode
will recognize them as LaTeX commands):

#+begin_src org
\bibliographystyle{plain}
\bibliography{BIB-NAME}
#+end_src

With this setup, =C-c )= will invoke =reftex-citation= which will
insert a reference in the usual way:

#+begin_src org
,* test reftex

This is a citation \cite{tierney90}.

\bibliographystyle{plain}
\bibliography{tsd}
#+end_src

This Org-mode file will export the following LaTeX output:

#+begin_src latex :exports code
  % Created 2010-03-22 Mon 14:34
  \documentclass[11pt,letter]{article}
  \usepackage[utf8]{inputenc}
  \usepackage[T1]{fontenc}
  \usepackage{hyperref}

  \title{test.org}
  \author{Tom Dye}
  \date{2010-03-22 Mon}

  \begin{document}

  \maketitle

  \setcounter{tocdepth}{3}
  \tableofcontents
  \vspace*{1cm}

  \section{test reftex}
  \label{sec-1}


  This is a citation \cite{tierney90}.

  \bibliographystyle{plain}
  \bibliography{tsd}

  \end{document}
#+end_src


A second solution, to activate the RefTeX minor mode on a per-file
basis, was posted by Kevin Brubeck Unhammer in response to this idea.
Add the following lines to .emacs:

#+begin_src emacs-lisp
  (add-hook ‘org-mode-hook
             (lambda ()
               (if (member “WRITE” org-todo-keywords-1)
                   (org-mode-article-modes))))
#+end_src

where =org-mode-article-modes= is defined as follows:

#+begin_src emacs-lisp
  (defun org-mode-article-modes ()
    (reftex-mode t)
    (bib-cite-minor-mode t)
    (and (buffer-file-name)
         (file-exists-p (buffer-file-name))
         (reftex-parse-all)))
#+end_src

Add the =\bibliographystyle{}= and =\bibliography{}= lines to the
Org-mode file as before and define a TODO keyword, =WRITE=, perhaps
like this:

#+begin_src org
,#+TODO: TODO(t) STARTED(s) WRITE | DONE(d) DEFERRED(f)
#+end_src

With this setup, you insert a citation with =M-x reftex-citation RET=.

*** Using RefTeX in Org-babel LaTeX Code Blocks

In Org-babel LaTeX code blocks, the trick is to give RefTeX access to
information in other Org-babel LaTeX code blocks.  If you use an Emacs
starter kit where configuration information is held in Org-mode files,
then the second solution is preferable because you won't be asked for
a master file when Emacs is started.  For this reason, the second
solution is modified for use with Org-babel latex code blocks.  No
key-binding is needed here because Org-babel code blocks are edited
within the usual AucTeX environment.

Add the following lines to .emacs (adapted from  Kevin Brubeck Unhammer's [[http://www.mfasold.net/blog/2009/02/using-emacs-org-mode-to-draft-papers/][Reftex Setup]])
#+begin_src emacs-lisp
  (defun org-mode-article-modes ()
    (reftex-mode t)
    (and (buffer-file-name)
         (file-exists-p (buffer-file-name))
         (reftex-parse-all)))

  (add-hook 'org-mode-hook
            (lambda ()
              (if (member "REFTEX" org-todo-keywords-1)
                  (org-mode-article-modes))))
#+end_src

Then add a line like the following line to the top of your org-mode file:

#+begin_src org
,#+TODO: TODO(t) STARTED(s) | DONE(d) DEFERRED(f) REFTEX
#+end_src

When you open an org-mode file with a line like this, RefTeX will
prompt for the master .tex file, which will be parsed in the usual
way.  This means that the .tex file should already exist, perhaps by
tangling the LaTeX preamble and postamble, before
=org-mode-article-modes= is activated for the Org-mode file.

** How can I use XeLaTeX for LaTeX export instead of pdfLaTeX?
   :PROPERTIES:
   :CUSTOM_ID: using-xelatex-for-pdf-export
   :END:

#+index: XeLaTeX
#+index: pdfLaTeX

[[https://en.wikipedia.org/wiki/XeTeX][XeLaTeX]] is an alternative to pdfLaTeX for typesetting LaTeX
documents.  XeTeX can use any fonts installed in the operating system
without configuring TeX font metrics, and can make direct use of advanced
typographic features of OpenType and other font formats.  By default,
org-mode exports =org= files to =pdf= via pdfLaTeX.

Here is one way to smoothly incorporate XeLaTeX into org-mode's export
process.  This solution takes advantage of [[http://www.phys.psu.edu/~collins/software/latexmk-jcc][latexmk]], a perl script that
intelligently and automatically manages latex compilation.  It is included
with TeXLive, but at present the version included is not quite up-to-date
enough for our needs.  Version 4.20 and higher includes an option allowing
you to specify which program to use when "pdflatex" is called.  Install a
current version of latexmk as per the instructions on the [[http://www.phys.psu.edu/~collins/software/latexmk-jcc][latexmk]] site.  If
necessary, disable the older version that comes with TeXLive.  This is
likely in =/usr/texbin/=, and you should rename or remove it.  Then you can
put the following in your =~/.emacs.d/= or equivalent:

#+begin_src emacs-lisp
  (require 'ox-latex)
  (setq org-latex-listings t)

  ;; Originally taken from Bruno Tavernier: https://list.orgmode.org/87zkv0pqyi.fsf@mundaneum.com
  ;; but adapted to use latexmk 4.20 or higher.
  (defun my-auto-tex-cmd ()
    "When exporting from .org with latex, automatically run latex,
       pdflatex, or xelatex as appropriate, using latexmk."
    (let ((texcmd)))
    ;; default command: oldstyle latex via dvi
    (setq texcmd "latexmk -dvi -pdfps -quiet %f")
    ;; pdflatex -> .pdf
    (if (string-match "LATEX_CMD: pdflatex" (buffer-string))
        (setq texcmd "latexmk -pdf -quiet %f"))
    ;; xelatex -> .pdf
    (if (string-match "LATEX_CMD: xelatex" (buffer-string))
        (setq texcmd "latexmk -pdflatex=xelatex -pdf -quiet %f"))
    ;; LaTeX compilation command
    (setq org-latex-to-pdf-process (list texcmd)))

  (add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-cmd)


  ;; Specify default packages to be included in every tex file, whether pdflatex or xelatex
  (setq org-latex-packages-alist
        '(("" "graphicx" t)
              ("" "longtable" nil)
              ("" "float" nil)))

  (defun my-auto-tex-parameters ()
        "Automatically select the tex packages to include."
        ;; default packages for ordinary latex or pdflatex export
        (setq org-latex-default-packages-alist
              '(("AUTO" "inputenc" t)
                ("T1"   "fontenc"   t)
                (""     "fixltx2e"  nil)
                (""     "wrapfig"   nil)
                (""     "soul"      t)
                (""     "textcomp"  t)
                (""     "marvosym"  t)
                (""     "wasysym"   t)
                (""     "latexsym"  t)
                (""     "amssymb"   t)
                (""     "hyperref"  nil)))

        ;; Packages to include when xelatex is used
        (if (string-match "LATEX_CMD: xelatex" (buffer-string))
            (setq org-latex-default-packages-alist
                  '(("" "fontspec" t)
                    ("" "xunicode" t)
                    ("" "url" t)
                    ("" "rotating" t)
                    ("american" "babel" t)
                    ("babel" "csquotes" t)
                    ("" "soul" t)
                    ("xetex" "hyperref" nil)
                    )))

        (if (string-match "LATEX_CMD: xelatex" (buffer-string))
            (setq org-latex-classes
                  (cons '("article"
                          "\\documentclass[11pt,article,oneside]{memoir}"
                          ("\\section{%s}" . "\\section*{%s}")
                          ("\\subsection{%s}" . "\\subsection*{%s}")
                          ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
                          ("\\paragraph{%s}" . "\\paragraph*{%s}")
                          ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
                        org-latex-classes))))

  (add-hook 'org-export-latex-after-initial-vars-hook 'my-auto-tex-parameters)
#+end_src

The =my-auto-tex-cmd= function looks at your =.org= file and checks whether
you've specified which latex to use. If there are no instructions, it just
runs regular old latex. If it finds the string =LATEX_CMD: pdflatex= in
your file, it runs pdflatex. If it finds =LATEX_CMD: xelatex=, it runs
xelatex. Because control is handed off to latexmk, nothing else is needed:
it takes care of figuring things out so that the references and citations
are correct.

The second half of the code above specifies the latex packages that will be
included in the =.tex= file. The variable =org-latex-packages-alist=
specifies a list of packages that are always included in the header of
latex documents, regardless of how they are compiled. The variable
=org-latex-default-packages-alist= adds additional packages
depending on whether latex/pdflatex or xelatex is being used. You can
change the content of these as needed.

Finally, the =org-latex-classes= variable redefines elements of the
=.tex= file's preamble for the xelatex case. These can also be customized
as needed.

By way of example, an =.org= file you want compiled with xelatex might
contain the following header:

: #+TITLE: My Paper
: #+AUTHOR: Jane Doe
: #+DATE:
: #+OPTIONS: toc:nil num:nil
: #+LATEX_CMD: xelatex
: #+LATEX_HEADER: \setsansfont[Mapping=tex-text]{Unit-Bold}
: #+LATEX_HEADER: \setmonofont[Mapping=tex-text,Scale=MatchLowercase]{PragmataPro}
: #+LATEX_HEADER: \setromanfont[Mapping=tex-text,Numbers=OldStyle]{Minion Pro}

If you always want to have the same font setup in your xelatex documents,
the =fontspec= commands setting the font choices can be put in the
=org-latex-classes= setting instead.

The upshot is that when you want to export an =.org= file using XeLaTeX,
you can now simply make sure the line =LATEX_CMD: xelatex= is in your
=.org= file, then do =C-c C-e l l= as usual, and org-mode, with latexmk in
the background, does the rest for you.

** Why is my exported PDF file almost unreadable?
   :PROPERTIES:
   :CUSTOM_ID: unreadable-pdfs
   :END:

Some PDF viewers (earlier versions (< v6) of Acrobat Reader, Evince,
possibly others) do not get along with Adobe Type3 fonts, producing almost
unreadable screen output (printed output is OK). If you see this, first
verify the fonts that your document uses: open it with Acrobat Reader or
Evince, select "Properties" from the "File" menu and click on the "Fonts"
tab; alternatively, you can use the pdffonts program (part of the
xpdf-reader package) from the command line.  If that is indeed the problem,
then either use a different viewer or install Type1 versions of the
problematic fonts. For more details, see the "PDF export" section of
[[./org-dependencies.org][org-dependencies]].

** Can I add attributes to a link or an image in HTML export?
   :PROPERTIES:
   :CUSTOM_ID: html-image-and-link-attributes
   :END:

#+index: Export!Link
#+index: Export!Image
#+index: Link!Attributes
#+index: Image!Attributes

Yes.  Excerpt from [[https://orgmode.org/manual/Images-in-HTML-export.html#Images-in-HTML-export][Org's manual]]:

If you need to add attributes to an inlined image, use a `#+ATTR_HTML'.
In the example below we specify the `alt' and `title' attributes to
support text viewers and accessibility, and align it to the right.

:  #+CAPTION: A black cat stalking a spider
:  #+ATTR_HTML: :alt cat/spider image :title Action! :align right
:  [[./img/a.jpg]]

and you could use `http' addresses just as well.

** How can I export an org file to rtf, odt (Open Office), or doc (Word)?
   :PROPERTIES:
   :CUSTOM_ID: convert-to-open-office
   :END:

#+index: Export!rtf
#+index: Export!odt
#+index: Export!doc

Orgmode exports natively to =OpenDocument= format using =org-odt= module.

The key bindings for export are =C-c C-e o o= and =C-c C-e o O=.

If you don't see =OpenDocumentText= as an option under =C-c C-e= you need
to upgrade to =Org-mode 7.6= by one of the following means:

1. Install org-7.6 using a distribution .zip or .tar.gz file, or
   through Git. Then do the following:
   1. Add =contrib/lisp= to the load-path in your =.emacs=
     #+begin_src emacs-lisp
       ;; modify org-root-dir as needed
       (add-to-list 'load-path "org-root-dir/contrib/lisp")
    #+end_src
   2. Do =M-x customize-variable RET org-modules RET= and enable the
      =odt= option

2. Upgrade to (atleast) the =Emacs-24.1 pretest= version. Install
   =org-odt= package using =M-x list-packages=.

#+begin_comment

- Use existing exporters

  Export to one of org-mode's supported export formats and then use an
  external tool or method to convert the exported file to doc or odt.

  With simple documents, these methods work well. However for complex
  documents containing footnotes, embedded images, math formuale etc
  the results may be less than satisfactory. (Note, the lists below
  are by no means comprehensive).
  1. html -> odt/doc/rtf
     - open html in Open Office and save as odt/doc ([[https://list.orgmode.org/87lj6btkim.wl%ucecesf@ucl.ac.uk][see this post by
  	Eric Fraga]])
     - [[http://www.artofsolving.com/opensource/pyodconverter][PyODConverter]]
     - [[http://johnmacfarlane.net/pandoc/][Pandoc]] (this works for LaTeX and docbook as well)
     - (Mac only) The [[http://developer.apple.com/library/mac/#DOCUMENTATION/Darwin/Reference/ManPages/man1/textutil.1.html][textutil]] utility bundled with OS X can convert
  	from html to doc
  2. LaTeX -> odt/doc/rtf
      - [[http://latex2rtf.sourceforge.net/][LaTeX2rtf]] (works well with index, footnotes, and references)
      - [[http://www.tug.org/tex4ht/][TeX4ht]] (works with more complex latex elements, though can be
	difficult to install)
	- run =mk4ht oolatex file.tex=

See [[https://list.orgmode.org/AANLkTi=nbM9j=jO+wfBw9hTvnp_BXzQn51Pv7c0gKTRa@mail.gmail.com][this thread]] for further details.
#+end_comment

** ODT export aborts on my Windows machine as I don't have zip installed.  Where can I find a zip utility?

#+index: Zip

You can either use [[https://en.wikipedia.org/wiki/Info-ZIP][Info-ZIP]] or zip package from Cygwin. Please customize
=exec-path= to include the installation directory.

** I cannot open an exported =*.odt= file in LibreOffice because it is corrupt.  What do I do?
   :PROPERTIES:
   :CUSTOM_ID: debugging-org-odt
   :END:

#+index: Export!odt

Typically the corruption of =odt= file happens when the XML emitted by
Org is not well-formed according to =OpenDocument schema=.

If you encounter corruption issues please identify the root cause
using one of the methods described below:

- Use an Online validator
  - Pass the exported document through the [[http://tools.services.openoffice.org/odfvalidator/][ODF Validator]] and note down
    the errors.

- Use Emacs' in-built validator
  1. Switch to =*.odt= buffer =(C-x b whatever.odt)=
  2. Open the =content.xml= file - =(Hit RET on content.xml)=
  3. Do a =C-u C-c C-n= - =(M-x rng-first-error)=
  4. Note the error message, the XML markup at the point of error and
     the surrounding context.

Once you have identified the error
1. Create a minimal org file that reproduces the error.
2. Post a bug-report to =emacs-orgmode@gnu.org=.

** How can I specify ODT export styles?

#+index: Export!odt style

Check the variable =org-export-odt-styles-file=.  Here is its docstring,
as of Org version 7.8:

: org-export-odt-styles-file is a variable defined in `org-odt.el'.
: Its value is nil
:
: Documentation:
: Default styles file for use with ODT export.
: Valid values are one of:
: 1. nil
: 2. path to a styles.xml file
: 3. path to a *.odt or a *.ott file
: 4. list of the form (ODT-OR-OTT-FILE (FILE-MEMBER-1 FILE-MEMBER-2
: ...))
:
: [snip]
:
: Use "#+ODT_STYLES_FILE: ..." directive to set this variable on
: a per-file basis.  For example,
:
: #+ODT_STYLES_FILE: "/path/to/styles.xml" or
: #+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png")).
:
: You can customize this variable.

** Can I omit the title in the LaTeX export?

Yes: simply use a blank #+TITLE in your Org file.

** How can I use arbitrary colors for words/sentences in HTML export?

Add the following to your Emacs config,

#+BEGIN_SRC emacs-lisp
    ;; -*- emacs-lisp -*-
    (org-add-link-type
     "color"
     (lambda (path)
       (message (concat "color "
                        (progn (add-text-properties
                                0 (length path)
                                (list 'face `((t (:foreground ,path))))
                                path) path))))
     (lambda (path desc format)
       (cond
        ((eq format 'html)
         (format "<span style=\"color:%s;\">%s</span>" path desc))
        ((eq format 'latex)
         (format "{\\color{%s}%s}" path desc)))))
#+END_SRC

and then you can use

: [[color:red][red]]

for colored export.

This question has been raised [[https://list.orgmode.org/44B0EAE8544C834188E8790873CDE1CC226BF8F8@ARCEXCHANGE.arc.local][on the mailing list]] by Jos'h Fuller and
answered by Eric Schulte.


** How can I suppress the page number in the footer of an exported PDF?
#+index: Export!pdf
#+index: pdfLaTeX

Use the following directive in your Org file:

: #+LATEX: \thispagestyle{empty}

* Backup

#+index: Backup

Since =org= files are so central to your life, you probably want to back
them up in a safe place.

If the =org= file you want to back up are in a single directory, the
preferred method is to us a =RCS= (Revision Control System) -- pick up your
favorite ([[http://git-scm.com/][git]], [[http://bazaar.canonical.com/en/][bazaar]], [[http://mercurial.selenic.com/][mercurial]], [[http://subversion.apache.org/][subversion]], [[http://www.nongnu.org/cvs/][cvs]], etc.).  Depending on the
RCS you use and how you use it, you can have a /local/ backup or sync it on
a remote place.

If you want to store all your =org= files from your =$HOME= to a single
=~/org/backup/= folder, you can use this shell script (as [[https://list.orgmode.org/AANLkTimemfOeZFYajbpeW09OOJ87CVo-cTnarK-E=c3h@mail.gmail.com][suggested by
Suvayu Ali]]):

#+begin_src sh
mkdir -p ~/org/backup && \
find $HOME -type f -name '*\.org' ! -path "$HOME/org/backup/*" \
     -exec cp -t ~/org/backup/ \{\} \;
#+end_src

It will recursively search for =org= files in your =$HOME= directory
(except those in =~/org/backup/=) and copy them to =~/org/backup/=.
You can then use rsync to make sure =~/org/backup/= also lives on a
remote and safe place.

* Org-mode on mobile devices

#+index: MobileDevices

** What mobile apps for org-mode are available?

These are the most popular apps for keeping notes in org-mode format
on mobile devices:

- MobileOrg for *iOS*, created by Richard Moreland.  Check out [[https://mobileorg.github.io][the project's page]].
- Orgzly for *Android*. See [[http://www.orgzly.com/][the project's page]].
- Organice, a React-based [[https://en.wikipedia.org/wiki/Progressive_web_application][Progressive Web App (PWA)]] for any device
  with a browser.  Syncs with Dropbox, Google Drive, and WebDAV.  Can
  be self-hosted, or simply use [[https://organice.200ok.ch/][the public instance]].  Check out [[https://organice.200ok.ch/documentation.html][the
  documentation]] for more info.

There is also an app called MobileOrg for *Android* which is now
unmaintained and not fully compatible with recent versions of
Android. See [[http://wiki.github.com/matburt/mobileorg-android/][the project page]].

** Can I use the same files on my mobile device as on my computer?

Absolutely! Depending on the mobile app and your preferences, a number
of options are available.

*** Synchronizing using the MobileOrg protocol

Org-mode in Emacs has a builtin protocol for synchronizing and merging
changes from the mobile device. This protocol is supported by
MobileOrg for iOS and by the (unmaintained) MobileOrg for Android, but
*not* by Orgzly. Synchronization is initiated from within Emacs, which
needs to fetch a file containing only the changes in a
MobileOrg-specific file format. The file can be retrieved:

- via [[http://www.dropbox.com/][Dropbox.com]] (easier to set up, free accounts available)
- via [[https://syncthing.net/][Syncthing]] (open source and self hosted, potentially more data privacy)
- via a [[https://en.wikipedia.org/wiki/WebDAV][WebDAV]] server of your choice (potentially more data privacy)

**** How does synchronization via WebDAV work?
   :PROPERTIES:
   :CUSTOM_ID: mobileorg_webdav
   :END:

You need to create a dedicated directory on the WebDAV server for the
communication between Emacs and MobileOrg.

#+begin_src ditaa :file images/orgmobile-tramp-webdav.png :cmdline -r
  +----------------------+           +----------------------+
  | desktop              |           | WebDAV server        |
  +----------------------+           +----------------------+
  | emacs                |           | org-mobile-directory |
  |   + org-mode         |           | containing:          |
  |                      | scp (ssh) |                      |
  |   org-mobile-push ----------------->  *.org             |
  |   org-mobile-pull <-----------------                    |
  |                      | via tramp |       ^              |
  +----------------------+           +-------|--------------+
                                             |
                +----------------------+     |
                | mobile device        |     | WebDAV
                +----------------------+     |
                |                      |     |
                |    MobileOrg     <---------+
                |                      |
                +----------------------+
#+end_src

#+RESULTS:
[[file:images/orgmobile-tramp-webdav.png]]

If you can mount that directory locally so that Emacs can directly
write to it, just set the variable =org-mobile-directory= to point to
that directory.  Alternatively, by using the [[http://www.gnu.org/software/tramp/][/TRAMP/]] method,
=org-mobile-directory= may point to a remote directory accessible
through, for example, /ssh/ and /scp/:

#+begin_src emacs-lisp
(setq org-mobile-directory "/scpc:user@remote.host:org/webdav/")
#+end_src

  {{{BeginWarningBox}}} N.B. Since this configures /TRAMP/ to connect
  via /ssh/, you will need to use your /ssh/ password, not a WebDAV
  password.

  Also note that if you have configured ssh to use =ControlPersist=, due
  to [[https://lists.gnu.org/archive/html/tramp-devel/2012-03/msg00010.html][a bug with tramp and =ControlPersist=]] you may need to use =scpx=
  instead of =scp= as the /tramp/ transfer method.{{{EndWarningBox}}}

**** Does Emacs have to use /TRAMP/ to access the remote directory?

No, you can alternatively use a local directory for staging.  Other
means must then be used to keep this directory in sync with the WebDAV
directory.  In the following example, files are staged in =~/stage/=,
and Org-mode hooks take care of moving files to and from the WebDAV
directory using /scp/.

#+begin_src emacs-lisp
(setq org-mobile-directory "~/stage/")
(add-hook 'org-mobile-post-push-hook
  (lambda () (shell-command "scp -r ~/stage/* user@wdhost:mobile/")))
(add-hook 'org-mobile-pre-pull-hook
  (lambda () (shell-command "scp user@wdhost:mobile/mobileorg.org ~/stage/ ")))
(add-hook 'org-mobile-post-pull-hook
  (lambda () (shell-command "scp ~/stage/mobileorg.org user@wdhost:mobile/")))
#+end_src

Alternatively you could write a simple script to synchronize from
=~/stage/= to the remote directory via /rsync/.

*** Synchronizing with Syncthing or Dropbox directly

Among Orgzly users it is popular to synchronize the org files
themselves (rather than just the changesets) with [[https://syncthing.net/][Syncthing]] or
[[http://www.dropbox.com/][Dropbox.com]]. This method provides no way of merging parallel edits, so
you must ensure that a synchronization is performed when switching
device, or you'll be in trouble. [[https://medium.com/@JosephKiran/replacing-cloud-based-to-do-apps-with-orgzly-and-syncthing-6a065419d61][This blog post]] provides some details
for using Orgzly with Syncthing.

*** Synchronizing with Git and a shell script

An option which is attractive if you already prefer to have your org
files version controlled by git is to initiate synchronization from a
shell script on the computer, and handle merge conflicts with git
merges. Edits made in parallel will be visible as parallel branches in
the git log, and most conflicts should be handled by the
auto-merger. [[https://pantarei.xyz/posts/sync-org-mode-with-mobile/][This blog post]] provides such a script with setup
instructions.

* Mathjax

#+index: Mathjax

** How to install MathJax on my server?
:PROPERTIES:
:CUSTOM_ID: install_mathjax_on_server
:END:

Org uses MathJax as its default HTML display engine for equations.

Org relies on the version of MathJax available from orgmode.org, but you
might want to use another version and install MathJax on your own server.

1. Download a [[http://sourceforge.net/projects/mathjax/files/][MathJax archive]].

2. Upload it somewhere on your server (say http://me.org/mathjax/)

3. Set the correct path in =org-export-html-mathjax-options= (i.e. replace
   https://orgmode.org/mathjax/MathJax.js by
   http://me.org/mathjax/MathJax.js)

You can also get [[http://www.mathjax.org/resources/docs/?installation.html][MathJax from git or svn]] -- in this case, be careful not to
forget to unzip the fonts.zip archive in the mathjax directory.

* Tips and Tricks

** Can I create an Org link from a gmail email?

#+index: Link!Gmail

Yes.  See [[https://list.orgmode.org/4E9F8A54.5070007@gmail.com][this email]] from Torsten Wagner.

Also check this comment by Tom:

: Since any mail can be found under the All label by definition the
: simplest solution is extracting the message id from the end of
: the current url and then creating a new url pointing to All.
: This URL should always work unless the mail is deleted:
:
: https://mail.google.com/mail/?shva=1#all/<msgid>

** Problems with LaTeX macros with #+latex or #+begin_latex
  :PROPERTIES:
  :CUSTOM_ID: Problems-with-LaTeX-macros-with-#+latex-or-#+begin_latex
  :END:

#+index: LaTeX!Macro

Org's LaTeX exporter has a difficult job on its hands and even though it
does a great job most of the time, there are times when it falls short. One
situation that has arisen a few times in the past is when a macro
definition or use includes an opening brace, but the corresponding closing
brace is on a different line. That has caused LaTeX compilation problems or
mysterious excisions of content - see for example the following two threads
in the mailing list:

 - https://list.orgmode.org/87r5abi1tn.fsf@fastmail.fm

 - https://list.orgmode.org/BANLkTikRuyA7_sCC3pyVEHsJ0KXtP88_xw@mail.gmail.com

In both cases, the exporter was getting confused by the opening brace which
did not have a corresponding closing brace on the same line. Although the
first of these cases is fixed in current Org, there might be more such
cases or there might be a regression which causes the incorrect behavior
again. While waiting for a fix, it's worth trying out the simple workaround
of including a fake closing brace on the same line as the opening brace but
*commenting it out* so that LaTeX never sees it.  That is often enough to
make the exporter behave properly. In other words, to take one of the
examples above, instead of writing

: #+latex: \custommacro {
: ...
: #+latex: }

use the following idiom instead:

: #+latex: \custommacro { % hide the closing brace in a LaTeX comment }
: ...
: #+latex: }

I emphasize that this is a workaround, not a fix: if you do run into such
a case and the workaround fixes it, at least you can continue working, but
please submit a bug report so that it can be fixed properly.

** Inserting a Mairix type link when calling Orgmode capture in VM

#+index: lMairix

See the "rather crude solution" posted in [[http://robert-adesam.blogspot.com/2011/07/orgmode-capture-to-insert-mairix-link.html][this blog entry]] by Robert
Adesam.

** Can I prevent ispell from checking source blocks?

Yes, use this:

#+BEGIN_SRC emacs-lisp
(add-to-list 'ispell-skip-region-alist '("#\\+begin_src". "#\\+end_src"))
#+END_SRC

** Can I archive a subtree while keeping its hiearchy above?

Yes, you can check this [[https://gist.github.com/edgimar/072d99d8650abe81a9fe7c8687c0c993][code]].

* Google Summer of Code (GSoC)
  :PROPERTIES:
  :CUSTOM_ID: GSoC
  :END:
** Does Org Mode participate in GNU's application for the GSoC 2012?
   :PROPERTIES:
   :CUSTOM_ID: GSoC-2012
   :END:

#+index: GSoC 2012

Org Mode will contribute project ideas to GNU's application as
mentoring organisation in Google's Summer of Code 2012 (see Google's
[[http://www.google-melange.com/document/show/gsoc_program/google/gsoc2012/faqs][faq]]). You can have a look at the [[file:archive/gsoc2012/index.org][GSoC 2012 page]] on Worg for more
information about the project itself, and how to participate as
student or mentor.

* COMMENT Function to create =CUSTOM_ID=

#+begin_src emacs-lisp
  (defun org-faq-make-target ()
    "Make hard target for current headline."
    (interactive)
    (if (not (org-on-heading-p))
        (error "Not on a headline"))
    (let ((h (org-trim (org-get-heading 'no-tags))))
      (if (string-match "[ \t]*\\?\\'" h)
          (setq h (replace-match "" t t h)))
      (while (string-match "[ \t]+" h)
        (setq h (replace-match "-" t t h)))
      (org-entry-put nil "CUSTOM_ID" h)))
#+end_src