Questions tagged [macro]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

Postfix: Getting a macro from ldap map and using it with an LDA

I want to use a mailbox defined in an ldap attribute. It's easy to resolve the mailbox from the email address with a simple query in an ldap map, but I can't figure out how to use that resulting ...
user avatar
  • 1
0 votes
0 answers
23 views

Is there a command-line tool for automating interactions with GUI's from bash scripts? [duplicate]

Sometimes I want to do a task for which I can only find a GUI way of doing it. But if I then want to automate such a task from within a bash script, then I don't know how to do it. I'd have to open ...
user avatar
  • 121
0 votes
0 answers
81 views

How do I make an emoji macro keyboard for linux?

I want to make a macro keyboard that types emoji for my Raspberry Pi 4 with a quite old spare keyboard. I got this idea from Tom Scott (British youtuber) and he made it in windows. Although I could ...
user avatar
0 votes
1 answer
138 views

Which RPM Spec Macro provides OS Minor in Release, eg el8_4?

How do I get the OS Minor in the Release field of the RPMs? I understand that the spec file entry %{?dist} expands to the OS Major Name: mypkg Version: 2.3 Release: 1.2%{?dist} ...
user avatar
1 vote
1 answer
18 views

LibreOffice Upgrade from 3.5.4 to 4.3.3 Broke Lots of Macros

Recently upgraded from Debian Wheezy to Jessie (yeah, I know...). During said upgrade, the LibreOffice suite got upgraded from version 3.5.4 to 4.3.3. Well, lots of my Writer macros were broken after ...
user avatar
  • 239
0 votes
2 answers
110 views

Calling macdef macro within the .netrc file

I get this error: Unknown .netrc keyword $download The script reads: machine **.gov login anonymous password none macdef download cd some directory quit $ download
user avatar
0 votes
1 answer
50 views

How can you customise headings in the ms package for groff?

I noticed there's a similar answered question here, but that one's pertaining to the me package. I'd like to know if and how, if so, is it possible to that using ms instead.
user avatar
0 votes
0 answers
28 views

press the button continuously doesn't work after running macro with cnee

When I play a recorded macro with cnee, pressing a key continuously doesn't work anymore until the next system start. Is this a known problem?
user avatar
  • 11
1 vote
1 answer
277 views

RPM Spec file %setup macro when you don't know the root name?

How do I use the %setup macro if I don't know the root name of the archive. For example, in my case I have archive.tar.gz that extracts to myproject-<githsha>/ Each time I run that I may get a ...
user avatar
  • 22.9k
1 vote
1 answer
433 views

How can I find where an RPM macro is defined or what it expands to?

Inside of an RPM I have %{__install} %{SOURCE2} %{buildroot} I believe that %{__install} is a macro. Where do I find where it is defined? What is the definition? Was it provided by the system or ...
user avatar
  • 22.9k
0 votes
1 answer
1k views

How to resolve SAS macro variable in shell script

I am running a shell script via X command within a SAS macro. I want to use a macro variable defined in SAS macro, in my shell script. I know if I pass that macro variable as parameter to shell script,...
user avatar
10 votes
3 answers
6k views

Can I launch macros and shortcuts from a second keyboard on Linux?

I have a small numpad keyboard which I would like to use for launching macros and shortcuts, along side my regular keyboard. I can attach macros and shortcuts to these keys (i.e, numpad 1 minimises ...
user avatar
0 votes
1 answer
263 views

Mutt: Save message to different folder but stay on it

I'd like to write a macro (index, pager) that saves a message to the Archive mailbox but keep the current message open / selected, or even to to the previous entry. My current macro: macro index,...
user avatar
  • 103
1 vote
1 answer
307 views

Mutt: move emails only if some emails are tagged

I use mutt and I like to sort out some emails from various mailing lists. I still like them to come to my inbox, but when read, I want to move them somehow automatically. Currently, I do the ...
user avatar
4 votes
2 answers
553 views

Undoing C syntax mangling macros to make exctags able to create prototype tags

I can successfully create a tags file for vim with exctags (Exuberant Ctags). However, creating tags allowing to jump to the prototype of a function does not work, due the system headers using a ...
user avatar
  • 1,670
1 vote
1 answer
523 views

LibreOffice placeholder fields documentation

I have to modify a LibreOffice template with a number of conditional statements. I managed to figure out one can add such statements through Insert > Fields > More fields, tab Functions, type ...
user avatar
1 vote
1 answer
789 views

vim: how to record norm commands?

I edit and correct a lot of identical files using those commands :%norm f^ID :%s/\s\+$// :%norm A, :%norm GG$x I also used the macro mode qa for record macro a and @a to execute But for some ...
user avatar
  • 11k
1 vote
1 answer
719 views

find and replace macro in libreoffice

How can I write a find and replace macro to merge many items in few, as "USA, Mexico, Canada, Honduras" in "America", "China, India, Vietnam" in "Asia" and so. Before macro: USA, Mexico, Canada, ...
user avatar
  • 81
2 votes
1 answer
1k views

Put long list of e-mail addresses in multiple-row macro variable

I have a list of 20 e-mail addresses that I'm trying to put in a macro variable as multiple rows in a shell script. In "wide" format it works fine and appears as: to_list="email1@test.com,email2@test....
user avatar
  • 23
0 votes
1 answer
48 views

How to test whether the present build platform is Scientific Linux from within an RPM spec file?

I would like to test if the present build platform is Scientific Linux from within a spec file. But I want this test to only return true if and only if the platform is Scientific Linux, so even the ...
user avatar
  • 3,303
1 vote
1 answer
901 views

How to determine whether the system an RPM package is built on is CentOS from within a spec file?

I have a spec file where its Requires: fields depend on the specific distribution it's being built on. So I need to be able to create a conditional structure along the lines of: %if %{?fedora} ...
user avatar
  • 3,303
1 vote
1 answer
81 views

Global "swap characters" macro in KDE

After moving from OSX back to KDE I found the thing I'm missing most is the Cmd+t global shortcut that flips the characters surrounding the cursor, making it easy to fix typos. The important aspect of ...
user avatar
  • 115
4 votes
2 answers
4k views

Checking for required M4 macros... yelp.m4 not found

I am on Linux Mint 18 Cinnamon 64-bit. I was about to compile file-roller known as Archive manager for GNOME from source. But when running: ./autogen.sh There is a following M4 macro missing: ...
user avatar
3 votes
2 answers
22k views

Execute script from i3 config

Question: I'm using i3-wm and I have Mod3 working as a hotkey. I have the following in ./config/i3/config: #This command works bindsym Mod3+f exec "firefox" #This doesn't work nor do my other ...
user avatar
2 votes
1 answer
4k views

How to run batch sas job in unix sas?

I have 5 SAS jobs that I need to run sequentially, one after the other. I typically type in nohup sas filename1.sas & in the command line to run and manually check for progress every few hours. ...
user avatar
1 vote
2 answers
296 views

m4 macro implementation of global (non-volatile) counter

Is it possible to define a m4 macro (without arguments), which expands to 1 on first invocation, expands to 2 on second invocation, and so on? In other words, it should have internal memory storing ...
user avatar
  • 69
2 votes
2 answers
553 views

Can mutt macros obtain properties from the current message?

In mutt, can macros can obtain some of the properties from the current message, in order to use them as variables? Here are some examples of potential macros, with the properties I'd wish to obtain in ...
user avatar
  • 18.2k
2 votes
2 answers
932 views

Auto-Complete and Shortcut Keys for Linux

I'm looking for something that will allow me to type anywhere, on anything and for this software to auto-complete. I used FastKeys on Windows which would also allow you to do custom shortcuts to open ...
user avatar
1 vote
2 answers
315 views

Create files from templates, substitutions in middle of other words

Is there a way to convince m4 to replace a macro in the middle of a word? I would like this file, day.m4: define(Sat,Cat)dnl Saturday and this command: m4 day.m4 to produce this output: Caturday ...
user avatar
  • 1,568
2 votes
1 answer
2k views

Gmake macro expansion: macro calls macro with variable in arguments

In the following makeffile one macro process it's arguments to call another macro. I expect that makefile below will generate two targets and correct list of the targets in $TARGETS. But in fact it ...
user avatar
  • 2,297
1 vote
1 answer
731 views

dot command in Vim, last change?

The dot command in Vim repeats the "last change", but I am not exactly sure what constitutes the "last change". For example, if I type the sequence: A;{ESC}j. Then a semi-colon is appended to the ...
user avatar
  • 5,361
3 votes
1 answer
2k views

mutt: ask for confirmation before moving message to archive

I have following macro defined in my muttrc: macro index s ":set confirmappend=no delete=yes auto_tag=yes\n\ <save-message>=archive\n<sync-mailbox>:set delete=ask-yes\n" When I ...
user avatar
134 votes
6 answers
345k views

How to comment multiple lines at once? [duplicate]

How can I select a bunch of text and comment it all out? Currently I go to the first line, go to insert mode then type # left-arrowdown-arrow and then I repeat that sequence, perhaps saving a few ...
user avatar
2 votes
1 answer
1k views

Send keystrokes to a process on Console

If I have a terminal with a shell open, how can I write a shell script (any scripting language is ok with me!) that will send a keystroke to any one of the running processes? As an example, how could ...
user avatar
  • 6,598
2 votes
2 answers
3k views

How to run a script by shortkey in elementaryOS?

I want to be able to run certain scripts by shortcut the way I do in ubuntu - for example some similar to this awesome script. (On that model I can search google the text selected in any text editor, ...
user avatar
1 vote
0 answers
499 views

How to setup keyboard shortcut that enters predefined text into X11 xterminal via SSH from mac OS?

I do a lot of remote programming on my CentOS linux server by opening an X11 xterminal window on my Mac OS, and SSH into the server. I'm looking for an easy to use method to enter a predefined text ...
user avatar
8 votes
3 answers
3k views

Interacting with X applications programmatically

I have an application which is built using GTK+. The application has a very simple interface. When started, the same window always opens, with a few input controls. We want to write a script to fill ...
user avatar
1 vote
1 answer
85 views

Emacs: mode-local macro with dashes and dots

In Emacs, how can I make a macro, that is local to the HTML mode, and uses dashes and dots? Take a look at the Elisp below: (define-abbrev-table 'html-mode-abbrev-table '(("..." "&hellip;") ;...
user avatar
  • 6,437
2 votes
1 answer
151 views

Expand pattern under cursor to all files matching it

Is there anyway to let VIM expand the glob pattern to all files that match it? e.g when I type *.c, and press some key, it would become a.c b.c
user avatar
  • 51k
2 votes
0 answers
57 views

Handle local links to local files in emacs

I have a LaTeX document where I often have to insert pathnames of files on my machine of other LaTeX files. Is there a way in emacs do get the following: A command which opens a file selection ...
user avatar
  • 16.8k
19 votes
5 answers
23k views

Keyboard Shortcut To Send Text Strings To Program

How can I configure a shortcut key to send a text string to the current program? The purpose is to type common entries quicker (email address, street address, phone number, username, favorite quote, ...
user avatar
  • 676
1 vote
1 answer
468 views

Is it possible to have a screen macro for this?

Here's my .screenrc: defscrollback 5000 vbell on vbell_msg " dierre!!! ---- Wuff!! " screen -t GRINDER ssh dierre@grinder.dierre.lan screen -t TRUNK attrcolor b ".I" termcap xterm 'Co#256:AB=\...
user avatar
  • 545
5 votes
3 answers
191 views

Making shortcuts cross desktop environment, possible?

I'm a big fan of keyboards, so a lot of thing a done by combination of keys, like open a file browser, web browser etc. Is there some daemon that can monitor my key presses, and launch some program ...
user avatar
  • 51k
3 votes
2 answers
390 views

Vim markers and macros

Is there a way to make a macro operate up to a marker? I know if I do 5@a my macro will operate on 5 lines. Example: set marker with `mc` record a macro with `qa` ... now what? Obviously 'c@a just ...
user avatar
  • 2,121
13 votes
4 answers
2k views

Is there a vim shortcut for <name of current file>?

In vim, if I'm working on a Python script, I will commonly type: :! python this_script.py to execute the script. Is there a shortcut for the name of the current file? If not, can I easily make one? ...
user avatar
  • 4,492
4 votes
1 answer
2k views

Automating typing strings in xmacro

Could you show me how to write macro in xmacro (that will work in whole desktop environment) that is able to expand strings? E.g. I will type "thx" and it will expand to "thank you".
user avatar
  • 14.6k
15 votes
2 answers
7k views

How to invoke an Openoffice macro from the Linux command line

I have an OpenOfice macro that I want to use to process the contents of an OpenOffice file. I am able to do this by opening the file with OpenOffice and then running the macro. How do I invoke the ...
user avatar