How to use helm-etags with a TAGS file that includes other tag files? - emacs

I used exuberant ctags to create my tags file with the --etags-include option and i see the included tags file in the main TAGS file. But when i try to use helm-etags, it doesn't dig into the included tags file.
Is it even possible?

you may try
https://github.com/jixiuf/helm-etags-plus
it support multiple tag files.
(setq tags-table-list '("/path/of/TAGS1" "/path/of/TAG2"))

Related

Copy values from one XMP tag to another XMP tag

I have a lot of images (JPG) with some metadata.
I'm interested in these three tags, for example, from one of the images:
[XMP] FlightPitchDegree : 0.734793
[XMP] FlightRollDegree : -1.024403
[XMP] FlightYawDegree : 192.286436
I need to copy these values for each image to the next tags:
Xmp.Camera.Pitch
Xmp.Camera.Roll
Xmp.Camera.Yaw
Mostly for tag editing, I'm using ExifTool, but I can't find commands for copying values between tags inside one file.
I'll be very appreciative of any recommendation.
Best,
Andriy
To copy from one tag to another you would use the redirection feature of the -TagsFromFile option. Basically it would be
exiftool "-TARGETTAG<SOURCETAG" file.xmp
You have the names of the SourceTags (FlightPitchDegree/FlightRollDegree/FlightYawDegree), you just need to figure out the exiftool names of your target tags. I can find CameraPitch/CameraYaw/CameraRoll tags on the DJI Tags page, but those are not XMP tags. The only other place I can find tags with similar names are part of the XMP-Camera group, which are not built into exiftool and you would have to download the pix4d.config file and use the -Config option to include those definitions.
exiftool -config /path/to/pix4d.config "-XMP:Pitch< FlightPitchDegree" "-XMP:Yaw<FlightYawDegree" "-XMP:Roll< FlightRollDegree" file.xmp
The -config option must be the very first option in the command in order to load the definitions.

In org-mode, how do I include other .org files from a (main) .org file?

I want to place some customization codes in a separate file, and include it from other files later. For example, file config.org has a single line #+MATHJAX: align:"left" mathml:t. How do I include it in another .org file abc.org so that the net-effect is exactly same as I write that #+MATHJAX line directly in abc.org?
Use #+setupfile: /path/to/config.org documented here.
The #+INCLUDE directive can include another file with export options (but it cannot affect the configuration of the enclosing file, since it is only for export purposes). Use it like:
#+INCLUDE: "/path/to/config.org"

Concatenate content of TAGS files from different directories

I'm referring to TAGS file generated by ctags or etags in order to have some code navigation in Emacs with M-..
The typical project looks like this:
Large standard library (more than 100 files, but rarely updated).
Project-specific library (updated on the daily basis).
I would like the project to be able to use two (or maybe more TAGS files), but regenerate only the portion of them, only the ones used inside the particular project. How would I approach this problem?
etags --help:
-i FILE, --include=FILE
Include a note in tag file indicating that, when searching for
a tag, one should also consult the tags file FILE after
checking the current file.

Including literal HTML code in org-mode templates

In org-mode, when you export HTML projects you can use templates to give all exported pages the same options, this is described here http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.html. What I would like to do, is give all exported pages an HTML snippet, for analytics, which is not an option. Is this possible with org-templates?
Now, I tried to add literal HTML code to the base template level-0-template.org with
#begin_html
...
#end_html
but it didn't work out. Does anyone know how to add html code to each HTML file that is exported in the project?
My project is organized as follows:
|- org
|- index.org
|- html
|- index.html (this is exported)
|- templates
|- level-0.org (I'd like to include default html here)
|- org_publish.el (this is the publishing config file)
To expand on my comment in the question, here is the difference between #+setupfile: and #+include:.
Details about both are available in the Org-Mode manual. See Setup File and Include Files.
The setupfile is essentially a list of all org configurations that are included in the linked file. It will pass things such as #+options. It will not however include any other content that the original file might include.
On the other hand, #+include: inserts the content of the linked file wherever the line is inserted. It acts similarly to \input in LaTex. I'm not certain to what degree it will bring along any org-configuration settings from the linked file, you may need to both #+include and #+setupfile the file to ensure everything is present. However since you do want the body content of the file to be included in each, you have to use #+include to insert it.
Glad you found a solution to your problem by sourcing your snippet as a separate html file.
If you wanted to make it work by having the snippet directly included in your template file, you should use:
#+BEGIN_export html
...
#+END_export
instead of:
#+BEGIN_html
...
#+END_html
(The latter will embed the html chunk as a block in the rendered html page-not what you want; the former will export the html chunk as is in the html file so that that code will be rendered when the page is displayed-what you want).

Repeating elements/links in org pages to be published as html?

Is there a simple way to add something like the {Back to Worg's index} to every .org page in a directory which I plan to publish with org-publish-project-alist? Is this accomplished with a #+ tag, or some definition in the .css file?
I looked at how they did it on Worg, and it doesn't look like CSS.
There are a few ways you might be able to do so.
Create a generic file that only includes the details you want in each file. For example:
[[./index.org][Back to index]]
Then use #+include: <filename> at the location in your file where you want the line. (See Include Files)
Alternately you could define a macro in a setupfile (See In-Buffer Settings) that is the definition of the link (or multiple link choices)
#+macro: toIndex [[./index.org][Back to index]]
In both cases it is worth noting that the relative paths are based on the exported file. So a [[../index.org]] will always point to the index.org file in the parent directory, no matter where the setupfile is.